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
30 changes: 7 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
submodules: false
coverage: codecov
toxdeps: "'tox<4' tox-pypi-filter"
toxdeps: tox-pypi-filter
posargs: -n auto
envs: |
- linux: py311
Expand All @@ -36,12 +36,12 @@ jobs:
with:
submodules: false
coverage: codecov
toxdeps: "'tox<4' tox-pypi-filter"
toxdeps: tox-pypi-filter
posargs: -n auto
envs: |
- macos: py310
- windows: py39
- linux: py38-oldestdeps
- linux: py39-oldestdeps

docs:
needs: [test]
Expand All @@ -50,8 +50,7 @@ jobs:
default_python: '3.9'
submodules: false
pytest: false
toxdeps: "'tox<4' tox-pypi-filter"
cache-key: docs-${{ github.run_id }}
toxdeps: tox-pypi-filter
libraries: |
apt:
- graphviz
Expand All @@ -63,28 +62,12 @@ jobs:
needs: [test]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.8'
submodules: false
coverage: codecov
toxdeps: "'tox<4' tox-pypi-filter"
toxdeps: tox-pypi-filter
posargs: -n auto --dist loadgroup
envs: |
- linux: py310-online

cron:
if: |
github.event_name == 'workflow_dispatch' || (
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Run cron CI')
)
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.8'
submodules: false
coverage: codecov
toxdeps: "'tox<4' tox-pypi-filter"
posargs: -n auto
envs: |
- linux: py311-online
- linux: py311-devdeps

publish:
Expand All @@ -103,6 +86,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_instruments'
submodules: false
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
0.5.0 (2023-11-17)
==================

Maintenance release, no new features or bugfixes.

Breaking Changes
----------------

- Increased minimum version of ``sunpy`` to 5.0.0
- Increased minimum version of Python to 3.9

0.4.0 (2023-04-04)
==================

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
A SunPy-affiliated package for solar instrument-specific tools.
---------------------------------------------------------------
A SunPy affiliated package for solar instrument-specific tools
--------------------------------------------------------------

.. image:: http://img.shields.io/badge/powered%20by-SunPy-orange.svg?style=flat
:target: http://www.sunpy.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"""

import matplotlib.pyplot as plt

from sunpy import timeseries as ts
from sunpy.data.sample import GOES_XRS_TIMESERIES

Expand Down
3 changes: 1 addition & 2 deletions examples/plot_suvi_thematic_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
"""

import matplotlib.pyplot as plt
from astropy.io import fits
from matplotlib.colors import ListedColormap
from matplotlib.patches import Patch
from parfive import Downloader

from astropy.io import fits

from sunkit_instruments.suvi._variables import SOLAR_CLASS_NAME, SOLAR_COLORS

###############################################################################
Expand Down
34 changes: 6 additions & 28 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,21 @@ classifiers =
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Scientific/Engineering :: Physics

[options]
zip_safe = False
python_requires = >=3.8
python_requires = >=3.9
packages = find:
include_package_data = True
setup_requires =
setuptools_scm
install_requires =
scipy
sunpy[net,timeseries]>=4.0.0
sunpy[net,timeseries]>=5.0.0

[options.extras_require]
tests =
Expand All @@ -46,8 +45,8 @@ docs =
sphinx-changelog
sphinx-gallery
sunpy-sphinx-theme
# Not a direct dependency, but we need to pin this until sphinx-changelog is updated (see #6668)
towncrier<22.12.0
# Remove next line when fixed in towncrier; see https://github.com/twisted/towncrier/issues/528
importlib-resources<6

[options.packages.find]
exclude = sunkit_instruments._dev
Expand Down Expand Up @@ -82,33 +81,12 @@ filterwarnings =
ignore:numpy.ndarray size changed:RuntimeWarning
ignore:distutils Version classes are deprecated. Use packaging.version instead:DeprecationWarning
ignore:Unknown units for CHANNEL:sunpy.util.exceptions.SunpyUserWarning
ignore:.*is deprecated and slated for removal in Python 3:DeprecationWarning

[pycodestyle]
max_line_length = 100

[flake8]
max-line-length = 100
exclude =
.git,
__pycache__,
docs/conf.py,
build,
rst-directives =
plot

[isort]
balanced_wrapping = True
skip=docs/conf.py
default_section = THIRDPARTY
include_trailing_comma = True
known_astropy = astropy, asdf, sunpy
known_first_party = sunkit_instruments
length_sort = False
length_sort_sections=stdlib
line_length = 110
multi_line_output = 3
no_lines_before = LOCALFOLDER
sections = STDLIB, THIRDPARTY, ASTROPY, FIRSTPARTY, LOCALFOLDER
profile = black

[coverage:run]
omit =
Expand Down
4 changes: 2 additions & 2 deletions sunkit_instruments/data/test/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""
This package contains all of sunkit-instruments's test data.
"""
import fnmatch
import glob
import os
import re
import glob
import fnmatch

from astropy.utils.data import get_pkg_data_filename

