Skip to content

Commit 7506d4c

Browse files
authored
Maintenance update project and dependencies (#428)
* Update project use project.toml and move config into own files * Fix most of the tests * ruff-check, ruff-format and codespell * Some spelling mistakes left need to check the meaning * More updates and fixes * Few more small fixes * Fix doc build * Revert unintentional spelling correction in IDB sql script. * Update tox test dep name * Add version.py to git * Skip unclear test add skipped test for later * Update workflow python version * Add remote data to github CI
1 parent 1f54c09 commit 7506d4c

143 files changed

Lines changed: 8242 additions & 7035 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codespellrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[codespell]
2+
skip = ,*.fits,*.fts,*.header,*.json,*.xsh,*cache*,*egg*,*extern*,.git,.idea,.tox,_build,*truncated,*.svg,.asv_env,.history,*.sql
3+
ignore-words-list =
4+
alog,
5+
nd,
6+
nin,
7+
observ,
8+
ot,
9+
te,
10+
upto,
11+
afile,
12+
precessed,
13+
process,
14+
livetime,
15+
technik,
16+
thirdparty,
17+
commutated,
18+
anc,
19+
soop,
20+
CODIN,
21+
allright

.coveragerc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[run]
2+
omit =
3+
stixcore/_sunpy_init*
4+
stixcore/conftest.py
5+
stixcore/*setup_package*
6+
stixcore/tests/*
7+
stixcore/*/tests/*
8+
stixcore/extern/*
9+
stixcore/version*
10+
*/stixcore/_sunpy_init*
11+
*/stixcore/conftest.py
12+
*/stixcore/*setup_package*
13+
*/stixcore/tests/*
14+
*/stixcore/*/tests/*
15+
*/stixcore/extern/*
16+
*/stixcore/version*
17+
18+
[report]
19+
exclude_lines =
20+
# Have to re-enable the standard pragma
21+
pragma: no cover
22+
# Don't complain about packages we have installed
23+
except ImportError
24+
# Don't complain if tests don't hit assertions
25+
raise AssertionError
26+
raise NotImplementedError
27+
# Don't complain about script hooks
28+
def main\(.*\):
29+
# Ignore branches that don't pertain to this version of Python
30+
pragma: py{ignore_python_version}
31+
# Don't complain about IPython completion helper
32+
def _ipython_key_completions_

.github/workflows/end2end_run.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python-version: ["3.9"]
23+
python-version: ["3.11"]
2424

2525
steps:
2626
- name: Checkout github repo (+ download lfs dependencies)
@@ -41,4 +41,4 @@ jobs:
4141
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
4242
- name: end2end test with pytest
4343
run: |
44-
pytest -p no:warnings --doctest-rst -m "end2end" --pyargs stixcore
44+
pytest -p no:warnings --doctest-rst -m "end2end" --pyargs stixcore --remote-data=any

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ docs/_build
153153
docs/generated
154154
docs/api
155155
docs/whatsnew/latest_changelog.txt
156-
stixcore/version.py
157156
htmlcov/
158157
*.prof
159158
pdpp.html
@@ -165,3 +164,4 @@ stixcore/data/test/products/end2end/
165164
monitor_status.json
166165
stixcore/data/test/idb/v2.26.38/idb.sqlite
167166
.python-version
167+
sunpy/_version.py

.isort.cfg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[settings]
2+
balanced_wrapping = True
3+
skip=docs/conf.py
4+
default_section = THIRDPARTY
5+
include_trailing_comma = True
6+
known_astropy = astropy, asdf
7+
known_first_party = stixcore
8+
length_sort = False
9+
length_sort_sections=stdlib
10+
line_length = 100
11+
multi_line_output = 3
12+
no_lines_before = LOCALFOLDER
13+
sections = STDLIB, THIRDPARTY, ASTROPY, FIRSTPARTY, LOCALFOLDER
14+
honor_noqa = True

.pre-commit-config.yaml

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,38 @@
1+
exclude: ".*(.csv|.fits|.fts|.fit|.header|.txt|tca.*|.json|.asdf)$|^CITATION.rst|(^|/)data/test(/|$)"
12
repos:
2-
# The warnings/errors we check for here are:
3-
# E101 - mix of tabs and spaces
4-
# W191 - use of tabs
5-
# W291 - trailing whitespace
6-
# W292 - no newline at end of file
7-
# W293 - trailing whitespace
8-
# W391 - blank line at end of file
9-
# E111 - 4 spaces per indentation level
10-
# E112 - 4 spaces per indentation level
11-
# E113 - 4 spaces per indentation level
12-
# E303 - too many blank lines (3)
13-
# E304 - blank lines found after function decorator
14-
# E305 - expected 2 blank lines after class or function definition
15-
# E306 - expected 1 blank line before a nested definition
16-
# E502 - the backslash is redundant between brackets
17-
# E722 - do not use bare except
18-
# E901 - SyntaxError or IndentationError
19-
# E902 - IOError
20-
# F822: undefined name in __all__
21-
# F823: local variable name referenced before assignment
22-
- repo: https://github.com/pycqa/flake8
23-
rev: 3.7.9
3+
# This should be before any formatting hooks like isort
4+
- repo: https://github.com/astral-sh/ruff-pre-commit
5+
rev: "v0.12.2"
246
hooks:
25-
- id: flake8
26-
args: ['--count', '--select', 'C90,E,W,F']
27-
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|docs/conf.py)$"
28-
- repo: https://github.com/myint/autoflake
29-
rev: v1.4
30-
hooks:
31-
- id: autoflake
32-
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
33-
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|docs/conf.py)$"
34-
- repo: https://github.com/timothycrosley/isort
35-
rev: 5.12.0
7+
- id: ruff-check
8+
args: ["--fix"]
9+
# Run the formatter.
10+
- id: ruff-format
11+
- repo: https://github.com/PyCQA/isort
12+
rev: 6.0.1
3613
hooks:
3714
- id: isort
38-
args: ['--sp','setup.cfg']
39-
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|cm/__init__.py|sunpy/extern|docs/conf.py)$"
4015
- repo: https://github.com/pre-commit/pre-commit-hooks
41-
rev: v2.4.0
16+
rev: v5.0.0
4217
hooks:
4318
- id: check-ast
4419
- id: check-case-conflict
4520
- id: trailing-whitespace
46-
exclude: ".*(.fits|.fts|.fit|.txt)$"
4721
- id: check-yaml
4822
- id: debug-statements
4923
- id: check-added-large-files
24+
args: ["--enforce-all", "--maxkb=1054"]
25+
exclude: ""
5026
- id: end-of-file-fixer
51-
exclude: ".*(.fits|.fts|.fit|.txt|tca.*)$"
5227
- id: mixed-line-ending
53-
exclude: ".*(.fits|.fts|.fit|.txt|tca.*)$"
28+
- repo: https://github.com/codespell-project/codespell
29+
rev: v2.4.1
30+
hooks:
31+
- id: codespell
32+
additional_dependencies:
33+
- tomli
34+
args: ["--write-changes"]
35+
36+
ci:
37+
autofix_prs: false
38+
autoupdate_schedule: "quarterly"

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ formats: []
1919
build:
2020
os: ubuntu-22.04
2121
tools:
22-
python: "3.9"
22+
python: "3.11"
2323

