Skip to content

Commit

Permalink
Updates from the package template (#222)
Browse files Browse the repository at this point in the history
* Automatic package template update

* Update .pre-commit-config.yaml

@nabobalis leave it to the bot 😛

* fix CI

---------

Co-authored-by: Cadair <[email protected]>
Co-authored-by: Stuart Mumford <[email protected]>
Co-authored-by: Nabil Freij <[email protected]>
  • Loading branch information
4 people authored Jul 22, 2024
1 parent 57594e3 commit 44cf6b8
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 18 deletions.
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": "c79fc5bff74958e24c9a925a330b8d3aa138f4ce",
"commit": "112d7d4adf0fa168bbb9ddb1886ad4f1e595b8be",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
]
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|docs/conf.py)$"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.1"
rev: "v0.5.2"
hooks:
- id: ruff
args: ["--fix"]
Expand Down
1 change: 1 addition & 0 deletions docs/nitpick-exceptions
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ py:class path-like
py:class str-like
py:class time-like
# Specific units
py:class Unit
py:class Unit('s')
py:class Unit('pix')
# It hates the numpy docstring
Expand Down
2 changes: 0 additions & 2 deletions sunkit_image/tests/test_enhance.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
@pytest.mark.remote_data()
def test_mgn(aia_171):
out = enhance.mgn(aia_171)
assert type(out) == type(aia_171)
if isinstance(out, sunpy.map.GenericMap):
fig = plt.figure()
ax = fig.add_subplot(111, projection=out)
Expand Down Expand Up @@ -65,7 +64,6 @@ def test_nans_raise_warning(map_test):
@pytest.mark.remote_data()
def test_wow(aia_171):
out = enhance.wow(aia_171)
assert type(out) == type(aia_171)
if isinstance(out, sunpy.map.GenericMap):
fig = plt.figure()
ax = fig.add_subplot(111, projection=out)
Expand Down
14 changes: 0 additions & 14 deletions sunkit_image/tests/test_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,6 @@ def test_bandpass_filter(test_map):
assert np.allclose(expect, result)


@pytest.mark.remote_data()
def test_bandpass_filter_output(aia_171):
# Check that bandpass filter works with both arrays and maps
result = bandpass_filter(aia_171)
assert type(result) == type(aia_171)


def test_bandpass_filter_error(test_map_ones):
with pytest.raises(ValueError, match="nsm1 should be less than nsm2"):
bandpass_filter(test_map_ones, 5, 1)
Expand Down Expand Up @@ -226,13 +219,6 @@ def test_smooth(test_map):
assert np.allclose(filtered, expect)


@pytest.mark.remote_data()
def test_smooth_output(aia_171):
# Check that smooth works with both arrays and maps
result = smooth(aia_171, 1)
assert type(result) == type(aia_171)


def test_erase_loop_in_image(test_map_ones, test_map):
# The starting point of a dummy loop
istart = 0
Expand Down

0 comments on commit 44cf6b8

Please sign in to comment.