Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/sunpy/package-template",
"commit": "2a6434a5c749ecde69d00b937a3fef27ecbad656",
"commit": "632ed04aee0058dd88dc6b7972ca8f8061fbd6da",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down Expand Up @@ -36,7 +36,7 @@
".github/workflows/zizmor.yml"
],
"_template": "https://github.com/sunpy/package-template",
"_commit": "2a6434a5c749ecde69d00b937a3fef27ecbad656"
"_commit": "632ed04aee0058dd88dc6b7972ca8f8061fbd6da"
}
},
"directory": null
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ repos:
- id: ruff-format
types: [python]
exclude: *exclude_dirs
- repo: https://github.com/PyCQA/isort
rev: 9.0.0a3
hooks:
- id: isort
types: [python]
exclude: *exclude_dirs
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
Expand Down Expand Up @@ -50,6 +44,12 @@ repos:
args: [ "--write-changes" ]
types_or: [python, rst]
exclude: *exclude_dirs
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v1.0.2
hooks:
- id: sphinx-lint
types_or: [python, rst]
exclude: *exclude_dirs
ci:
autofix_prs: false
autoupdate_schedule: "quarterly"
29 changes: 25 additions & 4 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ select = [
"W",
"UP",
"PT",
"I",
"BLE",
"A",
"C4",
Expand Down Expand Up @@ -63,7 +64,8 @@ extend-ignore = [
"INP001", # File is part of an implicit namespace package.
]
"docs/conf.py" = [
"E402" # Module imports not at top of file
"E402", # Module imports not at top of file
"I", # isort
]
"docs/*.py" = [
"INP001", # File is part of an implicit namespace package.
Expand All @@ -77,6 +79,7 @@ extend-ignore = [
"F401", # Unused import
"F403", # from {name} import * used; unable to detect undefined names
"F405", # {name} may be undefined, or defined from star imports
"I", # isort
]
"test_*.py" = [
"E402", # Module level import not at top of cell
Expand All @@ -86,9 +89,6 @@ extend-ignore = [
"PT011", # `pytest.raises(ValueError)` is too broad
]

[lint.pydocstyle]
convention = "numpy"

[lint.flake8-pytest-style]
parametrize-names-type = "csv"

Expand All @@ -97,3 +97,24 @@ exclude = [
"sunkit_spex/_dev/scm_version.py",
"docs/conf.py",
]

[lint.pydocstyle]
convention = "numpy"

[lint.isort]
default-section = "third-party"
section-order = [
"future",
"standard-library",
"third-party",
"astropy",
"sunpy",
"first-party",
"local-folder",
]
known-first-party = ["sunkit_spex"]
no-lines-before = ["local-folder"]

[lint.isort.sections]
"astropy" = ["astropy", "asdf", "gwcs", "reproject"]
"sunpy" = ["sunpy"]
4 changes: 2 additions & 2 deletions sunkit_spex/spectrum/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
from copy import deepcopy

import numpy as np
from gwcs import WCS as GWCS
from gwcs import coordinate_frames as cf
from ndcube import NDCube

import astropy.units as u
Expand All @@ -12,6 +10,8 @@
from astropy.modeling.tabular import Tabular1D
from astropy.utils import lazyproperty
from astropy.wcs.wcsapi import sanitize_slices
from gwcs import WCS as GWCS
from gwcs import coordinate_frames as cf

__all__ = ["SpectralAxis", "Spectrum", "gwcs_from_array"]

Expand Down
2 changes: 1 addition & 1 deletion sunkit_spex/spectrum/tests/test_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import numpy as np
import pytest
from gwcs import coordinate_frames as cf
from ndcube import NDCube
from ndcube.extra_coords import QuantityTableCoordinate, TimeTableCoordinate
from ndcube.wcs.wrappers import CompoundLowLevelWCS
Expand All @@ -14,6 +13,7 @@
from astropy.tests.helper import assert_quantity_allclose
from astropy.time import Time
from astropy.wcs import WCS
from gwcs import coordinate_frames as cf

from sunkit_spex.spectrum.spectrum import SpectralAxis, SpectralGWCS, Spectrum, gwcs_from_array

Expand Down
Loading