From 5f152744151060732e8266ae9e0c2f54d7259988 Mon Sep 17 00:00:00 2001 From: Sebastiaan Huber Date: Sun, 20 Feb 2022 18:25:21 +0100 Subject: [PATCH 1/2] Dependencies: update requirement `sphinx~=4.1` The builds on ReadTheDocs started failing. This was due to release `v2.1` of `markupsafe` that removed the module `markup_safe`. The version of `jinja==2.11.3` that was getting installed still imported this. This version is no longer supported and so they won't be fixing this incompatibility but instead one should use `jinja>3.0`. This is already a requirement for `aiida-core`, but the version of `sphinx~=3.2.1` that we were installing had an upper limit on `jinja` to not install v3 causing the version of jinja to be downgraded. The solution is to update the version of sphinx which no longer has this limitation of `jinja`. Finally, we need to require `sphinx~=4.1`, because `v4.0.x` puts an upper limit `markupsafe<2.0` which is incompatible with `jinja~3.0` but this upper limit was removed later on. --- pyproject.toml | 10 +++++----- requirements/requirements-py-3.10.txt | 8 ++++---- requirements/requirements-py-3.8.txt | 8 ++++---- requirements/requirements-py-3.9.txt | 8 ++++---- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dc6689a0ab..b1000eb6fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,11 +78,11 @@ rest = [ docs = [ "docutils==0.15.2", "pygments~=2.5", - "pydata-sphinx-theme~=0.6.3", - "sphinx~=3.2.1", + "pydata-sphinx-theme~=0.8.0", + "sphinx~=4.1", "sphinxcontrib-details-directive~=0.1.0", - "sphinx-panels~=0.5.0", - "sphinx-copybutton~=0.3.0", + "sphinx-panels~=0.6.0", + "sphinx-copybutton~=0.5.0", "sphinx-notfound-page~=0.5", "sphinxext-rediraffe~=0.2.4", "sphinx-sqlalchemy~=0.1.1" @@ -125,7 +125,7 @@ tests = [ "pympler~=0.9", "coverage<5.0", "sqlalchemy-utils~=0.37.2", - "sphinx~=3.2.1" + "sphinx~=4.1" ] bpython = [ "bpython~=0.18.0" diff --git a/requirements/requirements-py-3.10.txt b/requirements/requirements-py-3.10.txt index 3f8594e616..cbfab10afe 100644 --- a/requirements/requirements-py-3.10.txt +++ b/requirements/requirements-py-3.10.txt @@ -100,7 +100,7 @@ py==1.11.0 py-cpuinfo==8.0.0 PyCifRW==4.4.3 pycparser==2.21 -pydata-sphinx-theme==0.6.3 +pydata-sphinx-theme==0.8.0 Pygments==2.10.0 pymatgen==2022.1.9 Pympler==0.9 @@ -137,10 +137,10 @@ six==1.16.0 snowballstemmer==2.2.0 soupsieve==2.3.1 spglib==1.16.1 -Sphinx==3.2.1 -sphinx-copybutton==0.3.3 +Sphinx==4.4.0 +sphinx-copybutton==0.5.0 sphinx-notfound-page==0.8 -sphinx-panels==0.5.2 +sphinx-panels==0.6.0 sphinx-sqlalchemy==0.1.1 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-details-directive==0.1.0 diff --git a/requirements/requirements-py-3.8.txt b/requirements/requirements-py-3.8.txt index c2f9ac7841..fce457dc34 100644 --- a/requirements/requirements-py-3.8.txt +++ b/requirements/requirements-py-3.8.txt @@ -101,7 +101,7 @@ py==1.11.0 py-cpuinfo==8.0.0 PyCifRW==4.4.3 pycparser==2.21 -pydata-sphinx-theme==0.6.3 +pydata-sphinx-theme==0.8.0 Pygments==2.10.0 pymatgen==2022.0.16 Pympler==0.9 @@ -139,10 +139,10 @@ six==1.16.0 snowballstemmer==2.2.0 soupsieve==2.3.1 spglib==1.16.1 -Sphinx==3.2.1 -sphinx-copybutton==0.3.3 +Sphinx==4.4.0 +sphinx-copybutton==0.5.0 sphinx-notfound-page==0.8 -sphinx-panels==0.5.2 +sphinx-panels==0.6.0 sphinx-sqlalchemy==0.1.1 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-details-directive==0.1.0 diff --git a/requirements/requirements-py-3.9.txt b/requirements/requirements-py-3.9.txt index a4560d081b..e75d0af495 100644 --- a/requirements/requirements-py-3.9.txt +++ b/requirements/requirements-py-3.9.txt @@ -100,7 +100,7 @@ py==1.11.0 py-cpuinfo==8.0.0 PyCifRW==4.4.3 pycparser==2.21 -pydata-sphinx-theme==0.6.3 +pydata-sphinx-theme==0.8.0 Pygments==2.10.0 pymatgen==2022.0.16 Pympler==0.9 @@ -138,10 +138,10 @@ six==1.16.0 snowballstemmer==2.2.0 soupsieve==2.3.1 spglib==1.16.1 -Sphinx==3.2.1 -sphinx-copybutton==0.3.3 +Sphinx==4.4.0 +sphinx-copybutton==0.5.0 sphinx-notfound-page==0.8 -sphinx-panels==0.5.2 +sphinx-panels==0.6.0 sphinx-sqlalchemy==0.1.1 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-details-directive==0.1.0 From b8d90be4599657fd0a9e38e2154f08e567a829a3 Mon Sep 17 00:00:00 2001 From: Sebastiaan Huber Date: Mon, 21 Feb 2022 16:28:31 +0100 Subject: [PATCH 2/2] Add nitpick exceptions and update test reference XML --- docs/source/nitpick-exceptions | 3 ++ .../sphinxext/reference_results/workchain.xml | 32 +++++++++---------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/docs/source/nitpick-exceptions b/docs/source/nitpick-exceptions index bc87aa31aa..5db7831d9a 100644 --- a/docs/source/nitpick-exceptions +++ b/docs/source/nitpick-exceptions @@ -29,6 +29,9 @@ py:class TransactionType py:class ReturnType py:class function py:class traceback +py:class ExternalType +py:class TypeDecorator +py:class UserDefinedType py:class a py:class c py:class d diff --git a/tests/sphinxext/reference_results/workchain.xml b/tests/sphinxext/reference_results/workchain.xml index 8d487bb2f8..9015e0661e 100644 --- a/tests/sphinxext/reference_results/workchain.xml +++ b/tests/sphinxext/reference_results/workchain.xml @@ -1,14 +1,14 @@ - +
sphinx-aiida demo This is a demo documentation to show off the features of the sphinx-aiida extension. - workchaindemo_workchain.DemoWorkChain + workchaindemo_workchain.DemoWorkChain A demo workchain to show how the workchain auto-documentation works. @@ -25,7 +25,7 @@ finalize If you want to hide the inputs that are not stored as nodes in the database, use the :hide-unstored-inputs: option. - workchaindemo_workchain.DemoWorkChain + workchaindemo_workchain.DemoWorkChain A demo workchain to show how the workchain auto-documentation works. @@ -42,7 +42,7 @@ finalize The namespaces can be set to expand by default, using the :expand-namespaces: option. - workchaindemo_workchain.DemoWorkChain + workchaindemo_workchain.DemoWorkChain A demo workchain to show how the workchain auto-documentation works. @@ -59,7 +59,7 @@ finalize The following workchain checks that the directive works also when no outline is specified: - workchaindemo_workchain.EmptyOutlineWorkChain + workchaindemo_workchain.EmptyOutlineWorkChain Here we check that the directive works even if the outline is empty. @@ -73,13 +73,13 @@ finalize This module defines an example workchain for the aiida-workchain documentation directive. - - class demo_workchain.DemoWorkChain*args: Any**kwargs: Any + + class demo_workchain.DemoWorkChain*args: Any**kwargs: Any A demo workchain to show how the workchain auto-documentation works. - - classmethod definespec + + classmethod definespec Define the specification of the process, including its inputs, outputs and known exit codes. A metadata input namespace is defined, with optional ports that are not stored in the database. @@ -88,13 +88,13 @@ finalize - - class demo_workchain.EmptyOutlineWorkChain*args: Any**kwargs: Any + + class demo_workchain.EmptyOutlineWorkChain*args: Any**kwargs: Any Here we check that the directive works even if the outline is empty. - - classmethod definespec + + classmethod definespec Define the specification of the process, including its inputs, outputs and known exit codes. A metadata input namespace is defined, with optional ports that are not stored in the database. @@ -103,11 +103,11 @@ finalize - - class demo_workchain.NormalClass + + class demo_workchain.NormalClass This is here to check that we didn’t break the regular autoclass.
-
+
\ No newline at end of file