Skip to content

Commit 68f8de3

Browse files
author
Nabil Freij
authored
tidy up for release (#86)
1 parent 1701c96 commit 68f8de3

25 files changed

+100
-142
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
jobname:
3333
type: string
3434
docker:
35-
- image: circleci/python:3.8
35+
- image: cimg/python:3.9
3636
environment:
3737
TOXENV=<< parameters.jobname >>
3838
steps:
@@ -55,7 +55,7 @@ jobs:
5555
jobname:
5656
type: string
5757
docker:
58-
- image: circleci/python:3.8
58+
- image: cimg/python:3.9
5959
environment:
6060
TOXENV: << parameters.jobname >>
6161
GIT_SSH_COMMAND: ssh -i ~/.ssh/id_rsa_6464b6a8248237ca368fd4690777d921

.pre-commit-config.yaml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
1-
ci:
2-
autofix_prs: false
31
repos:
4-
- repo: https://github.com/psf/black
5-
rev: 22.3.0
2+
- repo: https://github.com/myint/docformatter
3+
rev: v1.4
64
hooks:
7-
- id: black
8-
- repo: https://github.com/myint/autoflake
5+
- id: docformatter
6+
args: [--in-place, --pre-summary-newline, --make-summary-multi]
7+
- repo: https://github.com/myint/autoflake
98
rev: v1.4
109
hooks:
1110
- id: autoflake
1211
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
1312
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|docs/conf.py)$"
14-
- repo: https://github.com/PyCQA/isort
15-
rev: 5.10.1
16-
hooks:
13+
- repo: https://github.com/psf/black
14+
rev: 22.3.0
15+
hooks:
16+
- id: black
17+
exclude: ".*(.fits|.fts|.fit|.txt|.csv)$"
18+
- repo: https://github.com/PyCQA/isort
19+
rev: 5.10.1
20+
hooks:
1721
- id: isort
18-
args: ['--sp','setup.cfg']
19-
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|docs/conf.py)$"
20-
- repo: https://github.com/pre-commit/pre-commit-hooks
21-
rev: v4.2.0
22-
hooks:
22+
exclude: ".*(.fits|.fts|.fit|.txt|.csv)$"
23+
- repo: https://github.com/pre-commit/pre-commit-hooks
24+
rev: v4.2.0
25+
hooks:
2326
- id: check-ast
2427
- id: check-case-conflict
2528
- id: trailing-whitespace
26-
exclude: ".*(.fits|.fts|.fit|.txt)$"
29+
exclude: ".*(.fits|.fts|.fit|.txt|.csv)$"
30+
- id: mixed-line-ending
31+
exclude: ".*(.fits|.fts|.fit|.txt|.csv)$"
32+
- id: end-of-file-fixer
33+
exclude: ".*(.fits|.fts|.fit|.txt|.csv)$"
2734
- id: check-yaml
2835
- id: debug-statements
29-
- id: check-added-large-files
30-
- id: end-of-file-fixer
31-
exclude: ".*(.fits|.fts|.fit|.txt|tca.*)$"
32-
- id: mixed-line-ending
33-
exclude: ".*(.fits|.fts|.fit|.txt|tca.*)$"
36+
37+
ci:
38+
autofix_prs: false

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
0.4.2 (2022-05-24)
2+
==================
3+
4+
Breaking Changes
5+
----------------
6+
7+
- Minimum version of ``sunpy`` required is now 4.0.0
8+
19
0.4.1 (2022-04-05)
210
==================
311

azure-pipelines.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,13 @@ stages:
5858
apt:
5959
- graphviz
6060
envs:
61-
- macos: py37
62-
- windows: py38
61+
- macos: py38
62+
- windows: py39
6363
- linux: build_docs
6464
posargs: " "
6565
pytest: false
6666
- linux: py39-online
67-
- linux: py37-oldestdeps
68-
- linux: py39-conda
69-
libraries: {}
67+
- linux: py38-oldestdeps
7068

7169
- ${{ if or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual')) }}:
7270
- stage: CronTests
@@ -81,6 +79,8 @@ stages:
8179
toxdeps: tox-pypi-filter
8280
envs:
8381
- linux: py310-devdeps
82+
- linux: py39-conda
83+
libraries: {}
8484

8585
# On branches which aren't main, and not Pull Requests, build the wheels but only upload them on tags
8686
- ${{ if and(ne(variables['Build.Reason'], 'PullRequest'), or(ne(variables['Build.SourceBranchName'], 'main'), eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual'))) }}:

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
22
Configuration file for the Sphinx documentation builder.
3+
34
isort:skip_file
45
"""
56
# flake8: NOQA: E402

examples/tracing_loops.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@
4545
# The base flux and median flux ratio ``qthresh1`` is 0.0.
4646
# The noise threshold in the image with repect to median flux ``qthresh2`` is 3.0 .
4747
# For the meaning of these parameters please consult the OCCULT2 article.
48-
loops = trace.occult2(
49-
trace_map.data, nsm1=3, rmin=30, lmin=25, nstruc=1000, ngap=0, qthresh1=0.0, qthresh2=3.0
50-
)
48+
loops = trace.occult2(trace_map.data, nsm1=3, rmin=30, lmin=25, nstruc=1000, ngap=0, qthresh1=0.0, qthresh2=3.0)
5149

5250
###############################################################################
5351
# `~sunkit_image.trace.occult2` returns a list, each element of which is a detected loop.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
requires = [
33
"extension-helpers",
44
"oldest-supported-numpy",
5-
"setuptools_scm",
6-
"setuptools",
5+
"setuptools>=56,!=61.0.0",
6+
"setuptools_scm[toml]>=6.2",
77
"wheel",
88
]
99
build-backend = 'setuptools.build_meta'
1010

1111
[tool.black]
12-
line-length = 110
12+
line-length = 120
1313
include = '\.pyi?$'
1414
exclude = '''
1515
(

setup.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ classifiers =
1919
Operating System :: OS Independent
2020
Programming Language :: Python
2121
Programming Language :: Python :: 3
22-
Programming Language :: Python :: 3.7
2322
Programming Language :: Python :: 3.8
2423
Programming Language :: Python :: 3.9
24+
Programming Language :: Python :: 3.10
2525
Topic :: Scientific/Engineering :: Physics
2626

2727
[options]
28-
python_requires = >=3.7
28+
python_requires = >=3.8
2929
packages = find:
3030
include_package_data = True
3131
setup_requires =
3232
setuptools_scm
3333
install_requires =
3434
scikit-image>=0.18.0
35-
sunpy>=3.0.0
35+
sunpy>=4.0.0
3636

3737
[options.extras_require]
3838
tests =

sunkit_image/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ class UnsupportedPythonError(Exception):
2323

2424
if sys.version_info < tuple(int(val) for val in __minimum_python_version__.split(".")):
2525
# This has to be .format to keep backwards compatibly.
26-
raise UnsupportedPythonError(
27-
"sunkit_image does not support Python < {}".format(__minimum_python_version__)
28-
)
26+
raise UnsupportedPythonError("sunkit_image does not support Python < {}".format(__minimum_python_version__))
2927

3028
__all__ = []

sunkit_image/_dev/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
This package contains utilities that are only used when developing sunkit_image in a
3-
copy of the source repository.
2+
This package contains utilities that are only used when developing sunkit_image
3+
in a copy of the source repository.
4+
45
These files are not installed, and should not be assumed to exist at
56
runtime.
67
"""

0 commit comments

Comments
 (0)