From 4aa5acd18306bd9100d874be61451ad0d9f3a36e Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:11:11 -0400 Subject: [PATCH 1/9] update mambaforge version --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index e0dc1642..fbf80e08 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -13,7 +13,7 @@ sphinx: build: os: ubuntu-22.04 tools: - python: "mambaforge-4.10" + python: "mambaforge-22.9" conda: environment: environment-docs.yml From 7d5fad02a5c7c4ff1b93bdbfaedbba2d2141436d Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:55:58 -0400 Subject: [PATCH 2/9] Update Gabriel's affiliation --- .zenodo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zenodo.json b/.zenodo.json index a3c5fe69..b3adb6ae 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -11,7 +11,7 @@ }, { "name": "Rondeau-Genesse, Gabriel", - "affiliation": "Ouranos", + "affiliation": "Ouranos, Montréal, Québec, Canada", "orcid": "0000-0003-3389-9406" } ], From b791e46590a6a6bf19c0ca8f1108843cfa9bee94 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:58:52 -0400 Subject: [PATCH 3/9] change documentation target to ReadTheDocs --- README.rst | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index f52cffb3..105b341d 100644 --- a/README.rst +++ b/README.rst @@ -31,15 +31,14 @@ This package was created with Cookiecutter_ and the `Ouranosinc/cookiecutter-pyp .. |build| image:: https://github.com/hydrologie/xhydro/actions/workflows/main.yml/badge.svg :target: https://github.com/hydrologie/xhydro/actions :alt: Build Status - -.. |docs| image:: https://img.shields.io/badge/Docs-GitHub.io-blue - :target: https://hydrologie.github.io/xhydro/ - :alt: Documentation - .. - .. |docs| image:: https://readthedocs.org/projects/xhydro/badge/?version=latest - :target: https://xhydro.readthedocs.io/en/latest/?version=latest - :alt: Documentation Status + .. |docs| image:: https://img.shields.io/badge/Docs-GitHub.io-blue + :target: https://hydrologie.github.io/xhydro/ + :alt: Documentation + +.. |docs| image:: https://readthedocs.org/projects/xhydro/badge/?version=latest + :target: https://xhydro.readthedocs.io/en/latest/?version=latest + :alt: Documentation Status .. |license| image:: https://img.shields.io/pypi/l/xhydro :target: https://github.com/hydrologie/xhydro/blob/main/LICENSE From 363631f8bcb4875cd4d3ed5c8129a950670f95f5 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:59:12 -0400 Subject: [PATCH 4/9] spacing --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 105b341d..4f26dd1f 100644 --- a/README.rst +++ b/README.rst @@ -31,6 +31,7 @@ This package was created with Cookiecutter_ and the `Ouranosinc/cookiecutter-pyp .. |build| image:: https://github.com/hydrologie/xhydro/actions/workflows/main.yml/badge.svg :target: https://github.com/hydrologie/xhydro/actions :alt: Build Status + .. .. |docs| image:: https://img.shields.io/badge/Docs-GitHub.io-blue :target: https://hydrologie.github.io/xhydro/ From 4eb3ddaa988d720c326f21609b6b9e8816abd9e1 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 7 Sep 2023 12:02:32 -0400 Subject: [PATCH 5/9] add nbsphinx --- environment-docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment-docs.yml b/environment-docs.yml index 32509da7..b7a243d1 100644 --- a/environment-docs.yml +++ b/environment-docs.yml @@ -6,6 +6,7 @@ dependencies: - sphinx - furo - mock + - nbsphinx - pandoc - sphinx-autoapi - sphinx-codeautolink From ad416b663956e4bf921bc690d7450060b97bf83f Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 7 Sep 2023 12:08:49 -0400 Subject: [PATCH 6/9] update HISTORY.rst --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index d09ce762..0857372b 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,6 +9,7 @@ Contributors to this version: Trevor James Smith (:user:`Zeitsperre`), Gabriel R Announcements ^^^^^^^^^^^^^ * Support for Python3.8 and lower has been dropped. (:pull:`11`). +* `xHydro` now hosts its documentation on `Read the Docs `_. (:pull:`26`). New features and enhancements ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 4665f498e9828f392aef35d9267dbab5aae0d539 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 7 Sep 2023 13:01:41 -0400 Subject: [PATCH 7/9] remove duplicate black call, add workflow validators, update MANIFEST.in --- .pre-commit-config.yaml | 14 +++++++------- MANIFEST.in | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e9275b03..e25557ac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,6 +27,7 @@ repos: rev: 23.7.0 hooks: - id: black + args: [ '--target-version=py39' ] exclude: ^docs/ - repo: https://github.com/pycqa/flake8 rev: 6.1.0 @@ -34,12 +35,6 @@ repos: - id: flake8 additional_dependencies: [ 'flake8-rst-docstrings' ] args: ['--config=setup.cfg'] - - repo: https://github.com/psf/black - rev: 23.7.0 - hooks: - - id: black - exclude: ^docs/ - args: [ '--target-version=py39' ] - repo: https://github.com/PyCQA/isort rev: 5.12.0 hooks: @@ -55,7 +50,7 @@ repos: rev: v0.3.8 hooks: - id: blackdoc - additional_dependencies: [ 'black==23.3.0' ] + additional_dependencies: [ 'black==23.7.0' ] - repo: https://github.com/adrienverge/yamllint.git rev: v1.32.0 hooks: @@ -65,6 +60,11 @@ repos: rev: "0.49" hooks: - id: check-manifest + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.26.3 + hooks: + - id: check-github-workflows + - id: check-readthedocs - repo: meta hooks: - id: check-hooks-apply diff --git a/MANIFEST.in b/MANIFEST.in index 35ca6d1c..e0f7b6b7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -11,6 +11,8 @@ recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif recursive-include tests * recursive-exclude * __pycache__ recursive-exclude * *.py[co] +recursive-exclude docs apidocs *.rst +recursive-exclude docs _build * exclude .coveralls.yml exclude .cruft.json From 9d5f2831bbcea4e204ba00e3bd2302e95fda965f Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 7 Sep 2023 13:01:55 -0400 Subject: [PATCH 8/9] run autodoc and include todos --- .readthedocs.yml | 3 +++ docs/conf.py | 2 +- docs/index.rst | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index fbf80e08..5138f8f0 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -14,6 +14,9 @@ build: os: ubuntu-22.04 tools: python: "mambaforge-22.9" + jobs: + pre_build: + - sphinx-apidoc -o docs/apidoc --private --module-first xhydro conda: environment: environment-docs.yml diff --git a/docs/conf.py b/docs/conf.py index 20506e13..4d104faa 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -104,7 +104,7 @@ pygments_style = 'sphinx' # If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False +todo_include_todos = True # -- Options for HTML output ------------------------------------------- diff --git a/docs/index.rst b/docs/index.rst index 4d4f1fb4..3f2923f5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,7 +8,7 @@ Welcome to xHydro's documentation! readme installation usage - modules + apidoc/modules contributing authors history From 02f973701d567aea5bc2a04cbf17561e149f6b0e Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 7 Sep 2023 13:08:59 -0400 Subject: [PATCH 9/9] no need for _static folder at the moment --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 4d104faa..008ad7cc 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -123,7 +123,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +# html_static_path = ['_static'] # -- Options for HTMLHelp output ---------------------------------------