-
Notifications
You must be signed in to change notification settings - Fork 113
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 RTD config #485
Update RTD config #485
Conversation
Codecov Report
@@ Coverage Diff @@
## main #485 +/- ##
=====================================
Coverage 98.5% 98.5%
=====================================
Files 42 42
Lines 4489 4489
=====================================
Hits 4425 4425
Misses 64 64 |
The build on RTD is failing with a note that the pytest module is not available. Each module should presumably only appear in |
The build on RTD is successful now and looks good to me: https://docs.messageix.org/projects/ixmp/en/update-rtd-config/ |
Note what appears in this section in the docs built from I will try to come back to this soon and suggest a fix. |
I see, I was wondering if there were special parts like this that needed the import line. So I've tried to take a closer look at this: there are ways to recursively find and document all submodules of a package, primarily through the |
You're on the right track here.
Having a Note that conftest.py names Line 1 in f348a6b
…and so do the corresponding files in message_ix, message-ix-models, etc. These mean that:
In addition, downstream code can import and use the utility functions as it likes. Anyway, the upshot of all of this is: As for a fix, I think the simplest is to keep .readthedocs.yaml as it was, and add a comment: install:
- method: pip
path: .
# NB we use "tests" here, not "docs", so that ixmp.testing can be imported and its
# contents documented. Users may build the docs with only ``ixmp[docs]`` installed,
# but that section will appear empty.
extra_requirements: [tests] Or, second simplest, change the dependencies in pyproject.toml: docs = [
"ixmp[tests]",
"GitPython",
"numpydoc",
"sphinx >= 3.0",
"sphinx_rtd_theme",
"sphinxcontrib-bibtex",
]
report = ["genno[compat,graphviz]"]
tutorial = ["jupyter"]
tests = [
"ixmp[report,tutorial]",
"memory_profiler",
"nbclient >= 0.5",
"pretenders >= 1.4.4",
"pytest >= 5",
"pytest-benchmark",
"pytest-cov",
] |
Thanks for the explanation. Of these, the second option seems cleaner to me. I wasn't sure if the tests would still run when only |
All tests fail because in the workflow file, we only install |
The tests are passing again and RTD also builds the docs without complaint, but the resulting docs still don't show the missing section. I'm not too sure what's going on, especially since for |
When I delete everything in |
Now they also do on RTD. Maybe when I was checking them out yesterday that was too soon after the prior run so I was still directed to the former version? |
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, looks good to go!
NB I edited the PR description to add the other items in the PR check-list. It's less mental work for a reviewer to see them struck-out and say, "Ah yes, I agree, this is not needed for this PR" than to say "What was in that list again? Was the PR author right to skip them?" We can change the inline comment if it's not clear enough.
Sounds good, thank you :) |
Replaces #483 to enable testing if the docs are still built successfully by RTD.
How to review
PR checklist
Add or expand tests;coverage checks both ✅Add, expand, or update documentation.N/A; CI changes only.Update release notes.N/A