-
Notifications
You must be signed in to change notification settings - Fork 192
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
CLI: progress bar added for verdi storage maintain
with disk_object_store
backend
#6562
Conversation
Thanks @khsrali. The change makes sense, but I think it need a flag for |
I tried to stay with same convention of |
Okay, then can you move the change from backend to cmd module as in cmd_archive.py |
ok, pls check now. |
Actually, I don't like it now, spreading everything in separate files really reduces the readability of the code. |
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.
My main question about the position of set_progress_bar_tqdm
is: Should a user coming from the Python API also see the progress bar? If yes, then this needs to be in maintain
. Maybe one can stick for this PR with the consistency, if one does not have an answer to this question.
Agreed. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6562 +/- ##
==========================================
+ Coverage 77.51% 77.85% +0.35%
==========================================
Files 560 566 +6
Lines 41444 42049 +605
==========================================
+ Hits 32120 32734 +614
+ Misses 9324 9315 -9 ☔ View full report in Codecov by Sentry. |
yeah, yeah, CI fails because |
@agoscinski I see
But I've not changed this file at all.. ? 🤔 This is crazy, I run it local by removing assignment, and then it complains 🙃
|
I was actually having exactly the same error on my other PR #6565... |
b4d5373
to
2946b78
Compare
pyproject.toml
Outdated
@@ -23,7 +23,7 @@ dependencies = [ | |||
'circus~=0.18.0', | |||
'click-spinner~=0.1.8', | |||
'click~=8.1', | |||
'disk-objectstore~=1.1', | |||
'disk-objectstore~=1.1.1', |
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 don't think you need to change this. We don't want to pin the patch version. Same for the environment.yml above.
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.
Thanks @unkcpz for the review
I understand that disk-objectstore~=1.1
would automatically install the latest patch release.
However, I think it's better to clearly specify the minimum compatible version, as 1.1.0
is not compatible.
This is important because if a user already has disk-objectstore v1.1.0
installed and loses internet access during the installation of aiida-core
, the installation will proceed with disk-objectstore v1.1.0
without requiring it to update to 1.1.1
.
In that case, we have a wrong installation, with no warning or whatsoever that leads to a bunch of errors emerging during the runtime.
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.
as 1.1.0 is not compatible.
What you mean by "not compatible"? If it is a release that have problem then maybe we need to bring it down from pypi. If 1.1.1
is just adding new feature then having v1.1.0
should be fine I guess? Maybe I miss something?
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.
Ah, I see. The implementation here is rely on the change with the release 1.1.1
.
Then if we follow the semver ("MINOR version when you add functionality in a backward compatible manner"), that one should be released as a minor version bump.
I don't know how much we want to follow the semantic versioning. The problem with pinning to patch version is if we bring new things in the future to disk-objectstore and release as 1.2
or higher, it is always needed to bump the version in aiida-core
and make release to bring it to user which may not ideal.
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 just did a read on https://github.com/aiidateam/AEP/blob/master/002_dependency_management/readme.md again.
If we gonna to follow it, then we probably need to release v1.2
and using ~=1.2
in aiida-core
.
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.
Ok, I understand that should have been released as 1.2
.
But now, given the situation I don't really think we need to re-release disk-objectstore
just to follow semantic versioning thing.
Time and effort it requires, does payoff for the fruit.
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 think @unkcpz has a point. We cannot fix this anymore backwards, but lets at least to quickly a release.
aiidateam/disk-objectstore#177
Since not every package is our control I would just do a comment an the dependencies, but since we can make quickly a release, I would fix it, because this has to happen anyway.
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.
Then please also fix these as well:
- plumpy~=0.22.3
- kiwipy[rmq]~=0.8.4
- archive-path~=0.4.2
- click-spinner~=0.1.8
- upf_to_json~=0.9.2
you may re-release kiwipy
, plumpy
, and archive-path
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 can understand the frustration, but that is not in the scope of this PR to solve other peoples mistakes, but in this case we did a wrong release.
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.
@khsrali just one minor request, all good then. Thanks!
@@ -42,7 +42,7 @@ debugpy==1.6.7 | |||
decorator==5.1.1 | |||
defusedxml==0.7.1 | |||
deprecation==2.1.0 | |||
disk-objectstore==1.1.0 | |||
disk-objectstore==1.1.1 |
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.
disk-objectstore==1.1.1 | |
disk-objectstore~=1.2 |
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 file (and other requirements below) are initially generated by pip-compile and the version is sepcific to patch version, so it needs to be 1.2.0
.
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.
Just a thought in my mind, I think pip-compile --extra=atomic_tools --extra=docs --extra=notebook --extra=rest --extra=tests --no-annotate --output-file=requirements/requirements-py-3.9.txt pyproject.toml
command to generate this file needs to be run by CI when there are dependencies changes in project.toml
. Anyway not related to this PR.
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.
Ah I see these are lock files. Thanks will undo this
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.
Yes or a pre-commit hook that checks diff (which is then basically run by the CI^^)
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.
pre-commit
... Seems you didn't success on pushing to move away from it 🤔
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.
promise aiida-core 3.0 no pre-commit
I missed the comment here, sorry.
|
a14681e
to
e1475af
Compare
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 all good now I guess? Thanks @khsrali @agoscinski!
e1475af
to
0f5411c
Compare
This is the complementary PR for aiidateam/disk-objectstore#171
Now one can easily test the changes here, as @giovannipizzi and @unkcpz requested.
Note
This PR should only merge after the one mentioned above, for this reason I marked this one as draft.
Also I should remember to tag and update the dependency,
Note 2
Don't worry about test failing, it's only because it depends on a released version of
disk-objectstore
Ideally for testing, you can pull the PR and install with
pip install -e .