-
Notifications
You must be signed in to change notification settings - Fork 91
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
Documentation remove gpu dependency #398
base: main
Are you sure you want to change the base?
Documentation remove gpu dependency #398
Conversation
/ok to test |
2 similar comments
/ok to test |
/ok to test |
|
/ok to test |
Preview looks good. merged main and removed the todo comments. Kicked a fresh CI for the requirements and sanity |
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.
I think we'll need to hold off and fix both doc issues at once, see below.
cuda_core/docs/source/conf.py
Outdated
@@ -95,6 +95,8 @@ | |||
|
|||
section_titles = ["Returns"] | |||
|
|||
autodoc_mock_imports = ["cuda"] |
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.
Q: What does this do?
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.
From the sphinx autodoc documentation:
This value contains a list of modules to be mocked up. This is useful when some external dependencies are not met at build time and break the building process. You may only specify the root package of the dependencies themselves and omit the sub-modules:
autodoc_mock_imports = ['django']
Will mock all imports under the django package.
Added in version 1.3.
Changed in version 1.6: This config value only requires to declare the top-level modules that should be mocked.
Effectively what this does is prevent cuda.XXX from being imported for use in the documentation build process. Explicitely importing cuda.core.XXX works around the mock so the documentation whcih gets generated is correct per the doc preview.
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.
This is basically the only change. It exposed a syntax error in the memeoryview documentation, hence that change. Otherwise it would be a 1-liner
da6310d
to
dfd383d
Compare
close #326
mock the import of cuda so that non explicit imports (cuda.core.XXX) do not try to import and cause a gpu runner dependency