diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8ac6b8c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b8e8544 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,100 @@ +name: CI + +on: + push: + branches: + - 'main' + - '*.*' + - '!*backport*' + tags: + - 'v*' + - '!*dev*' + - '!*pre*' + - '!*post*' + pull_request: + # Allow manual runs through the web UI + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + core: + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + with: + submodules: false + coverage: codecov + toxdeps: tox-pypi-filter + posargs: -n auto + envs: | + - linux: py311 + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + test: + needs: [core] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + with: + submodules: false + coverage: codecov + toxdeps: tox-pypi-filter + posargs: -n auto + envs: | + - windows: py310 + - macos: py39 + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + docs: + needs: [core] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + with: + default_python: '3.9' + submodules: false + pytest: false + toxdeps: tox-pypi-filter + cache-key: docs-${{ github.run_id }} + libraries: | + apt: + - graphviz + envs: | + - linux: build_docs + + extra: + needs: [test] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + with: + default_python: '3.9' + submodules: false + coverage: codecov + toxdeps: tox-pypi-filter + posargs: -n auto + envs: | + - linux: py39-oldestdeps + - linux: py311-devdeps + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + publish: + # Build wheels when pushing to any branch except main + # publish.yml will only publish if tagged ^v.* + if: | + ( + github.event_name != 'pull_request' && ( + github.ref_name != 'main' || + github.event_name == 'workflow_dispatch' + ) + ) || ( + github.event_name == 'pull_request' && + contains(github.event.pull_request.labels.*.name, 'Run publish') + ) + needs: [test] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main + with: + python-version: "3.10" + test_extras: 'all,tests' + test_command: 'pytest -p no:warnings -m "not mpl_image_compare" --pyargs mpl_animators' + submodules: false + secrets: + pypi_token: ${{ secrets.pypi_token }} diff --git a/CHANGES.md b/CHANGES.md index e57197e..3171f3d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,21 +1,23 @@ -## v1.1.0 - 2022-08-10 +# Changelog # -### What's Changed +## v1.1.0 - 2022-08-10 ## -#### Bug Fixes +### What's Changed ### -- Fix setting y limits when data is a dask array by @SolarDrew in https://github.com/sunpy/mpl-animators/pull/11 +#### Bug Fixes #### -#### Other Changes +- Fix setting y limits when data is a dask array by SolarDrew in -- Add changelog config and bump minimum Python version to 3.8 by @Cadair in https://github.com/sunpy/mpl-animators/pull/12 +#### Other Changes #### -### New Contributors +- Add changelog config and bump minimum Python version to 3.8 by Cadair in -- @SolarDrew made their first contribution in https://github.com/sunpy/mpl-animators/pull/11 +#### New Contributors #### -**Full Changelog**: https://github.com/sunpy/mpl-animators/compare/v1.0.1...v1.1.0 +- @SolarDrew made their first contribution in -## v1.0.0 +**Full Changelog**: + +## v1.0.0 ## Initial release with code copied from `sunpy.visualisation.animators`. diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 6f7557f..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr) -variables: - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_MANYLINUX_I686_IMAGE: manylinux2014 - -schedules: - - cron: "0 0 * * *" - displayName: Daily midnight build - branches: - include: - - main - always: true - -resources: - repositories: - - repository: OpenAstronomy - type: github - endpoint: sunpy - name: OpenAstronomy/azure-pipelines-templates - ref: master - -trigger: - branches: - include: - - '*' - exclude: - - '*backport*' - tags: - include: - - 'v*' - exclude: - - '*dev*' - - '*pre*' - - '*post*' - -pr: - autoCancel: true - -stages: - - stage: FirstPhaseTests - displayName: Core Tests - jobs: - - template: run-tox-env.yml@OpenAstronomy - parameters: - default_python: '3.9' - submodules: false - coverage: codecov - toxdeps: tox-pypi-filter - envs: - - linux: py311 - - - stage: SecondPhaseTests - displayName: Stage 2 Tests - dependsOn: FirstPhaseTests - jobs: - - template: run-tox-env.yml@OpenAstronomy - parameters: - default_python: '3.9' - submodules: false - coverage: codecov - toxdeps: tox-pypi-filter - libraries: - apt: - - graphviz - envs: - - macos: py310 - - windows: py39 - - linux: build_docs - posargs: " " - pytest: false - - # On branches which aren't main, and not Pull Requests, build the wheels but only upload them on tags - - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - - stage: Release - dependsOn: SecondPhaseTests - jobs: - - template: publish.yml@OpenAstronomy - parameters: - # Only Upload to PyPI on tags - ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}: - pypi_connection_name : 'PyPI' - test_extras: 'test,all' - test_command: 'pytest -p no:warnings -m "not mpl_image_compare" --pyargs mpl_animators' - submodules: false - targets: - - wheels_universal - - sdist diff --git a/setup.cfg b/setup.cfg index 6a02ce3..39b80d5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,7 +23,7 @@ all = astropy>=5.0.6,!=5.1.0 wcs = astropy>=5.0.6,!=5.1.0 -test = +tests = pytest pytest-cov pytest-mpl diff --git a/tox.ini b/tox.ini index d761db4..3a7b253 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,7 @@ changedir = .tmp/{envname} description = run tests deps = + pytest-xdist devdeps: git+https://github.com/astropy/astropy devdeps: git+https://github.com/matplotlib/matplotlib oldestdeps: numpy==1.21.0 @@ -18,8 +19,8 @@ deps = figure-!devdeps-!oldestdeps: astropy==5.3.4 figure-!devdeps-!oldestdeps: matplotlib==3.8.1 extras = - test all + tests setenv = PYTEST_COMMAND = pytest -vvv -s -raR --pyargs mpl_animators --cov-report=xml --cov=mpl_animators --cov-config={toxinidir}/setup.cfg {toxinidir}/docs allowlist_externals = /bin/bash @@ -46,8 +47,8 @@ commands = changedir = docs description = invoke sphinx-build to build the HTML docs extras = - docs all + docs commands = pip freeze sphinx-build -W -b html . _build/html {posargs}