Skip to content

Commit

Permalink
CI devdeps + changelog (#176)
Browse files Browse the repository at this point in the history
* CI devdeps

* Changelog for 0.5.1

* Python versions + new bot

* Conda

* Fix doc warning
  • Loading branch information
nabobalis committed Nov 17, 2023
1 parent e527745 commit ca4d29d
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 86 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
41 changes: 33 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
needs: [test]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.9'
submodules: false
pytest: false
toxdeps: tox-pypi-filter
Expand All @@ -69,12 +70,8 @@ jobs:
envs: |
- linux: py311-online
cron:
if: |
github.event_name == 'workflow_dispatch' || (
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Run cron CI')
)
devdeps:
needs: [online]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
submodules: false
Expand All @@ -87,8 +84,35 @@ jobs:
- libhdf5-dev
envs: |
- linux: py311-devdeps
- linux: py39-conda
libraries: ''
conda:
needs: [online]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- uses: conda-incubator/setup-miniconda@v2
with:
installer-url: https://github.com/conda-forge/miniforge/releases/download/4.8.3-2/Miniforge-pypy3-4.8.3-2-Linux-x86_64.sh
python-version: 3.11
activate-environment: sunkit_image_test
environment-file: sunkit-dev-env.yml
- name: Install sunkit_image
shell: bash -el {0}
run: |
pip install --no-deps --no-build-isolation .
- name: Run tests
shell: bash -el {0}
run: |
conda list
cd /tmp
pytest -vvv -r a --pyargs sunkit_image --cov-report=xml --cov=sunkit_image --cov-config=$GITHUB_WORKSPACE/setup.cfg $GITHUB_WORKSPACE/docs -n auto
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml

publish:
# Build wheels when pushing to any branch except main
Expand All @@ -106,6 +130,7 @@ jobs:
needs: [test]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main
with:
python-version: "3.11"
test_extras: 'dev'
test_command: 'pytest -p no:warnings --doctest-rst -m "not mpl_image_compare" --pyargs sunkit_image'
submodules: false
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/scheduled_builds.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ repos:
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md)$"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.4'
rev: 'v0.1.5'
hooks:
- id: ruff
args: ['--fix']
- repo: https://github.com/psf/black
rev: 23.10.1
rev: 23.11.0
hooks:
- id: black
exclude: ".*(.fits|.fts|.fit|.txt|.csv)$"
Expand Down Expand Up @@ -45,7 +45,7 @@ repos:
additional_dependencies:
- tomli
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.6.1'
rev: 'v1.7.0'
hooks:
- id: mypy
additional_dependencies: ['types-setuptools']
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
0.5.1 (2023-11-17)
==================

Trivial/Internal Changes
------------------------

- Added the explicitly imported packages to the install requirements. (`#160 <https://github.com/sunpy/sunkit-image/pull/160>`__)

0.5.0 (2023-08-10)
==================

Expand Down
1 change: 0 additions & 1 deletion changelog/160.trivial.rst

This file was deleted.

107 changes: 53 additions & 54 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,70 +23,69 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py39"
line-length = 120
exclude=[
".git,",
"__pycache__",
"build",
"tools/**",
".git,",
"__pycache__",
"build",
"tools/**",
]
select = [
"E",
"F",
"W",
"UP",
"PT",
"RET",
"TID",
"PLE",
"NPY",
"RUF",
"PGH",
"PTH",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"T20",
"RSE",
"ERA",
"E",
"F",
"W",
"UP",
"PT",
"RET",
"TID",
"PLE",
"NPY",
"RUF",
"PGH",
"PTH",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"T20",
"RSE",
"ERA",
]
fixable = [
"E",
"F",
"W",
"UP",
"PT",
"RET",
"TID",
"PLE",
"NPY",
"RUF",
"PGH",
"PTH",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"T20",
"RSE",
"ERA",
"E",
"F",
"W",
"UP",
"PT",
"RET",
"TID",
"PLE",
"NPY",
"RUF",
"PGH",
"PTH",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"T20",
"RSE",
"ERA",
]
extend-ignore = [
"E501", # Line too long
# TODO: Fix in future
"E741", # Ambiguous variable name
"B006", # Do not use mutable data structures for argument defaults
"FBT002", # Boolean default value in function definition

"E501", # Line too long
# TODO: Fix in future
"E741", # Ambiguous variable name
"B006", # Do not use mutable data structures for argument defaults
"FBT002", # Boolean default value in function definition
]

[tool.ruff.per-file-ignores]
"examples/*.py" = [
"T201", # We need print in our examples
"PGH004", # Sometimes we need to use NOQA in examples
"T201", # We need print in our examples
"PGH004", # Sometimes we need to use NOQA in examples
]

[tool.ruff.pydocstyle]
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ docs =
beautifulsoup4
dask
drms
# Remove next line when fixed in towncrier; see https://github.com/twisted/towncrier/issues/528
importlib-resources<6
matplotlib
sphinx
sphinx_automodapi
Expand Down
45 changes: 45 additions & 0 deletions sunkit-dev-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
channels:
- conda-forge

dependencies:
# Required
- astropy
- numpy
- matplotlib
- scipy
- scikit-image
- sunpy
#- python # Commented out to avoid triggering an upgrade

# Optional
- dask

# Testing
- pytest-astropy
- pytest-mpl
- tox
- tox-conda

# Documentation
- graphviz
- astroscrappy
- beautifulsoup4
- dask
- drms
- matplotlib
- sphinx
- sphinx-automodapi
- sphinx-design
- sphinx-gallery
- zeep

# Installation
- pip
- setuptools-scm

# Development
- pre-commit

- pip:
- sphinx-changelog
- sunpy-sphinx-theme

0 comments on commit ca4d29d

Please sign in to comment.