From 2e6fbc03e4308329f53a284d374b190a0d873941 Mon Sep 17 00:00:00 2001 From: "Kevin R. Thornton" Date: Wed, 20 Nov 2024 10:09:30 -0800 Subject: [PATCH 1/6] reorg requirements files to separate reproducible CI from general deps --- demes-spec | 2 +- requirements/docs.txt | 10 +- requirements/lint.txt | 6 +- requirements/minimal.txt | 4 +- requirements/tests.txt | 10 +- requirements_CI.txt | 365 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 381 insertions(+), 16 deletions(-) create mode 100644 requirements_CI.txt diff --git a/demes-spec b/demes-spec index b2341f1..0f5fa52 160000 --- a/demes-spec +++ b/demes-spec @@ -1 +1 @@ -Subproject commit b2341f13e51808f3849a2253c188549c163525a8 +Subproject commit 0f5fa522fd9c79eb01f37931574a703305ac8add diff --git a/requirements/docs.txt b/requirements/docs.txt index 52787e3..4bed167 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,5 +1,5 @@ -demesdraw==0.4.0 -jupyter-book==0.15.1 -piccolo_theme==0.19.0 -sphinx_issues==3.0.1 -sphinxcontrib-programoutput==0.17 +demesdraw +jupyter-book +piccolo_theme +sphinx_issues +sphinxcontrib-programoutput diff --git a/requirements/lint.txt b/requirements/lint.txt index 015020f..355ed83 100644 --- a/requirements/lint.txt +++ b/requirements/lint.txt @@ -1,3 +1,3 @@ -black==23.11.0 -flake8==6.1.0 -mypy==1.9.0 +black +flake8 +mypy diff --git a/requirements/minimal.txt b/requirements/minimal.txt index aa4ed0e..cecab8b 100644 --- a/requirements/minimal.txt +++ b/requirements/minimal.txt @@ -1,2 +1,2 @@ -attrs==23.2.0 -ruamel.yaml==0.18.6 +attrs +ruamel.yaml diff --git a/requirements/tests.txt b/requirements/tests.txt index 08eeea0..8b4ee42 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,5 +1,5 @@ -numpy; python_version=='3.7' -numpy==1.26.3; python_version>='3.8' -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-xdist==3.5.0 +numpy +numpy +pytest +pytest-cov +pytest-xdist diff --git a/requirements_CI.txt b/requirements_CI.txt new file mode 100644 index 0000000..b1aee22 --- /dev/null +++ b/requirements_CI.txt @@ -0,0 +1,365 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile -p 3.12 requirements.txt +accessible-pygments==0.0.5 + # via pydata-sphinx-theme +alabaster==0.7.16 + # via sphinx +asttokens==2.4.1 + # via stack-data +attrs==24.2.0 + # via + # -r requirements/minimal.txt + # demes + # jsonschema + # jupyter-cache + # referencing +babel==2.16.0 + # via + # pydata-sphinx-theme + # sphinx +beautifulsoup4==4.12.3 + # via pydata-sphinx-theme +black==24.10.0 + # via -r requirements/lint.txt +certifi==2024.8.30 + # via requests +charset-normalizer==3.4.0 + # via requests +click==8.1.7 + # via + # black + # jupyter-book + # jupyter-cache + # sphinx-external-toc +comm==0.2.2 + # via ipykernel +contourpy==1.3.1 + # via matplotlib +coverage==7.6.7 + # via pytest-cov +cycler==0.12.1 + # via matplotlib +debugpy==1.8.8 + # via ipykernel +decorator==5.1.1 + # via ipython +demes==0.2.3 + # via demesdraw +demesdraw==0.4.0 + # via -r requirements/docs.txt +docutils==0.20.1 + # via + # myst-parser + # pybtex-docutils + # pydata-sphinx-theme + # sphinx + # sphinx-togglebutton + # sphinxcontrib-bibtex +execnet==2.1.1 + # via pytest-xdist +executing==2.1.0 + # via stack-data +fastjsonschema==2.20.0 + # via nbformat +flake8==7.1.1 + # via -r requirements/lint.txt +fonttools==4.55.0 + # via matplotlib +greenlet==3.1.1 + # via sqlalchemy +idna==3.10 + # via requests +imagesize==1.4.1 + # via sphinx +importlib-metadata==8.5.0 + # via + # jupyter-cache + # myst-nb +iniconfig==2.0.0 + # via pytest +ipykernel==6.29.5 + # via myst-nb +ipython==8.29.0 + # via + # ipykernel + # myst-nb +jedi==0.19.2 + # via ipython +jinja2==3.1.4 + # via + # jupyter-book + # myst-parser + # sphinx +jsonschema==4.23.0 + # via + # jupyter-book + # nbformat +jsonschema-specifications==2024.10.1 + # via jsonschema +jupyter-book==1.0.3 + # via -r requirements/docs.txt +jupyter-cache==1.0.1 + # via myst-nb +jupyter-client==8.6.3 + # via + # ipykernel + # nbclient +jupyter-core==5.7.2 + # via + # ipykernel + # jupyter-client + # nbclient + # nbformat +kiwisolver==1.4.7 + # via matplotlib +latexcodec==3.0.0 + # via pybtex +linkify-it-py==2.0.3 + # via jupyter-book +markdown-it-py==3.0.0 + # via + # mdit-py-plugins + # myst-parser +markupsafe==3.0.2 + # via jinja2 +matplotlib==3.9.2 + # via demesdraw +matplotlib-inline==0.1.7 + # via + # ipykernel + # ipython +mccabe==0.7.0 + # via flake8 +mdit-py-plugins==0.4.2 + # via myst-parser +mdurl==0.1.2 + # via markdown-it-py +mypy==1.13.0 + # via -r requirements/lint.txt +mypy-extensions==1.0.0 + # via + # black + # mypy +myst-nb==1.1.2 + # via jupyter-book +myst-parser==2.0.0 + # via + # jupyter-book + # myst-nb +nbclient==0.10.0 + # via + # jupyter-cache + # myst-nb +nbformat==5.10.4 + # via + # jupyter-cache + # myst-nb + # nbclient +nest-asyncio==1.6.0 + # via ipykernel +numpy==2.1.3 + # via + # -r requirements/tests.txt + # contourpy + # demesdraw + # matplotlib + # scipy +packaging==24.2 + # via + # black + # ipykernel + # matplotlib + # pytest + # sphinx + # sphinx-jupyterbook-latex +parso==0.8.4 + # via jedi +pathspec==0.12.1 + # via black +pexpect==4.9.0 + # via ipython +piccolo-theme==0.24.0 + # via -r requirements/docs.txt +pillow==11.0.0 + # via matplotlib +platformdirs==4.3.6 + # via + # black + # jupyter-core +pluggy==1.5.0 + # via pytest +prompt-toolkit==3.0.48 + # via ipython +psutil==6.1.0 + # via ipykernel +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.3 + # via stack-data +pybtex==0.24.0 + # via + # pybtex-docutils + # sphinxcontrib-bibtex +pybtex-docutils==1.0.3 + # via sphinxcontrib-bibtex +pycodestyle==2.12.1 + # via flake8 +pydata-sphinx-theme==0.16.0 + # via sphinx-book-theme +pyflakes==3.2.0 + # via flake8 +pygments==2.18.0 + # via + # accessible-pygments + # ipython + # pydata-sphinx-theme + # sphinx +pyparsing==3.2.0 + # via matplotlib +pytest==8.3.3 + # via + # -r requirements/tests.txt + # pytest-cov + # pytest-xdist +pytest-cov==6.0.0 + # via -r requirements/tests.txt +pytest-xdist==3.6.1 + # via -r requirements/tests.txt +python-dateutil==2.9.0.post0 + # via + # jupyter-client + # matplotlib +pyyaml==6.0.2 + # via + # jupyter-book + # jupyter-cache + # myst-nb + # myst-parser + # pybtex + # sphinx-external-toc +pyzmq==26.2.0 + # via + # ipykernel + # jupyter-client +referencing==0.35.1 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 + # via sphinx +rpds-py==0.21.0 + # via + # jsonschema + # referencing +ruamel-yaml==0.18.6 + # via + # -r requirements/minimal.txt + # demes +ruamel-yaml-clib==0.2.12 + # via ruamel-yaml +scipy==1.14.1 + # via demesdraw +setuptools==75.5.0 + # via + # sphinx-togglebutton + # sphinxcontrib-bibtex +six==1.16.0 + # via + # asttokens + # pybtex + # python-dateutil +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.6 + # via beautifulsoup4 +sphinx==7.4.7 + # via + # jupyter-book + # myst-nb + # myst-parser + # piccolo-theme + # pydata-sphinx-theme + # sphinx-book-theme + # sphinx-comments + # sphinx-copybutton + # sphinx-design + # sphinx-external-toc + # sphinx-issues + # sphinx-jupyterbook-latex + # sphinx-multitoc-numbering + # sphinx-thebe + # sphinx-togglebutton + # sphinxcontrib-bibtex + # sphinxcontrib-programoutput +sphinx-book-theme==1.1.3 + # via jupyter-book +sphinx-comments==0.0.3 + # via jupyter-book +sphinx-copybutton==0.5.2 + # via jupyter-book +sphinx-design==0.6.1 + # via jupyter-book +sphinx-external-toc==1.0.1 + # via jupyter-book +sphinx-issues==5.0.0 + # via -r requirements/docs.txt +sphinx-jupyterbook-latex==1.0.0 + # via jupyter-book +sphinx-multitoc-numbering==0.1.3 + # via jupyter-book +sphinx-thebe==0.3.1 + # via jupyter-book +sphinx-togglebutton==0.3.2 + # via jupyter-book +sphinxcontrib-applehelp==2.0.0 + # via sphinx +sphinxcontrib-bibtex==2.6.3 + # via jupyter-book +sphinxcontrib-devhelp==2.0.0 + # via sphinx +sphinxcontrib-htmlhelp==2.1.0 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-programoutput==0.17 + # via -r requirements/docs.txt +sphinxcontrib-qthelp==2.0.0 + # via sphinx +sphinxcontrib-serializinghtml==2.0.0 + # via sphinx +sqlalchemy==2.0.36 + # via jupyter-cache +stack-data==0.6.3 + # via ipython +tabulate==0.9.0 + # via jupyter-cache +tornado==6.4.1 + # via + # ipykernel + # jupyter-client +traitlets==5.14.3 + # via + # comm + # ipykernel + # ipython + # jupyter-client + # jupyter-core + # matplotlib-inline + # nbclient + # nbformat +typing-extensions==4.12.2 + # via + # mypy + # myst-nb + # pydata-sphinx-theme + # sqlalchemy +uc-micro-py==1.0.3 + # via linkify-it-py +urllib3==2.2.3 + # via requests +wcwidth==0.2.13 + # via prompt-toolkit +wheel==0.45.0 + # via sphinx-togglebutton +zipp==3.21.0 + # via importlib-metadata From d629f9513dbe8bb3aac67ab5ee06f03a56dc9e56 Mon Sep 17 00:00:00 2001 From: "Kevin R. Thornton" Date: Wed, 20 Nov 2024 10:10:39 -0800 Subject: [PATCH 2/6] update tests.yaml --- .github/workflows/tests.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6019958..85c6e07 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -8,7 +8,7 @@ on: jobs: canceller: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 @@ -24,8 +24,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2022, macos-11] - python-version: [3.7, "3.11"] + os: [ubuntu-24.04, windows-2022, macos-14] + python-version: ["3.12"] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} From bf6184879285abbd04bad08b41b323a506533325 Mon Sep 17 00:00:00 2001 From: "Kevin R. Thornton" Date: Wed, 20 Nov 2024 10:14:01 -0800 Subject: [PATCH 3/6] update dev.yaml --- .github/workflows/dev.yaml | 4 +- ...rements_CI.txt => requirements_docs_CI.txt | 51 ++----------------- requirements_lint_CI.txt | 28 ++++++++++ requirements_minimal_CI.txt | 8 +++ requirements_tests_CI.txt | 23 +++++++++ 5 files changed, 64 insertions(+), 50 deletions(-) rename requirements_CI.txt => requirements_docs_CI.txt (86%) create mode 100644 requirements_lint_CI.txt create mode 100644 requirements_minimal_CI.txt create mode 100644 requirements_tests_CI.txt diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index 30b0f0e..2dd328c 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -15,8 +15,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2022, macos-11] - python-version: ["3.11"] + os: [ubuntu-24.04, windows-2022, macos-14] + python-version: ["3.12"] steps: - name: checkout diff --git a/requirements_CI.txt b/requirements_docs_CI.txt similarity index 86% rename from requirements_CI.txt rename to requirements_docs_CI.txt index b1aee22..30580a7 100644 --- a/requirements_CI.txt +++ b/requirements_docs_CI.txt @@ -1,5 +1,5 @@ # This file was autogenerated by uv via the following command: -# uv pip compile -p 3.12 requirements.txt +# uv pip compile -p 3.12 requirements/docs.txt accessible-pygments==0.0.5 # via pydata-sphinx-theme alabaster==0.7.16 @@ -8,7 +8,6 @@ asttokens==2.4.1 # via stack-data attrs==24.2.0 # via - # -r requirements/minimal.txt # demes # jsonschema # jupyter-cache @@ -19,15 +18,12 @@ babel==2.16.0 # sphinx beautifulsoup4==4.12.3 # via pydata-sphinx-theme -black==24.10.0 - # via -r requirements/lint.txt certifi==2024.8.30 # via requests charset-normalizer==3.4.0 # via requests click==8.1.7 # via - # black # jupyter-book # jupyter-cache # sphinx-external-toc @@ -35,8 +31,6 @@ comm==0.2.2 # via ipykernel contourpy==1.3.1 # via matplotlib -coverage==7.6.7 - # via pytest-cov cycler==0.12.1 # via matplotlib debugpy==1.8.8 @@ -55,14 +49,10 @@ docutils==0.20.1 # sphinx # sphinx-togglebutton # sphinxcontrib-bibtex -execnet==2.1.1 - # via pytest-xdist executing==2.1.0 # via stack-data fastjsonschema==2.20.0 # via nbformat -flake8==7.1.1 - # via -r requirements/lint.txt fonttools==4.55.0 # via matplotlib greenlet==3.1.1 @@ -75,8 +65,6 @@ importlib-metadata==8.5.0 # via # jupyter-cache # myst-nb -iniconfig==2.0.0 - # via pytest ipykernel==6.29.5 # via myst-nb ipython==8.29.0 @@ -128,18 +116,10 @@ matplotlib-inline==0.1.7 # via # ipykernel # ipython -mccabe==0.7.0 - # via flake8 mdit-py-plugins==0.4.2 # via myst-parser mdurl==0.1.2 # via markdown-it-py -mypy==1.13.0 - # via -r requirements/lint.txt -mypy-extensions==1.0.0 - # via - # black - # mypy myst-nb==1.1.2 # via jupyter-book myst-parser==2.0.0 @@ -159,23 +139,18 @@ nest-asyncio==1.6.0 # via ipykernel numpy==2.1.3 # via - # -r requirements/tests.txt # contourpy # demesdraw # matplotlib # scipy packaging==24.2 # via - # black # ipykernel # matplotlib - # pytest # sphinx # sphinx-jupyterbook-latex parso==0.8.4 # via jedi -pathspec==0.12.1 - # via black pexpect==4.9.0 # via ipython piccolo-theme==0.24.0 @@ -183,11 +158,7 @@ piccolo-theme==0.24.0 pillow==11.0.0 # via matplotlib platformdirs==4.3.6 - # via - # black - # jupyter-core -pluggy==1.5.0 - # via pytest + # via jupyter-core prompt-toolkit==3.0.48 # via ipython psutil==6.1.0 @@ -202,12 +173,8 @@ pybtex==0.24.0 # sphinxcontrib-bibtex pybtex-docutils==1.0.3 # via sphinxcontrib-bibtex -pycodestyle==2.12.1 - # via flake8 pydata-sphinx-theme==0.16.0 # via sphinx-book-theme -pyflakes==3.2.0 - # via flake8 pygments==2.18.0 # via # accessible-pygments @@ -216,15 +183,6 @@ pygments==2.18.0 # sphinx pyparsing==3.2.0 # via matplotlib -pytest==8.3.3 - # via - # -r requirements/tests.txt - # pytest-cov - # pytest-xdist -pytest-cov==6.0.0 - # via -r requirements/tests.txt -pytest-xdist==3.6.1 - # via -r requirements/tests.txt python-dateutil==2.9.0.post0 # via # jupyter-client @@ -252,9 +210,7 @@ rpds-py==0.21.0 # jsonschema # referencing ruamel-yaml==0.18.6 - # via - # -r requirements/minimal.txt - # demes + # via demes ruamel-yaml-clib==0.2.12 # via ruamel-yaml scipy==1.14.1 @@ -349,7 +305,6 @@ traitlets==5.14.3 # nbformat typing-extensions==4.12.2 # via - # mypy # myst-nb # pydata-sphinx-theme # sqlalchemy diff --git a/requirements_lint_CI.txt b/requirements_lint_CI.txt new file mode 100644 index 0000000..2bc65c4 --- /dev/null +++ b/requirements_lint_CI.txt @@ -0,0 +1,28 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile -p 3.12 requirements/lint.txt +black==24.10.0 + # via -r requirements/lint.txt +click==8.1.7 + # via black +flake8==7.1.1 + # via -r requirements/lint.txt +mccabe==0.7.0 + # via flake8 +mypy==1.13.0 + # via -r requirements/lint.txt +mypy-extensions==1.0.0 + # via + # black + # mypy +packaging==24.2 + # via black +pathspec==0.12.1 + # via black +platformdirs==4.3.6 + # via black +pycodestyle==2.12.1 + # via flake8 +pyflakes==3.2.0 + # via flake8 +typing-extensions==4.12.2 + # via mypy diff --git a/requirements_minimal_CI.txt b/requirements_minimal_CI.txt new file mode 100644 index 0000000..5df4b90 --- /dev/null +++ b/requirements_minimal_CI.txt @@ -0,0 +1,8 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile -p 3.12 requirements/minimal.txt +attrs==24.2.0 + # via -r requirements/minimal.txt +ruamel-yaml==0.18.6 + # via -r requirements/minimal.txt +ruamel-yaml-clib==0.2.12 + # via ruamel-yaml diff --git a/requirements_tests_CI.txt b/requirements_tests_CI.txt new file mode 100644 index 0000000..c1cc78c --- /dev/null +++ b/requirements_tests_CI.txt @@ -0,0 +1,23 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile -p 3.12 requirements/tests.txt +coverage==7.6.7 + # via pytest-cov +execnet==2.1.1 + # via pytest-xdist +iniconfig==2.0.0 + # via pytest +numpy==2.1.3 + # via -r requirements/tests.txt +packaging==24.2 + # via pytest +pluggy==1.5.0 + # via pytest +pytest==8.3.3 + # via + # -r requirements/tests.txt + # pytest-cov + # pytest-xdist +pytest-cov==6.0.0 + # via -r requirements/tests.txt +pytest-xdist==3.6.1 + # via -r requirements/tests.txt From a3284cb4545e5d8f39e6dc96992c04599413f7ad Mon Sep 17 00:00:00 2001 From: "Kevin R. Thornton" Date: Wed, 20 Nov 2024 10:14:58 -0800 Subject: [PATCH 4/6] pick specific CI files --- .github/workflows/tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 85c6e07..6728131 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -43,8 +43,8 @@ jobs: - name: install dependencies run: | - pip install -r requirements/minimal.txt - pip install -r requirements/tests.txt + pip install -r requirements_minimal_CI.txt + pip install -r requirements_tests_CI.txt # Check that demes installs as expected. # Also check the "demes" CLI entry point. From 9cf9031c78864dc35dcc98589cc5c0d631aba140 Mon Sep 17 00:00:00 2001 From: "Kevin R. Thornton" Date: Wed, 20 Nov 2024 10:15:40 -0800 Subject: [PATCH 5/6] docs.yaml --- .github/workflows/docs.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 53a820e..e1e706b 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -25,8 +25,8 @@ jobs: - name: Install dependencies run: | pip install --upgrade pip - pip install -r requirements/minimal.txt - pip install -r requirements/docs.txt + pip install -r requirements_minimal_CI.txt + pip install -r requirements_docs_CI.txt python -m pip install build packaging - name: Build package @@ -40,7 +40,7 @@ jobs: make - name: Checkout docs site - if: (!github.event.pull_request) + # if: (!github.event.pull_request) uses: actions/checkout@v3 with: repository: popsim-consortium/demes-docs From 622577a106ad01dc86bcd555e5b33672fb92793f Mon Sep 17 00:00:00 2001 From: "Kevin R. Thornton" Date: Wed, 20 Nov 2024 10:22:56 -0800 Subject: [PATCH 6/6] fix demes-spec submodule --- demes-spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demes-spec b/demes-spec index 0f5fa52..b2341f1 160000 --- a/demes-spec +++ b/demes-spec @@ -1 +1 @@ -Subproject commit 0f5fa522fd9c79eb01f37931574a703305ac8add +Subproject commit b2341f13e51808f3849a2253c188549c163525a8