-
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
Devops: Address deprecation warnings from internal code and dependencies #6272
Conversation
84d3bb6
to
ba2fc58
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #6272 +/- ##
==========================================
- Coverage 77.70% 77.64% -0.05%
==========================================
Files 548 548
Lines 40230 40237 +7
==========================================
- Hits 31255 31239 -16
- Misses 8975 8998 +23 ☔ View full report in Codecov by Sentry. |
911b1f2
to
57dfd79
Compare
c61c54a
to
ed578ae
Compare
Following package requirements are updated: * `coverage~=7.0` * `pytest-cov~=4.1` * `pympler~=1.0` * `pyparsing~=3.0`
This prevents leaving open event loops which cause `ResourceWarnings` to be emitted during tests.
ed578ae
to
3fc0dfa
Compare
I'll take a look later. FYI, the docker test failed because reach the rate limit. |
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 @sphuber. Just one small question, the rest looks all good.
except ValueError: | ||
pass |
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 understand why ignore the ValueError
specifically?
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 will be raised iof the file handle was already closed, which can happen
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 see, thanks.
Also since this PR is on deprecation, would you mind to take a look at the deprecation in doc buildhttps://readthedocs.org/projects/aiida-core/builds/23431980/ ? I assume it will follow the same rules of change to get rid of those. |
You mean the |
The `get_description` method was unjustly deprecated in favor of the `description` property. However, the latter is just a direct reference to the `description` column of the database model. This is an optional string that can be defined by the user when the instance is created. The `get_description` method rather, which is defined on the `Node` base class, is intended to return a description composed from relevant properties of the node. These are therefore not the same. The deprecation is undone and it now returns `Code.full_label`.
Ah yeah, that one should be fixed. This is really an incorrect deprecation, so I removed the deprecation altogether. How did you find this deprecation warning? Just by going through the built docs and you happened to stumble on it when reading the tutorial? Or is there an easier way to find all deprecations? The docs build log contains a bunch of hits of our |
yep 😁. You know I translate doc to Chinese, I spot in when review the auto-translation PR.
True, it is hard to read, I neither have clue on how to fix. But if the sphinx command run locally, the output is well indented with line breaks. Might be a bit easy to read. I think all those warnings are raised during import phase in apidoc build. Thus not too much to check and fix. |
Thanks for the review @unkcpz |
This addresses the majority of deprecation warnings that are emitted under Python 3.9. The Python 3.12 run has quite a number more but they are mostly caused by dependencies and so they will need updates upstream. These will be taken care of at a later point in time.
The remaining warnings are the following:
This should be fixed by
ase
.This is because
verdi code duplicate
still requires the deprecatedCodeBuilder
. Addressing this will require quite some work and so is reserved for a separate PR.This would be taken care of by #6190
These are due to the test
test_call_on_process_finish
intests/engine/test_runners.py
. The fix would be to close the new event loop that is created in therunner
fixture, or simply use theRunner
class to take care of it. This works for Python 3.9, however, it fails for Python 3.12. The behavior ofasyncio.get_event_loop
changed in Python 3.12 where now it raises if no event loop has been set. This first needs to be addressed inplumpy
before we can fix it inaiida-core
.