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 @@ -8,12 +8,6 @@ repos:
types: [python]
# Define here once and then reference using YAML anchor
exclude: &exclude_dirs ^sunraster/(data|extern)/
- repo: https://github.com/PyCQA/isort
rev: 8.0.1
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 @@ -47,6 +41,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"
23 changes: 22 additions & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ select = [
"W",
"UP",
"PT",
"I",
]
extend-ignore = [
# pycodestyle (E, W)
Expand All @@ -40,7 +41,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 @@ -54,10 +56,29 @@ 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
]

[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 = ["sunraster"]
no-lines-before = ["local-folder"]

[lint.isort.sections]
"astropy" = ["astropy", "asdf", "gwcs", "reproject"]
"sunpy" = ["sunpy"]
5 changes: 2 additions & 3 deletions sunraster/instr/spice.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
import textwrap

import numpy as np
from ndcube import NDCollection
from ndcube.meta import NDMeta

import astropy.units as u
from astropy.coordinates import SkyCoord
from astropy.io import fits
from astropy.time import Time
from astropy.wcs import WCS

from ndcube import NDCollection
from ndcube.meta import NDMeta

from sunraster import RasterSequence, SpectrogramCube, SpectrogramSequence
from sunraster.meta import SlitSpectrographMetaABC

Expand Down
2 changes: 1 addition & 1 deletion sunraster/instr/tests/test_spice.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import numpy as np
import pytest
from ndcube import NDCollection

import astropy.units as u
from astropy.coordinates import SkyCoord
from astropy.io import fits
from astropy.time import Time

from ndcube import NDCollection
from sunpy.coordinates import HeliographicStonyhurst

from sunraster import RasterSequence, SpectrogramCube, SpectrogramSequence
Expand Down
7 changes: 3 additions & 4 deletions sunraster/spectrogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
import textwrap
from copy import deepcopy

import ndcube.utils.wcs as nuw
import numpy as np
from ndcube import NDMeta
from ndcube.ndcube import NDCube

import astropy.units as u
from astropy.time import Time

import ndcube.utils.wcs as nuw
from ndcube import NDMeta
from ndcube.ndcube import NDCube

__all__ = ["SpectrogramABC","SpectrogramCube"]


Expand Down
3 changes: 1 addition & 2 deletions sunraster/spectrogram_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
import textwrap

import numpy as np
from ndcube import NDCubeSequence

import astropy.units as u
from astropy.coordinates import SkyCoord
from astropy.time import Time

from ndcube import NDCubeSequence

from sunraster.spectrogram import (
SUPPORTED_LATITUDE_NAMES,
SUPPORTED_LONGITUDE_NAMES,
Expand Down
5 changes: 2 additions & 3 deletions sunraster/tests/test_spectrogram.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import numpy as np
import pytest
from ndcube.meta import NDMeta
from ndcube.tests.helpers import assert_cubes_equal

import astropy.units as u
from astropy.time import Time, TimeDelta
from astropy.wcs import WCS

from ndcube.meta import NDMeta
from ndcube.tests.helpers import assert_cubes_equal

import sunraster.spectrogram
from sunraster import SpectrogramCube

Expand Down
5 changes: 2 additions & 3 deletions sunraster/tests/test_spectrogramsequence.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import numpy as np
import pytest
from ndcube.meta import NDMeta
from ndcube.tests.helpers import assert_cubesequences_equal

import astropy.units as u
from astropy.time import Time, TimeDelta
from astropy.wcs import WCS

from ndcube.meta import NDMeta
from ndcube.tests.helpers import assert_cubesequences_equal

from sunraster import RasterSequence, SpectrogramCube, SpectrogramSequence

# Define an sample wcs objects.
Expand Down
Loading