Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates from the package template #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/sunpy/package-template",
"commit": "1eff2ed0ff32c123e64b5faacf7c505362cfbb92",
"commit": "004020599c9133a7863cf5ef429e9340d18c0f2f",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
9 changes: 9 additions & 0 deletions .gitignore.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff a/.gitignore b/.gitignore (rejected hunks)
@@ -76,6 +76,7 @@ instance/
docs/_build/
# automodapi
docs/api
+docs/sg_execution_times.rst

# PyBuilder
.pybuilder/
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff a/.pre-commit-config.yaml b/.pre-commit-config.yaml (rejected hunks)
@@ -1,7 +1,7 @@
repos:
# This should be before any formatting hooks like isort
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: "v0.3.7"
+ rev: "v0.4.4"
hooks:
- id: ruff
args: ["--fix"]
19 changes: 19 additions & 0 deletions pytest.ini.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff a/pytest.ini b/pytest.ini (rejected hunks)
@@ -14,9 +14,15 @@ norecursedirs =
.history
sunpy/extern
doctest_plus = enabled
-doctest_optionflags = NORMALIZE_WHITESPACE FLOAT_CMP ELLIPSIS
+doctest_optionflags =
+ NORMALIZE_WHITESPACE
+ FLOAT_CMP
+ ELLIPSIS
text_file_format = rst
-addopts = --doctest-rst -p no:unraisableexception -p no:threadexception
+addopts =
+ --doctest-rst
+ -p no:unraisableexception
+ -p no:threadexception
filterwarnings =
# Turn all warnings into errors so they do not pass silently.
error
66 changes: 66 additions & 0 deletions tox.ini.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
diff a/tox.ini b/tox.ini (rejected hunks)
@@ -12,7 +12,6 @@ envlist =

[testenv]
pypi_filter = https://raw.githubusercontent.com/sunpy/sunpy/main/.test_package_pins.txt
-
# Run the tests in a temporary directory to make sure that we don't import
# the package from the source tree
change_dir = .tmp/{envname}
@@ -20,7 +19,6 @@ description =
run tests
oldestdeps: with the oldest supported version of key dependencies
devdeps: with the latest developer version of key dependencies
-
pass_env =
# A variable to tell tests we are on a CI system
CI
@@ -30,37 +28,35 @@ pass_env =
LOCALE_ARCHIVE
# If the user has set a LC override we should follow it
LC_ALL
-
set_env =
MPLBACKEND = agg
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
- # Define the base test command here to allow us to add more flags for each tox factor
- PYTEST_COMMAND = pytest -vvv -r fEs --pyargs sunpy --cov-report=xml --cov=sunpy --cov-config={toxinidir}/.coveragerc {toxinidir}/docs
-
deps =
# For packages which publish nightly wheels this will pull the latest nightly
devdeps: numpy>=0.0.dev0
# Packages without nightly wheels will be built from source like this
# devdeps: git+https://github.com/ndcube/ndcube
oldestdeps: minimum_dependencies
- pytest-cov
-
# The following indicates which extras_require will be installed
extras =
tests
-
commands_pre =
oldestdeps: minimum_dependencies sunpy --filename requirements-min.txt
oldestdeps: pip install -r requirements-min.txt
pip freeze --all --no-input
-
commands =
- # To run different commands for different factors exclude the factor from the default command like this
- # !online: {env:PYTEST_COMMAND} {posargs}
- # Then specify a specific one like this
- # online: {env:PYTEST_COMMAND} --remote-data=any {posargs}
+ # To amend the pytest command for different factors you can add a line
+ # which starts with a factor like `online: --remote-data=any \`
# If you have no factors which require different commands this is all you need:
- {env:PYTEST_COMMAND} {posargs}
+ pytest \
+ -vvv \
+ -r fEs \
+ --pyargs sunpy \
+ --cov-report=xml \
+ --cov=sunpy \
+ --cov-config={toxinidir}/.coveragerc \
+ {toxinidir}/docs \
+ {posargs}

[testenv:codestyle]
pypi_filter =