You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 69c8e68
Browse filesBrowse the repository at this point in the historyBrowse files
test(core): add cuda.core.__all__ vs public docs consistency check (NVIDIA#2347)
* test(core): add cuda.core.__all__ vs public docs consistency check
ClosesNVIDIA#2326.
Parses docs/source/api.rst (autosummary entries and data directives while
cuda.core is the active module) and compares the flat public names against
cuda.core.__all__ in both directions. Dotted entries such as graph.Graph or
checkpoint.Process are submodule namespaces and are excluded. Symbols
documented in api_private.rst are accepted as documented so returned-helper
docs do not fail the check.
The tests skip when cuda.core.__all__ is not defined, so this lands
independently of NVIDIA#2300 and activates once NVIDIA#2300 merges. Also adds the
__all__-names-resolve guard suggested in the NVIDIA#2300 review.
Signed-off-by: Aryan <[email protected]>
* test(core): land cuda.core.__all__ and extend docs check to public subpackages
Addresses review feedback that the consistency check was too narrow:
- Define cuda.core.__all__ (flat public namespace) so the check runs instead
of skipping, and add an aggregated __all__ to cuda.core.graph derived from
its star-imported submodules.
- Auto-discover public subpackages from cuda.core.__path__ (graph, system,
texture, utils, and any added later; the internal cuNN wheel shims are
excluded) and assert each defines a fully resolvable __all__.
- Cross-check each documented subpackage's __all__ against api.rst, handling
both the dotted (graph.Graph) and flat (currentmodule) doc conventions.
system is documented in api_nvml.rst, so its doc cross-check is skipped.
* test(core): parse API docs with docutils
* Update content to pass current tests
* Add docutils dependency to pyproject.toml
* Simplify checks. No longer make sure that everything documented is public.
* test(core): document intentional scope limits of api docs consistency check
* Reorganize __all__
* Fix doc reference
* Address findings in PR
* Fix tests and make __all__ construction consistent
* test(core): drop IPC types from _memory package contents expectation
_ipc.__all__ is now empty, so `from cuda.core._memory import *` no longer
binds IPCAllocationHandle or IPCBufferDescriptor. Update the expected list
in test_package_contents to match.
Signed-off-by: Aryan <[email protected]>
---------
Signed-off-by: Aryan <[email protected]>
Co-authored-by: Michael Droettboom <[email protected]>
Co-authored-by: Michael Droettboom <[email protected]>
0 commit comments