-
-
Notifications
You must be signed in to change notification settings - Fork 434
docs: fix sphinx build warnings and broken cross-references #7526
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
c6ce9d7
c5b3f5e
1357dd2
2c8b360
8128a30
812e147
a0b135c
d69099e
90e4f0f
ad0013f
e426ab0
25c9c33
e8e44b9
08b5eb8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,8 @@ | |
| import string | ||
| from shutil import copy | ||
|
|
||
| from _pickleable import table_fix, derender_toc | ||
|
|
||
| # If extensions (or modules to document with autodoc) are in another directory, | ||
| # add these directories to sys.path here. If the directory is relative to the | ||
| # documentation root, use os.path.abspath to make it absolute, like shown here. | ||
|
|
@@ -89,7 +91,7 @@ | |
| ) | ||
|
|
||
| grass_version = core.version()["version"] | ||
| today = date.today() | ||
| today = date.today().strftime("%B %d, %Y") | ||
|
|
||
| copy("_templates/layout.html.template", "_templates/layout.html") | ||
|
|
||
|
|
@@ -114,6 +116,31 @@ | |
| "sphinx_sitemap", | ||
| ] | ||
|
|
||
| # When building docs, compiled GRASS extension modules (C libraries) may not | ||
| # be importable; mock them so autodoc can proceed using the pure-Python | ||
| # checkout sources. | ||
| autodoc_mock_imports = ["grass.lib", "grass.lib.gis"] | ||
|
Comment on lines
+118
to
+121
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I'm curious to see what it'll generate. I'll probably want to do a diff of the generated artifacts before and after (this PR) to see what pages miss content.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @echoix Do you see any differences?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still the list entries in dist.x86_64-pc-linux-gnu/docs/html/libpython/pygrass_gis.html are no longer hyperlinks. Weird...
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It’s probably something else in the PR, not only this line… but I don’t know easily without diffing after each change incrementally. Or we let it « degrade » the output docs just to have it done |
||
|
|
||
|
|
||
| # Skip temporal lexer rule methods because their regex docstrings are not intended | ||
| # for reStructuredText parsing and only serve PLY token definitions. | ||
| def skip_member(app, what, name, obj, skip, options): | ||
| if name.startswith("t_"): | ||
| mod = getattr(obj, "__module__", None) | ||
| if mod in { | ||
| "grass.temporal.temporal_algebra", | ||
| "grass.temporal.temporal_operator", | ||
| "temporal.temporal_algebra", | ||
| "temporal.temporal_operator", | ||
| }: | ||
| return True | ||
| return None | ||
|
|
||
|
|
||
| def setup(app): | ||
| app.connect("autodoc-skip-member", skip_member) | ||
|
|
||
|
|
||
| # Add any paths that contain templates here, relative to this directory. | ||
| templates_path = ["_templates"] | ||
|
|
||
|
|
@@ -192,7 +219,6 @@ | |
| "repo_url": "https://github.com/OSGeo/grass/", | ||
| "repo_name": "GRASS", | ||
| "repo_type": "github", | ||
| "logo": "grass_logo.svg", | ||
|
echoix marked this conversation as resolved.
|
||
| # Visible levels of the global TOC; -1 means unlimited | ||
| "globaltoc_depth": 1, | ||
| # If False, expand all TOC entries | ||
|
|
@@ -243,6 +269,14 @@ | |
| ], | ||
| } | ||
|
|
||
| # Make html_context cacheable by replacing theme's class objects with | ||
| # pickleable proxy instances. The theme stores class objects (type instances) | ||
| # in html_context which Sphinx's is_serializable() conservatively rejects. | ||
| html_context = { | ||
| "table_fix": table_fix, | ||
| "derender_toc": derender_toc, | ||
| } | ||
|
|
||
| # Add any paths that contain custom themes here, relative to this directory. | ||
| # html_theme_path = [] | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ caused by C library functions does not influence the main testing process. | |
|
|
||
| Some tests will run without any data but many tests require | ||
| the small (basic) version of GRASS sample Location for North Carolina | ||
| (see `GRASS sample data`). | ||
| (see `GRASS sample data testing`). | ||
|
neteler marked this conversation as resolved.
Outdated
|
||
|
|
||
| Basic example | ||
| ------------- | ||
|
|
@@ -506,8 +506,6 @@ However, do not use use doctest for tests of edge cases, for tests which require | |
| generate complex data first, etc. In these cases use `gunittest`. | ||
|
|
||
|
|
||
| .. _test-as-scripts: | ||
|
|
||
| Tests as general scripts | ||
| ------------------------ | ||
|
|
||
|
|
@@ -716,9 +714,8 @@ Further reading | |
|
|
||
|
|
||
| .. _unittest: https://docs.python.org/2/library/unittest.html | ||
|
neteler marked this conversation as resolved.
Outdated
|
||
| .. _doctest: https://docs.python.org/2/library/doctest.html | ||
| .. _Coverity Scan: https://scan.coverity.com/ | ||
| .. _1038: https://scan.coverity.com/projects/1038 | ||
| .. _Cppcheck: http://cppcheck.sourceforge.net/ | ||
| .. _sandbox: https://svn.osgeo.org/grass/sandbox/wenzeslaus/grass_py_static_check.py | ||
| .. _GRASS sample data: https://grass.osgeo.org/download/data/ and http://fatra.cnr.ncsu.edu/data/ (nc_spm_full_v2beta1) | ||
| .. _GRASS sample data: https://grass.osgeo.org/download/data/ and http://fatra.cnr.ncsu.edu/data/ (nc_spm_full_v2alpha2) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the v2 alpha 2 really the successor of v2 beta 1?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess not but this is what is stored in the fatra server. Maybe something missing there, @wenzeslaus ?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Found the |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,31 +23,28 @@ at various levels: | |
| * `grass.jupyter package <grass.jupyter.html>`_ offers classes and setup functions for | ||
| running GRASS in Jupyter Notebooks | ||
| * `Testing GRASS source code and modules <gunittest_testing.html>`_ using gunittest package | ||
| * `exceptions package <exceptions.html>`_ contains exceptions used by other packages | ||
| * `exceptions package <grass.exceptions.html>`_ contains exceptions used by other packages | ||
| * `imaging package <imaging.html>`_ is a library to create animated images and films | ||
| * `pydispatch package <pydispatch.html>`_ is a library for signal-dispatching | ||
|
|
||
| -------------------- | ||
| Additional Resources | ||
| -------------------- | ||
| * `GRASS Python introduction <manuals/python_intro.html>`_ provides a general overview of | ||
| * `GRASS Python introduction <../python_intro.html>`_ provides a general overview of | ||
| the Python interface to GRASS. | ||
| * `GRASS Jupyter notebooks introduction <manuals/jupyter_intro.html>`_ provides an overview of how to use the **grass.jupyter** module. | ||
|
|
||
| .. _GRASS: https://grass.osgeo.org/ | ||
| * `GRASS Jupyter notebooks introduction <../jupyter_intro.html>`_ provides an overview of how to use the **grass.jupyter** module. | ||
|
|
||
| -------------------- | ||
| Modules and Packages | ||
| -------------------- | ||
| .. toctree:: | ||
| :maxdepth: 1 | ||
| :maxdepth: 1 | ||
|
|
||
| index | ||
| grass.tools | ||
| script_intro | ||
| pygrass_index | ||
| grass.jupyter | ||
| exceptions | ||
| imaging | ||
| pydispatch | ||
| gunittest_testing | ||
| grass | ||
| script_intro | ||
| pygrass_index | ||
| exceptions | ||
| imaging | ||
| pydispatch | ||
| temporal_framework | ||
| gunittest_testing | ||
|
Comment on lines
+45
to
+54
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it intended to remove grass.tools ? It seems like a new api that could have been replaced if the ai tool based itself on old pages
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have restored Re:
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| .. _raster-label: | ||
|
|
||
| Introduction to Raster classes | ||
| ============================== | ||
|
|
||
|
|
||








Uh oh!
There was an error while loading. Please reload this page.