-
Notifications
You must be signed in to change notification settings - Fork 524
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
DOC: Add slicer.parameterNodeWrapper autodocs #6876
Draft
allemangD
wants to merge
6
commits into
Slicer:main
Choose a base branch
from
allemangD:parameter-node-wrapper-autodoc
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following error is reported on readthedocs:
This happens because the Footnotes |
jcfr
force-pushed
the
parameter-node-wrapper-autodoc
branch
from
March 13, 2023 22:57
95d2b9f
to
f9b2345
Compare
The generation is currently failing with the following error:
|
jcfr
force-pushed
the
parameter-node-wrapper-autodoc
branch
2 times, most recently
from
March 15, 2023 07:06
3c4066f
to
f4195e3
Compare
jcfr
force-pushed
the
parameter-node-wrapper-autodoc
branch
from
November 2, 2023 03:24
f4195e3
to
1beee3f
Compare
This commit allows to successfully import the package from a standalone python console (e.g PythonSlicer). Supporting this is helpful in the context of documentation generation and IDE integration.
…ment This commit fixes the error reported below by ensuring the path to the "slicer" package available in the source tree is prepended only if not already available from the Slicer Python environment where modules like MRMLCorePython have been successfully imported. Note that since "slicer.kits" is only available in the Slicer Python environment, its presence usually indicates that (1) the slicer module is available and (2) the kits (mrml, vtkAddon, vtkSegmentationCore, ..) have been imported. Error: WARNING: autodoc: failed to import module 'parameterNodeWrapper' from module 'slicer'; the following exception was raised: Traceback (most recent call last): [...] File "/path/to/Slicer/Base/Python/slicer/parameterNodeWrapper/__init__.py", line 5, in <module> from .guiConnectors import * File "/path/to/Slicer/Base/Python/slicer/parameterNodeWrapper/guiConnectors.py", line 16, in <module> from . import parameterPack as pack File "/path/to/Slicer/Base/Python/slicer/parameterNodeWrapper/parameterPack.py", line 10, in <module> from .serializers import ( File "/path/to/Slicer/Base/Python/slicer/parameterNodeWrapper/serializers.py", line 402, in <module> class NodeSerializer(Serializer): File "/path/to/Slicer/Base/Python/slicer/parameterNodeWrapper/serializers.py", line 424, in NodeSerializer def write(self, parameterNode, name: str, value: slicer.vtkMRMLNode) -> None: AttributeError: module 'slicer' has no attribute 'vtkMRMLNode'
Since mrml and vtkAddon classes are associated with the slicer package, they should be documented accordingly.
jcfr
force-pushed
the
parameter-node-wrapper-autodoc
branch
from
December 5, 2023 18:17
1beee3f
to
46ef80c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Status: Draft
This pull-request is not yet ready for integration
Type: Documentation
Issues regarding documentation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
slicer.parameterNodeWrapper
automodule to the Slicer Python API documentation.Currently this fails because sphinx does not have access to the extension types in the Slicer namespace. See #6875 for more details.