From 2a73c4f8655cb17fcfb0c4bfbb207d56d9f3c5a8 Mon Sep 17 00:00:00 2001 From: CyclingNinja Date: Wed, 17 Apr 2024 10:56:22 +0100 Subject: [PATCH] Adds dependancies and correct ci --- .github/workflows/ci.yml | 6 ++---- pyproject.toml | 22 +++++++++++++++++++--- tox.ini | 12 +++--------- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 837b17220..c8cb06f27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,13 +96,11 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} publish_pure: - needs: [test, docs] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main if: | github.event_name != 'pull_request' && ( github.ref_name != 'main' || github.event_name == 'workflow_dispatch' ) - needs: [test] + needs: [test, docs] uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 with: python-version: '3.10' @@ -113,7 +111,7 @@ jobs: pypi_token: ${{ secrets.pypi_token }} notify: if: always() && github.event_name == 'workflow_dispatch' - needs: [publish, cron] + needs: [publish_pure, cron] runs-on: ubuntu-latest steps: - uses: Cadair/matrix-notify-action@main diff --git a/pyproject.toml b/pyproject.toml index bee6b07d8..d5de0e476 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,19 +15,35 @@ license = { file = "licenses/LICENSE.rst", content-type = "text/plain" } authors = [ { name = "The SunPy Community", email = "sunpy@googlegroups.com" }, ] -dependencies = [] +dependencies = [ + "astropy>=5.0.6,!=5.1.0", + "gwcs>=0.18", + "numpy>=1.23.0", + "dask" +] dynamic = ["version"] [project.optional-dependencies] tests = [ + "dask", "pytest", + "pytest-astropy", "pytest-doctestplus", - "pytest-cov" + "pytest-mpl>=0.12", + "scipy", + "sunpy>=5.0.0" ] docs = [ + "matplotlib", + "mpl-animators>=1.0", + "pytest-docstestplus>=0.9.0", "sphinx", "sphinx-automodapi", - "tomli; python_version <\"3.11\"", + "sphinx-changelog>=1.1.0", + "sphinx-gallery", + "sphinxext-opengraph", + "sunpy-sphinx-theme", + "sunpy>=5.0.0" ] [project.urls] diff --git a/tox.ini b/tox.ini index cc1ebde46..334a9c43e 100644 --- a/tox.ini +++ b/tox.ini @@ -58,15 +58,7 @@ deps = online: pytest-rerunfailures online: pytest-timeout # Oldest Dependencies - oldestdeps: sunpy<4.0 - oldestdeps: astropy<4.3 - oldestdeps: gwcs<0.16 - oldestdeps: numpy<1.23 - oldestdeps: matplotlib<3.3 - oldestdeps: mpl_animators<1.1 - oldestdeps: reproject==0.7.1 - oldestdeps: scipy<1.8.0 - oldestdeps: dask<2021.5.0 + oldestdeps: minimum_dependencies # Figure tests need a tightly controlled environment figure-!devdeps: matplotlib==3.7.2 figure-!devdeps: astropy==5.3.3 @@ -79,6 +71,8 @@ extras = commands = !oldestdeps-!online-!hypothesis-!figure: {env:PYTEST_COMMAND} {posargs} online: {env:PYTEST_COMMAND} --reruns 2 --reruns-delay 15 --timeout=180 --remote-data=any {posargs} + oldestdeps: minimum_dependencies {{ cookiecutter.module_name }} --filename requirements-min.txt + oldestdeps: pip install -r requirements-min.txt figure: /bin/bash -c "mkdir -p ./figure_test_images; python -c 'import matplotlib as mpl; print(mpl.ft2font.__file__, mpl.ft2font.__freetype_version__, mpl.ft2font.__freetype_build_type__)' > ./figure_test_images/figure_version_info.txt" figure: /bin/bash -c "pip freeze >> ./figure_test_images/figure_version_info.txt" figure: /bin/bash -c "cat ./figure_test_images/figure_version_info.txt"