-
Notifications
You must be signed in to change notification settings - Fork 154
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
Moving source directory to src/anndata #1151
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1151 +/- ##
==========================================
+ Coverage 84.22% 84.25% +0.02%
==========================================
Files 36 35 -1
Lines 5622 5613 -9
==========================================
- Hits 4735 4729 -6
+ Misses 887 884 -3
|
The issue is that doctests make the testing process wonky, as they import their parent modules. And if we don’t use editable installs in testing, the parent modules are the one in the project directory while there’s a second copy installed to the site-packages directory. Using A different approach would be to do regular installs and run the doctests for the installed version after moving the tests out of the package. Like And for completeness’s sake, there’s also |
This can be finished once the fix to this has been released: pytest-dev/pytest#11475 I.e.: pytest-dev/pytest#12074 |
OK, I reverted the commit that fixes the double collection. We have two options:
of course that’s fixable by not relying on once we finally move the tests out of the package, everything can be unified again: |
@flying-sheep is this ready for me to look at again? |
Of course |
still the case |
@flying-sheep, is it still the case that test collection doesn't really work with Do you know why this is different for CI? |
pyproject.toml
Outdated
@@ -119,8 +125,10 @@ exclude_also = [ | |||
|
|||
[tool.pytest.ini_options] | |||
addopts = [ | |||
# "--import-mode=importlib", # TODO: enable |
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 explanation of why, link to a relevant issue here would be good
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.
because you said so. there’s no issue that I’m aware of.
You said something along the lines of “let’s not make too many changes at once because this is fragile. Let’s do that when we move the tests out of the package.”
because we directly specify paths for CI. you agreed that this is fine for now, since the problem will fix itself once we move tests out of the package |
OK, I check if we run enough tests and link the issue. |
@flying-sheep just a heads up that CI is failing here |
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.
lgtm
Once it's merged maybe send out a message on zulip with instructions on how to
- Update a PR
- switch over to this (I think just re-install and
rm -r anndata
?)
Also, still planning on back porting this? I'm going to lunch now, but wanna make a release before that. |
doesn’t matter if it’s in the release or not, but it should be backported to the 0.10.x branch so further backports are easier. |
Co-authored-by: Isaac Virshup <[email protected]>
Supersedes #1128