diff --git a/doc/Makefile b/doc/Makefile index 0cb75f02da3..7b22f4b70a1 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -6,7 +6,7 @@ SUBDIRS = \ include $(MODULE_TOPDIR)/include/Make/Dir.make FILES := $(wildcard *.html) -# So far, we disntinguished user and contributor documentation here by +# So far, we distinguished user and contributor documentation here by # extension. This is no longer possible with Markdown. MDFILES := grass_database.md \ projectionintro.md \ diff --git a/python/grass/docs/conf.py b/python/grass/docs/conf.py index 1e35ec8aa26..01c46232f08 100644 --- a/python/grass/docs/conf.py +++ b/python/grass/docs/conf.py @@ -89,7 +89,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 +114,28 @@ "sphinx_sitemap", ] + +# Skip temporal lexer rule methods because their regex docstrings are not intended +# for reStructuredText parsing and only serve PLY token definitions. The modules +# are checked under both names because the sys.path entries above make them +# importable both as grass.temporal.* and as temporal.*. +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 +214,6 @@ "repo_url": "https://github.com/OSGeo/grass/", "repo_name": "GRASS", "repo_type": "github", - "logo": "grass_logo.svg", # Visible levels of the global TOC; -1 means unlimited "globaltoc_depth": 1, # If False, expand all TOC entries diff --git a/python/grass/docs/src/gunittest_running_tests.rst b/python/grass/docs/src/gunittest_running_tests.rst index 26c2d269ae9..4ccccbcf523 100644 --- a/python/grass/docs/src/gunittest_running_tests.rst +++ b/python/grass/docs/src/gunittest_running_tests.rst @@ -108,9 +108,9 @@ Running tests and creating report Currently there is full support only for running all the tests in the small (basic) version of GRASS sample Location for North Carolina -(see `GRASS sample data`). +(see `GRASS sample data`_). -.. _GRASS sample data: https://grass.osgeo.org/download/sample-data +.. _GRASS sample data: https://grass.osgeo.org/download/data/ Example Bash script to run be used as a cron job diff --git a/python/grass/docs/src/gunittest_testing.rst b/python/grass/docs/src/gunittest_testing.rst index 4650e181404..0fa9b74d144 100644 --- a/python/grass/docs/src/gunittest_testing.rst +++ b/python/grass/docs/src/gunittest_testing.rst @@ -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`_). Basic example ------------- @@ -715,10 +715,9 @@ Further reading gunittest_running_tests -.. _unittest: https://docs.python.org/2/library/unittest.html -.. _doctest: https://docs.python.org/2/library/doctest.html +.. _unittest: https://docs.python.org/3/library/unittest.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/sampledata/north_carolina/ diff --git a/python/grass/docs/src/index.rst b/python/grass/docs/src/index.rst index 27065f00d73..5ae76b82258 100644 --- a/python/grass/docs/src/index.rst +++ b/python/grass/docs/src/index.rst @@ -42,7 +42,7 @@ Modules and Packages .. toctree:: :maxdepth: 1 - index + grass grass.tools script_intro pygrass_index @@ -50,4 +50,5 @@ Modules and Packages exceptions imaging pydispatch + temporal_framework gunittest_testing