-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add Conda Lock Updating Action #5
Conversation
cb04f99
to
a742ec5
Compare
I can see that I need to add |
Please, add it to the README too. |
da38492
to
4c154b8
Compare
I had to make some small fixes after testing on |
@ajelinski - Ping? I would like to get this GitHub action moving again? |
I still need to test if everything works well after these changes but please take a look if you like it more now @umarcor. |
e2cf5d3
to
0d69a68
Compare
Rebased and fixed after testing on a
|
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.
The structure looks much nicer and easier to understand/maintain. Congrats for the cleanup!
92f43a4
to
d358d22
Compare
I'm glad you like it @umarcor! I've cleaned the commit history. I think now this PR is ready to be merged. |
c7ccc09
to
eec0e64
Compare
I tested the bot again to make sure that everything still works as intended before it's merged. Somehow after separating scripts and steps I skipped the test of the special case when the lock is up to date. It needed a little modification to work properly ( BTW there's also an issue with pip that doesn't handle simultaneous installation of git-based packages with their git-based dependencies properly. I've found a way to avoid it, i.e. making pip ignore package dependencies when Conda creates the environment based on the Conda Lock. It is absolutely safe to do since all packages, including the dependencies, are in the Conda Lock anyway. I have created an issue on pip so maybe it won't be needed in the future: pypa/pip#10002 For now, I added information on how to handle such a situation to the README: eec0e64 . Could you please take another look at the action changes @umarcor? Now the action is definitely ready to be merged if you find them acceptable.
|
LGTM! @mithro, I'll let you merge 😉 |
We should not have any packages which use the |
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.
Some minor formatting / style issues.
Can you run pylint or flake8 on your Python files?
run: $GITHUB_ACTION_PATH/check_prepare_env.sh | ||
|
||
- shell: bash | ||
run: | |
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.
This would probably be better as a Python script?
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.
I'm not sure if you meant it this way but I can't make it a separate script since it uses GH Action inputs so it has to be in the action.yml
file.
If you thought about only converting it to Python but leaving it in action.yml
then I'm not sure. Why would it be better?
@@ -0,0 +1,48 @@ | |||
#!/bin/bash |
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.
If we make this file Python it can work on windows / mac / linux? We already require Python for other parts.
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.
This script should work on all these OSs, there's nothing really OS-specific.
@@ -0,0 +1,50 @@ | |||
#!/bin/bash |
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.
If we make this file Python it can work on windows / mac / linux? We already require Python for other parts?
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.
The script itself should work on all these OSs but I'm not sure about update_lock.py
on Windows with its \r\n
newlines as there are some file manipulations involved.
Signed-off-by: Adam Jeliński <[email protected]>
eec0e64
to
b846ece
Compare
Signed-off-by: Adam Jeliński <[email protected]>
b846ece
to
fb771da
Compare
From what I saw working with |
The Python scripts had many changes, e.g. docstrings were added, since I found many parts not easily understandable after these few months. They fully conform to the |
@mithro Should I make any changes to have this PR merged? |
@ajelinski LGTM |
@acomodi - Now we just need to deploy this everywhere? |
@mithro Yes, we can test this right away with arch-defs for starters |
Would symbiflow-examples be an easier starting repo? |
This GitHub Action creates or updates Conda Lock from the freshly created Conda Environment based on the Conda
environment.yml
file. The Pull Request is automatically issued if there is any change in the Conda Lock.The workflow using this Action is available at: https://github.com/antmicro/symbiflow-examples-bot/blob/master/.github/workflows/update_conda_locks.yml
The example workflow jobs can be checked at: https://github.com/antmicro/symbiflow-examples-bot/actions/runs/453502941
The lock is quite fresh in there on the
master
branch so apart from the environment's name change (due to the script change) in the latest PR there's only one package updated but it can be seen how the Conda Lock looks like: https://github.com/antmicro/symbiflow-examples-bot/pull/41/files