diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99ae02b..d996605 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,14 +3,14 @@ name: CI on: push: branches: - - 'main' - - '*.*' - - '!*backport*' + - "main" + - "*.*" + - "!*backport*" tags: - - 'v*' - - '!*dev*' - - '!*pre*' - - '!*post*' + - "v*" + - "!*dev*" + - "!*pre*" + - "!*post*" pull_request: # Allow manual runs through the web UI workflow_dispatch: @@ -50,7 +50,7 @@ jobs: needs: [core] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main with: - default_python: '3.9' + default_python: "3.9" submodules: false pytest: false toxdeps: tox-pypi-filter @@ -69,7 +69,7 @@ jobs: needs: [docs] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main with: - default_python: '3.9' + default_python: "3.9" submodules: false coverage: codecov toxdeps: tox-pypi-filter @@ -96,7 +96,7 @@ jobs: uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main with: python-version: "3.10" - test_extras: 'all,tests' + test_extras: "all,tests" test_command: 'pytest -p no:warnings --doctest-rst -m "not mpl_image_compare" --pyargs sunpy' submodules: false secrets: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bebae91..4244c13 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" repos: - repo: https://github.com/myint/docformatter rev: v1.7.5 @@ -8,33 +9,37 @@ repos: rev: v2.2.1 hooks: - id: autoflake - args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable'] + args: + [ + "--in-place", + "--remove-all-unused-imports", + "--remove-unused-variable", + ] exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|docs/conf.py)$" - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.1.3' + rev: "v0.1.8" hooks: - id: ruff - args: ['--fix', '--unsafe-fixes'] - - repo: https://github.com/psf/black - rev: 23.10.1 - hooks: + args: ["--fix", "--unsafe-fixes"] + - repo: https://github.com/psf/black + rev: 23.12.0 + hooks: - id: black - exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" - - repo: https://github.com/PyCQA/isort - rev: 5.12.0 - hooks: + - repo: https://github.com/PyCQA/isort + rev: 5.13.2 + hooks: - id: isort - exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 - hooks: + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.1.0 + hooks: + - id: prettier + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: - id: check-ast - id: check-case-conflict - id: trailing-whitespace - exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" - id: mixed-line-ending - exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" - id: end-of-file-fixer - exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" - id: check-yaml - id: debug-statements diff --git a/.readthedocs.yml b/.readthedocs.yml index ab0f089..364c33d 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -17,9 +17,9 @@ sphinx: fail_on_warning: false python: - install: - - method: pip - extra_requirements: - - all - - docs - path: . + install: + - method: pip + extra_requirements: + - all + - docs + path: . diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d32e6c8..1ef5430 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,6 +1,6 @@ -# Contributor Covenant Code of Conduct # +# Contributor Covenant Code of Conduct -## Our Pledge ## +## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body @@ -12,31 +12,31 @@ identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. -## Our Standards ## +## Our Standards Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or advances of +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting -## Enforcement Responsibilities ## +## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in @@ -48,7 +48,7 @@ comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. -## Scope ## +## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. @@ -56,7 +56,7 @@ Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. -## Enforcement ## +## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at @@ -65,12 +65,12 @@ All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. -## Enforcement Guidelines ## +## Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: -### 1. Correction ## +### 1. Correction **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. @@ -79,7 +79,7 @@ unprofessional or unwelcome in the community. clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. -### 2. Warning ## +### 2. Warning **Community Impact**: A violation through a single incident or series of actions. @@ -91,7 +91,7 @@ includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. -### 3. Temporary Ban ## +### 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. @@ -102,7 +102,7 @@ private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. -### 4. Permanent Ban ## +### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an @@ -111,7 +111,7 @@ individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. -## Attribution ## +## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at diff --git a/pyproject.toml b/pyproject.toml index c2312a6..6e5d066 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,15 +52,18 @@ repository = "https://github.com/LM-SAL/aiapy" changelog = "https://aiapy.readthedocs.io/en/stable/changelog.html" [project.optional-dependencies] +all = ["aiapy"] cupy = [ 'cupy', ] tests = [ + "aiapy[all]", "hissw", "pytest", "pytest-astropy", ] docs = [ + "aiapy[all]", "sphinx", "sphinx-automodapi", "sphinx-changelog", @@ -73,7 +76,7 @@ docs = [ # Remove next line when fixed in towncrier; see https://github.com/twisted/towncrier/issues/528 "importlib-resources<6", ] -dev = ["aiapy[all,tests,docs]"] +dev = ["aiapy[tests,docs]"] [tool.setuptools] packages = ["aiapy"]