2424
# Optionally set the version of Python and requirements required to build your docs
2525
python:

.zenodo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"name": "Nicky Hochmuth",
1414
"orcid": "0009-0005-3785-7643",
1515
"affiliation": "Ateleris GmbH Switzerland"
16-
},
16+
}
1717
],
1818
"access_right": "open"
1919
}

MANIFEST.in

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
include README.rst
2-
include CHANGES.rst
3-
include setup.cfg
4-
include LICENSE.rst
5-
include pyproject.toml
1+
# Exclude specific files
2+
# All files which are tracked by git and not explicitly excluded here are included by setuptools_scm
3+
exclude .codecov.yaml
4+
exclude .editorconfig
5+
exclude .gitattributes
6+
exclude .gitignore
7+
exclude .mailmap
8+
exclude .pre-commit-config.yaml
9+
exclude .readthedocs.yaml
10+
exclude .rtd-environment.yml
11+
exclude .zenodo.json
12+
exclude tox.ini
613

7-
recursive-include stixcore *.pyx *.c *.pxd
8-
recursive-include docs *
9-
recursive-include licenses *
10-
recursive-include cextern *
11-
recursive-include scripts *
12-
recursive-include stixcore/config/data *
13-
recursive-include stixcore/data *
14-
15-
prune build
16-
prune docs/_build
17-
prune docs/api
14+
# Prune folders
15+
prune .circleci
16+
prune .github
17+
prune changelog
18+
prune sunpy/_dev
1819

19-
global-exclude *.pyc *.o
20+
# Add back in submodule data
21+
recursive-include stixcore/config/data *

azure-pipelines.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ variables:
33
CI_NAME: Azure Pipelines
44
CI_BUILD_ID: $(Build.BuildId)
55
CI_BUILD_URL: "https://dev.azure.com/https://github.com/i4Ds/STIXCore.git/_build/results?buildId=$(Build.BuildId)"
6-
CIBW_BUILD: cp39-* cp310-* cp311-*
6+
CIBW_BUILD: cp311-* cp312-* cp313-*
77
CIBW_SKIP: "*-win32 *-manylinux1_i686"
88

99
resources:
@@ -35,17 +35,17 @@ jobs:
3535
toxdeps: tox-pypi-filter
3636
submodules: true
3737
coverage: codecov
38-
default_python: '3.9'
38+
default_python: '3.11'
3939
envs:
40-
- macos: py39
41-
name: py39_mac
40+
- macos: py311
41+
name: py311_mac
4242
coverage: false
4343

44-
- windows: py39
45-
name: py39_win
44+
- windows: py311
45+
name: py311_win
4646

47-
- linux: py39
48-
name: py39_linux
47+
- linux: py311
48+
name: py311_linux
4949

5050
- linux: codestyle
5151
name: codestyle
@@ -67,6 +67,6 @@ jobs:
6767
# - wheels_macos
6868
- sdist
6969
dependsOn:
70-
- py39_test
71-
- py310_test
72-
- py311_test
70+
- py311_mac
71+
- py311_win
72+
- py311_linux

0 commit comments

Comments
 (0)