From 977dadfd601f09633146283b177b33ad205dab5b Mon Sep 17 00:00:00 2001 From: Trevor Morgan Date: Mon, 8 Aug 2022 16:02:26 -0700 Subject: [PATCH 01/13] using constraints for installation while pointing towards toml --- .github/workflows/docs.yaml | 6 +++--- .github/workflows/pytest.yaml | 6 +++--- pyproject.toml | 4 ++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 7eedef4c4..f7297841f 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -61,13 +61,13 @@ jobs: uses: actions/cache@v3.0.6 with: path: ${{ steps.prepare-cache-pip.outputs.cache-dir }} - key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/setup.cfg') }} + key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/pyproject.toml') }} restore-keys: | ${{ runner.os }}-${{ matrix.python-version }}-pip- - - name: install requirements.txt + - name: install docs dependancies run: | - pip install -r requirements.txt + pip install -c requirements.txt .[docs] - name: install broadbean run: pip install . - name: Build docs on linux diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index e8d044c7a..b6f62eae1 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -44,12 +44,12 @@ jobs: uses: actions/cache@v3.0.6 with: path: ${{ steps.prepare-cache-pip.outputs.cache-dir }} - key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/setup.cfg') }} + key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/pyproject.toml') }} restore-keys: | ${{ runner.os }}-${{ matrix.python-version }}-pip- - - name: install requirements.txt + - name: installtest dependancies run: | - pip install -r requirements.txt + pip install .[test] -c requirements.txt - name: install broadbean run: | pip install . diff --git a/pyproject.toml b/pyproject.toml index 6318e0ba8..8ddd81c71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,10 @@ test = [ "jupyter>=1.0.0", "hypothesis>=5.49.0", ] +docs = [ + "sphinx", + "sphinx_rtd_theme", +] [tool.pytest.ini_options] From ecf67218e60121804c17759b951a17dc1074d2fe Mon Sep 17 00:00:00 2001 From: Trevor Morgan Date: Mon, 8 Aug 2022 16:10:35 -0700 Subject: [PATCH 02/13] missing dep for docs --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 8ddd81c71..546b8287d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,6 +55,7 @@ test = [ docs = [ "sphinx", "sphinx_rtd_theme", + "nbsphinx", ] From a704bb7371cf40065eb770a9cfc4d6a33c1ad08e Mon Sep 17 00:00:00 2001 From: Trevor Morgan Date: Mon, 8 Aug 2022 16:12:56 -0700 Subject: [PATCH 03/13] missing dep for docs --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 546b8287d..24a6fbcc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,6 +56,7 @@ docs = [ "sphinx", "sphinx_rtd_theme", "nbsphinx", + "sphinx-jsonschema", ] From 8a44c7dac478f4b52809e155bae6bd5e80a5e087 Mon Sep 17 00:00:00 2001 From: Trevor Morgan Date: Mon, 8 Aug 2022 16:20:37 -0700 Subject: [PATCH 04/13] need to import hypothesis for auto docs --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 24a6fbcc2..9a340182d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,7 @@ dependencies = [ "matplotlib", "schema", "versioningit>=2.0.1", + "hypothesis>=5.49.0", ] dynamic = ["version"] @@ -50,7 +51,6 @@ test = [ "mypy>=0.960", "types-pytz>=2021.3.0", "jupyter>=1.0.0", - "hypothesis>=5.49.0", ] docs = [ "sphinx", From 1a82cd3deb6da3deb1c5738707596487a3a83d9f Mon Sep 17 00:00:00 2001 From: Trevor Morgan Date: Mon, 8 Aug 2022 16:27:44 -0700 Subject: [PATCH 05/13] need to install all dep for docs due to auto doc --- .github/workflows/docs.yaml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index f7297841f..63283b94e 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -67,7 +67,7 @@ jobs: - name: install docs dependancies run: | - pip install -c requirements.txt .[docs] + pip install -c requirements.txt .[docs,tests] - name: install broadbean run: pip install . - name: Build docs on linux diff --git a/pyproject.toml b/pyproject.toml index 9a340182d..24a6fbcc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,6 @@ dependencies = [ "matplotlib", "schema", "versioningit>=2.0.1", - "hypothesis>=5.49.0", ] dynamic = ["version"] @@ -51,6 +50,7 @@ test = [ "mypy>=0.960", "types-pytz>=2021.3.0", "jupyter>=1.0.0", + "hypothesis>=5.49.0", ] docs = [ "sphinx", From 3999bd2316228b4fb92a0b9119a3d1e7bc3a37cd Mon Sep 17 00:00:00 2001 From: Trevor Morgan Date: Mon, 8 Aug 2022 16:33:28 -0700 Subject: [PATCH 06/13] duplicate install removed --- .github/workflows/docs.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 63283b94e..a9c4d2eb4 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -65,11 +65,9 @@ jobs: restore-keys: | ${{ runner.os }}-${{ matrix.python-version }}-pip- - - name: install docs dependancies + - name: install broadbean & docs dependancies run: | pip install -c requirements.txt .[docs,tests] - - name: install broadbean - run: pip install . - name: Build docs on linux run: | cd docs From 2155c9a199dbbc2d6de514100ba1f153fc100ce3 Mon Sep 17 00:00:00 2001 From: Trevor Morgan Date: Mon, 8 Aug 2022 16:48:59 -0700 Subject: [PATCH 07/13] fix synatx error --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index a9c4d2eb4..c4cb2cee6 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -67,7 +67,7 @@ jobs: - name: install broadbean & docs dependancies run: | - pip install -c requirements.txt .[docs,tests] + pip install -c requirements.txt .[docs,test] - name: Build docs on linux run: | cd docs From f5fee53ea968c81cf4fd4a8bcc2bb9d6cdf026f3 Mon Sep 17 00:00:00 2001 From: Trevor Morgan <63689909+trevormorgan@users.noreply.github.com> Date: Tue, 9 Aug 2022 11:56:24 -0700 Subject: [PATCH 08/13] Update .github/workflows/pytest.yaml Co-authored-by: Jens Hedegaard Nielsen --- .github/workflows/pytest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index b6f62eae1..be3557f9a 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -47,7 +47,7 @@ jobs: key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/pyproject.toml') }} restore-keys: | ${{ runner.os }}-${{ matrix.python-version }}-pip- - - name: installtest dependancies + - name: install broadbean with test dependencies run: | pip install .[test] -c requirements.txt - name: install broadbean From 72c1d5c231918b91e21a65d86b2fa5fd539bba67 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 9 Aug 2022 18:56:30 +0000 Subject: [PATCH 09/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/pytest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index be3557f9a..abf7fc441 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -47,7 +47,7 @@ jobs: key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/pyproject.toml') }} restore-keys: | ${{ runner.os }}-${{ matrix.python-version }}-pip- - - name: install broadbean with test dependencies + - name: install broadbean with test dependencies run: | pip install .[test] -c requirements.txt - name: install broadbean From 7a75b6dbcf3f640a272b8c1e21edcc01699bd0a5 Mon Sep 17 00:00:00 2001 From: Trevor Morgan <63689909+trevormorgan@users.noreply.github.com> Date: Tue, 9 Aug 2022 11:57:02 -0700 Subject: [PATCH 10/13] Update .github/workflows/docs.yaml Co-authored-by: Jens Hedegaard Nielsen --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index c4cb2cee6..363ac1e2a 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -65,7 +65,7 @@ jobs: restore-keys: | ${{ runner.os }}-${{ matrix.python-version }}-pip- - - name: install broadbean & docs dependancies + - name: install broadbean & docs dependencies run: | pip install -c requirements.txt .[docs,test] - name: Build docs on linux From a0d55047560e9e4061d973cb343806dc37b70b39 Mon Sep 17 00:00:00 2001 From: Trevor Morgan <63689909+trevormorgan@users.noreply.github.com> Date: Tue, 9 Aug 2022 11:57:15 -0700 Subject: [PATCH 11/13] Update .github/workflows/docs.yaml Co-authored-by: Jens Hedegaard Nielsen --- .github/workflows/docs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 363ac1e2a..4733d39ec 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -68,6 +68,7 @@ jobs: - name: install broadbean & docs dependencies run: | pip install -c requirements.txt .[docs,test] + # currently we are building api docs of the whole package including tests so we need to be able to import the tests and therefore require test dependencies to build the docs. - name: Build docs on linux run: | cd docs From 9815b2af90c9555aa09b16f82b98ccb9f1e45854 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 9 Aug 2022 18:57:26 +0000 Subject: [PATCH 12/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/docs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 4733d39ec..473bf0524 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -65,10 +65,10 @@ jobs: restore-keys: | ${{ runner.os }}-${{ matrix.python-version }}-pip- - - name: install broadbean & docs dependencies + - name: install broadbean & docs dependencies run: | pip install -c requirements.txt .[docs,test] - # currently we are building api docs of the whole package including tests so we need to be able to import the tests and therefore require test dependencies to build the docs. + # currently we are building api docs of the whole package including tests so we need to be able to import the tests and therefore require test dependencies to build the docs. - name: Build docs on linux run: | cd docs From fdb8506592189bea68b61c53ec2cdd3c5270569c Mon Sep 17 00:00:00 2001 From: Trevor Morgan Date: Tue, 9 Aug 2022 12:03:40 -0700 Subject: [PATCH 13/13] remove unneeded install --- .github/workflows/pytest.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index abf7fc441..c798bc1d3 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -50,9 +50,6 @@ jobs: - name: install broadbean with test dependencies run: | pip install .[test] -c requirements.txt - - name: install broadbean - run: | - pip install . - name: Run Mypy run: mypy -p broadbean - name: Run tests