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/.readthedocs.yml b/.readthedocs.yml index e0dc1642..5138f8f0 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -13,7 +13,10 @@ sphinx: build: os: ubuntu-22.04 tools: - python: "mambaforge-4.10" + python: "mambaforge-22.9" + jobs: + pre_build: + - sphinx-apidoc -o docs/apidoc --private --module-first xhydro conda: environment: environment-docs.yml 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" } ], 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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 diff --git a/README.rst b/README.rst index f52cffb3..4f26dd1f 100644 --- a/README.rst +++ b/README.rst @@ -32,14 +32,14 @@ This package was created with Cookiecutter_ and the `Ouranosinc/cookiecutter-pyp :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 diff --git a/docs/conf.py b/docs/conf.py index 20506e13..008ad7cc 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 ------------------------------------------- @@ -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 --------------------------------------- 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 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