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
Make update #2348
Make update #2348
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2348 +/- ##
=======================================
Coverage 48.24% 48.24%
=======================================
Files 110 110
Lines 30626 30626
Branches 7986 7986
=======================================
Hits 14776 14776
+ Misses 14306 14305 -1
- Partials 1544 1545 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Makefile
Outdated
update: all | ||
@ echo "Updating RMG-py" | ||
git stash || true | ||
git pull git@github.com:ReactionMechanismGenerator/RMG-Py.git main || git pull https://github.com/ReactionMechanismGenerator/RMG-Py.git main || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why pulling twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, either using https
or ssh
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kfir4444 , thanks for the contribution!
I added a few points for discussion (some where sent as individual emails, sort)
documentation/source/users/rmg/installation/updatingSourceCode.rst
Outdated
Show resolved
Hide resolved
This is to make sure that users remember to recompile after making pulling from github.
@ echo "Updating RMG-py" | ||
@ echo "Please remember to stash unwanted changes." | ||
git status | ||
@ read -p "Are there any changes that are not staged for committed? [y|n] " user_input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be "staged or committed" or "staged for commit"?
@ echo "Please remember to stash unwanted changes." | ||
git status | ||
@ read -p "Are there any changes that are not staged for committed? [y|n] " user_input | ||
if [ "$$user_input" = "N" ] || [ "$$user_input" = "n" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this work on your system? because I have the following error when I select y or n:
(rmg_env) blais.ch@FACC02D75Y4MD6T RMG-Py % make update
Updating RMG-py
Please remember to stash unwanted changes.
git status
On branch make_update
Your branch is up to date with 'origin/make_update'.
nothing to commit, working tree clean
Are there any changes that are not staged for committed? [y|n] y
if [ "$user_input" = "N" ] || [ "$user_input" = "n" ]; then
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [update] Error 2
this message appears in both zsh and bash. I assume it has to do with mixing make and bash?
if [ "$$user_input" = "N" ] || [ "$$user_input" = "n" ]; then | ||
git checkout main || true | ||
git pull git@github.com:ReactionMechanismGenerator/RMG-Py.git main || git pull https://github.com/ReactionMechanismGenerator/RMG-Py.git main || true | ||
conda activate rmg_env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if the environment name weren't hard coded. Mine has a different name, and sometimes I have more than one.
Perhaps instead have a check that RMG (or its dependencies) are available in the current environment, and a warning to activate the right environment if it is not.
You could probably just add check
as a dependency for this target? (I think that checks all the python dependencies)
This pull request is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant pull request, otherwise it will automatically be closed in 30 days. |
Motivation or Problem
I added a command to make for automating the updates for users that installed rmg from source. This is due to people having issues with forgetting to recompile after pulling. I think this process is a bit more user friendly, especially for the python users that sometimes forget to compile (myself included).
Description of Changes
I added a command to the Makefile for automatic updates, and added an appropriate explanation to the documentations.