-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
Update about()
and document latest package support
#1220
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1220 +/- ##
==========================================
- Coverage 98.13% 97.71% -0.43%
==========================================
Files 60 60
Lines 2737 2796 +59
==========================================
+ Hits 2686 2732 +46
- Misses 51 64 +13
Continue to review full report at Codecov.
|
From #1201 there is still a few things left that this does not do, and I am a bit stuck on.
|
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 @crazy4pi314, the about() output looks is very good and clear!
The main problem is that we should access the requirements.txt
and dev_requirements.txt
files in a path independent way otherwise we get errors when using Mitiq from arbitrary folders.
mitiq/_about.py
Outdated
# Logging versions of Mitiq's core dependencies (must be installed) | ||
LATEST_SUPPORTED_PKGS = { | ||
req.project_name: req.specs[0][1] | ||
for req in parse_requirements(open("requirements.txt")) |
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.
for req in parse_requirements(open("requirements.txt")) | |
for req in parse_requirements(open("requirements.txt")) |
This works only if you are in the mitiq root folder. Otherwise the file is not found and one gets an error.
I agree the current approach is good and is sufficient.
Fine to hardcode versions or to just remove them. |
The mypy issues are stumping me, I think I have created a race condition with the package loading process... :( |
This PR got more involved than expected. I also tried to fix some aspects at some point but the situation is complicated since dev requirements are not easily accessible from Maybe we could close it in favor of a new PR which is focused on the simplified issue #1478. |
Based on the discussion in #1478, we can close this PR. See #1478 (comment) therein for a good summary. |
Fixes #1201
Description
Please explain the changes you made here.
Checklist
Check off the following once complete (or if not applicable) after opening the PR. The PR will be reviewed once this checklist is complete and all tests are passing.
If some items remain, you can mark this a draft pull request.
License
Tips
If the validation check fails:
Run
make check-types
(from the root directory of the repository) and fix any mypy errors.Run
make check-style
and fix any flake8 errors.Run
make format
to format your code with the black autoformatter.For more information, check the Mitiq style guidelines.
Write "Fixes #XYZ" in the description if this PR fixes Issue #XYZ.