Expand Down
7 changes: 3 additions & 4 deletions sunkit_instruments/fermi/fermi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
This module provides processing routines for Fermi Gamma-ray Space Telescope
(FGST), formerly called the Gamma-ray Large Area Space Telescope (GLAST).
"""
import os
import copy
import urllib
import os
import tempfile
import urllib
from collections import OrderedDict

import astropy.units as u
import matplotlib.pyplot as plt
import numpy as np

import astropy.units as u
from astropy.coordinates import Latitude, Longitude
from astropy.io import fits
from astropy.time import TimeDelta
Expand Down
3 changes: 1 addition & 2 deletions sunkit_instruments/fermi/tests/test_fermi.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import astropy.units as u
import pytest
from numpy.testing import assert_almost_equal

import astropy.units as u
from sunpy.time import parse_time

from sunkit_instruments import fermi
Expand Down
3 changes: 1 addition & 2 deletions sunkit_instruments/goes_xrs/goes_chianti_tem.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import numpy as np
import pandas as pd
from scipy import interpolate

from astropy import units as u
from astropy.io import fits
from astropy.time import Time
from scipy import interpolate
from sunpy import timeseries as ts
from sunpy.data import manager
from sunpy.time import parse_time
Expand Down
4 changes: 1 addition & 3 deletions sunkit_instruments/goes_xrs/goes_xrs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np

from astropy import units as u
from sunpy.time import parse_time

Expand Down Expand Up @@ -36,8 +35,7 @@ def get_goes_event_list(timerange, goes_class_filter=None):
A list of all the flares found for the given time range.
"""
# Importing hek here to avoid calling code that relies on optional dependencies.
import sunpy.net.attrs as attrs
from sunpy.net import hek
from sunpy.net import attrs, hek

# use HEK module to search for GOES events
client = hek.HEKClient()
Expand Down
7 changes: 3 additions & 4 deletions sunkit_instruments/goes_xrs/tests/test_goes_xrs.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import astropy.units as u
import numpy as np
import pytest
from numpy.testing import assert_almost_equal, assert_array_equal
from scipy.io import readsav

import astropy.units as u
from astropy.time import Time
from astropy.units.quantity import Quantity
from numpy.testing import assert_almost_equal, assert_array_equal
from scipy.io import readsav
from sunpy import timeseries
from sunpy.time import TimeRange, is_time_equal, parse_time
from sunpy.util.exceptions import SunpyUserWarning
Expand Down
1 change: 0 additions & 1 deletion sunkit_instruments/iris/tests/test_iris.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import numpy as np
import pytest

import sunpy.map

from sunkit_instruments import iris
Expand Down
7 changes: 3 additions & 4 deletions sunkit_instruments/lyra/lyra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
This module provides processing routines for data captured with the LYRA (Lyman
Alpha Radiometer) instrument on Proba-2.
"""
import csv
import copy
import sqlite3
import csv
import datetime
from warnings import warn
import sqlite3
from urllib.parse import urljoin
from warnings import warn

import numpy as np
import pandas

from astropy.time import Time
from sunpy.data import cache
from sunpy.time import parse_time
Expand Down
5 changes: 2 additions & 3 deletions sunkit_instruments/lyra/tests/test_lyra.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import os.path
import datetime
import os.path

import astropy.units as u
import numpy as np
import pandas
import pytest

import astropy.units as u
from astropy.time import TimeDelta
from sunpy import timeseries
from sunpy.time import is_time_equal, parse_time
Expand Down
5 changes: 2 additions & 3 deletions sunkit_instruments/rhessi/rhessi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
data.
"""

import re
import csv

import numpy as np
import re

import astropy.units as u
import numpy as np
import sunpy.io
from astropy.time import Time, TimeDelta
from sunpy.coordinates import sun
Expand Down
3 changes: 1 addition & 2 deletions sunkit_instruments/rhessi/tests/test_rhessi.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import platform
import textwrap
from unittest import mock
from distutils.version import LooseVersion
from unittest import mock

import numpy as np
import pytest

import sunpy.io
import sunpy.map
from sunpy.time import is_time_equal, parse_time
Expand Down
3 changes: 1 addition & 2 deletions sunkit_instruments/suvi/io.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import os
import gzip
import logging
import os
import tempfile
from pathlib import Path

import h5py
import numpy

import sunpy.map
from astropy import units as u
from astropy.io import fits
Expand Down
5 changes: 2 additions & 3 deletions sunkit_instruments/suvi/suvi.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from pathlib import Path

import numpy as np
from scipy import interpolate
from scipy.ndimage import gaussian_filter

import sunpy.map
from astropy import units as u
from scipy import interpolate
from scipy.ndimage import gaussian_filter

from sunkit_instruments.suvi._variables import (
FILTER_SETUP,
Expand Down
1 change: 0 additions & 1 deletion sunkit_instruments/suvi/tests/test_io.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import numpy as np
import pytest

import sunpy.map
from astropy.io import fits
from sunpy.map.sources.suvi import SUVIMap
Expand Down
Loading