-
Notifications
You must be signed in to change notification settings - Fork 191
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
Docs: ⬆️ Update sphinx + extensions versions #4470
Docs: ⬆️ Update sphinx + extensions versions #4470
Conversation
Also moved sphinxext testing to the official sphinx testing infrastructure
Codecov Report
@@ Coverage Diff @@
## develop #4470 +/- ##
===========================================
- Coverage 79.29% 79.27% -0.01%
===========================================
Files 475 475
Lines 34835 34837 +2
===========================================
- Hits 27618 27614 -4
- Misses 7217 7223 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@csadorf can you review this, with respect to dependency changes ta. I updated the requirements as mentioned in: #4466 (comment) |
@ltalirz and @greschd do you want to check the sphinx extension side of this PR
(I'm tempted to change the dropdown implementation to https://sphinx-panels.readthedocs.io/en/latest/#dropdown-usage, but I don't know if I'll have time right now) |
@@ -27,8 +29,7 @@ class AiidaCalcJobDocumenter(AiidaProcessDocumenter): | |||
|
|||
@classmethod | |||
def can_document_member(cls, member, membername, isattr, parent): | |||
from aiida.engine import CalcJob | |||
return issubclass(cls, CalcJob) |
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.
Found your error @ltalirz 😄
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.
Great, thanks a lot Chris!
Is there an easy way to manually check the HTML output with the official testing infra? That was the reason for that |
I generally use beautifulsoup + pytest-regressions: https://github.com/executablebooks/MyST-Parser/blob/750ea18db6e7eccc147e3bf45921ac4eb6715ab5/tests/test_sphinx/conftest.py#L80 |
Not sure if that answers my question (maybe I'm just being dense): Can I create the HTML output of the "test documentations" without changing the test code? |
Gah-damn, now that #3689 is fixed, you need to reference the processes with their new object types e.g. |
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 a lot @chrisjsewell !
Just a couple of comments & minor questions.
@greschd Please also let us know whether you're happy with this solution.
@@ -77,15 +77,18 @@ def remove(self, value): | |||
del self[value] | |||
|
|||
def pop(self, **kwargs): # pylint: disable=arguments-differ | |||
"""Remove and return item at index (default last).""" |
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.
That function does not seem to return anything or am I wrong?
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.
Hmm, yeh good point it should actually return; thats a bug in the code I would say.
Its a bit out of scope of this PR, so perhaps we should fix in another small PR.
(I only actually made this change to fix a warning by sphinx about the inherited docstring)
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.
Up to you - in any case, the docstring should be consistent and if you prefer not to fix it here, we should open an issue
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.
ok I've fixed it here then 446d1a3
@@ -257,7 +257,7 @@ def walk_nodes( | |||
|
|||
:param filters: filters to apply to the node query | |||
:param node_class: return only nodes of a certain class (or list of classes) | |||
:param int batch_size: The size of the batches to ask the backend to batch results in subcollections. | |||
:param query_batch: The size of the batches to ask the backend to batch results in subcollections. |
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.
batch_size
might actually be the better name; anyhow it's fine to adapt the docs instead.
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.
yeh it probably should be, but thats outside the scope of this PR
Sorry, that should have been "request changes" ;-) |
Is there a links to the docs that we can check? |
you just click on details: then artifacts/html/index.html https://1443-77234579-gh.circle-artifacts.com/0/html/index.html |
@ltalirz @greschd I've rolled back (i.e. commented out) the autodoc writer, because it doesn't work with referencing. From the current implementation, I'm pretty sure that has never worked. As I mention in #3300 (comment), I think the whole extension needs a bit of a re-write to fix this. |
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.
@csadorf can you review this, with respect to dependency changes ta. I updated the requirements as mentioned in: #4466 (comment)
I have one question, but generally fine w.r.t. the updates to the dependency specification.
Can you revert this? There are existing plugins using |
@greschd Unfortunately no. When I say revert, I mean revert from earlier in this PR. |
Ah yeah now I remember, that was #3689. I'm not sure referencing ever worked (although I think I was following some guide when writing the directive). Out of curiosity, why does the extension need to be rewritten for referencing to work? |
Basically we need to "integrate" it into the "py" domain, a bit like |
In, particular sphinx v2 -> v3
Also moved sphinxext testing to the official sphinx testing infrastructure
fixes #3689