Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the names of the calculations so that they are consistent. #68

Merged
merged 3 commits into from
Apr 6, 2023

Conversation

JPchico
Copy link
Collaborator

@JPchico JPchico commented Apr 5, 2023

Changes the names of the calculations so that the follow the template Lammps{type}Calculation.
Addresses #56

@JPchico JPchico added this to the Refactoring and generalization milestone Apr 5, 2023
@JPchico JPchico requested review from chrisjsewell and sphuber April 5, 2023 07:41
@JPchico JPchico self-assigned this Apr 5, 2023
@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #68 (32157d8) into develop (004c746) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop      #68   +/-   ##
========================================
  Coverage    91.21%   91.21%           
========================================
  Files           33       33           
  Lines         2652     2652           
========================================
  Hits          2419     2419           
  Misses         233      233           
Flag Coverage Δ
pytests 91.21% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiida_lammps/common/raw_parsers.py 83.33% <ø> (ø)
aiida_lammps/calculations/lammps/__init__.py 94.04% <100.00%> (ø)
aiida_lammps/calculations/lammps/base.py 97.24% <100.00%> (ø)
aiida_lammps/calculations/lammps/force.py 98.18% <100.00%> (ø)
aiida_lammps/calculations/lammps/md.py 96.90% <100.00%> (ø)
aiida_lammps/calculations/lammps/md_multi.py 86.77% <100.00%> (ø)
aiida_lammps/calculations/lammps/optimize.py 95.06% <100.00%> (ø)
aiida_lammps/data/potential.py 93.75% <100.00%> (ø)
aiida_lammps/parsers/lammps/base.py 89.18% <100.00%> (ø)
aiida_lammps/parsers/lammps/force.py 92.72% <100.00%> (ø)
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@JPchico
Copy link
Collaborator Author

JPchico commented Apr 5, 2023

@chrisjsewell, @sphuber
I have changed the names of the calculations as discussed. I think after this is merged I will tackle #63.

pyproject.toml Outdated
Comment on lines 67 to 68
"lammps.md.multi" = "aiida_lammps.calculations.lammps.md_multi:MdMultiCalculation"
"lammps.optimize" = "aiida_lammps.calculations.lammps.optimize:OptimizeCalculation"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about these and the CombinateCalculation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I have missed those ones!
Should I also do the same in the parsers? or make a different PR for that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I would also add the parsers to this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a side note: do you have a specific reason for merging pull requests, instead of squash merging? Or are you just using it because it is the default. If you are just using it by default, may I suggest we start using squash merge instead, at least for PRs that don't have neatly crafted commits that should be kept separate? This keeps the history on the main branch more linear and a lot more easy to navigate. These merge commits and intermediate commits from feature branches are almost never useful. We are using this approach in all other aiidateam repos as well and works really well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically because it is the default.
With squash merging you refer to squashing all the merges in a PR into a single commit right? which in principle could have been many commits in the fork. Or is it something else?
I think that keeping the main branch history clean would be very nice I agree.
Any thoughts on this @chrisjsewell ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With squash merging you refer to squashing all the merges in a PR into a single commit right?

Indeed. Next to the Merge pull request button is a little arrow where you can select the merge method. There you select "Squash and merge" instead and then click the button. It will open a text editor to format the final commit message. By default it takes a concatanation of commit messages of all commits. I usually edit this to be a single nice final commit message.

Chris is on a holiday, so not sure if he will see this. But I am pretty sure he also uses squash merge (where applicable). Note that there are still cases in which you don't want to squash, but in that case, the PR author needs to properly prepare the commits in the PR branch as they should be merged into the main branch. Then we use rebase and merge instead of squash. But for most PRs, jsut a single commit is sufficient and so we simply squash.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I'll do it then for this PR, I normally did the squashing by hand, but if github can do it for me I'm happy about it.

@JPchico
Copy link
Collaborator Author

JPchico commented Apr 5, 2023

Okay I have changed the Parsers and calculations so that they all have the same standard way. @sphuber you can check again if you want.

And I'll do the merging with squashing this time to try to keep the main brain a bit cleaner. I might need to do some of that by hand later to fix some of the superfluous commands introduced by the other PRs.

@sphuber
Copy link
Member

sphuber commented Apr 5, 2023

And I'll do the merging with squashing this time to try to keep the main brain a bit cleaner. I might need to do some of that by hand later to fix some of the superfluous commands introduced by the other PRs.

I wouldn't worry about that now, can get tricky if you merged in branches and start messing with the history. Let's just use squash-merge and rebase-merge from now on.

Copy link
Member

@sphuber sphuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @JPchico looks good to me

@JPchico JPchico merged commit 186afeb into aiidaplugins:develop Apr 6, 2023
@JPchico JPchico deleted the 56-naming-of-calcjob-plugins branch April 6, 2023 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants