-
Notifications
You must be signed in to change notification settings - Fork 61
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
Random doctest failures #575
Conversation
Definitely a useful one to make! Thank you, @purva-thakre ! |
@vprusso Ha! No worries, the random failures were driving me crazy. BTW you commented before I got the chance to edit the PR description. I think the issue is due to Python getting confused about importing the module or the function. An easier solution would be to rename all the Edit: We could also hold on for a couple of days to check if the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #575 +/- ##
======================================
Coverage 98.1% 98.1%
======================================
Files 162 162
Lines 3108 3108
Branches 760 760
======================================
Hits 3050 3050
Misses 37 37
Partials 21 21 ☔ View full report in Codecov by Sentry. |
Hmm, renaming the files seems dangerous and could break backwards compatibility. Not sure exactly what's going on with the failures, but I would consider something like that as a last ditch effort I'd say. |
So, do you want me to create an issue so that we work on this sometime in the future? I did add a comment in case we accidentally remove these. I have a feeling this PR and #244 are closely related. |
For now if this works, that's great. Still curious why this is failing though as it seems to abide by the same pattern as other functions abide by. Curious, but for now, LGTM |
Same here! |
Description
Fixes #473
This is technically not a fix as we have to specify the full import path for a bunch of files only. If this is indeed the source of the issue where Python could not distinguish between the module and functions, we should rename all
.py
files to not have the same names as the functions in them.For example, rename
toqito/state_props/is_antidistinguishable.py
totoqito/state_props/is_antidistinguishable_function.py
Changes
Notable changes that this PR has either accomplished or will accomplish. Feel free to add more lines to the itemized list
below.
Checklist
Before marking your PR ready for review, make sure you checked the following locally. If this is your first PR, you might be notified of some workflow failures after a maintainer has approved the workflow jobs to be run on your PR.
Additional information is available in the documentation.
ruff
andpylint
for errors related to code style and formatting.pytest
.Sphinx
build can be checked locally for any failures related to your PRlinkcheck
to check for broken links in the documentationdoctest
to verify the examples in the function docstrings work as expected.