From 44cf6b80821531b3cc7b84eb5bdf0c1b1e49ea09 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:44:16 -0700 Subject: [PATCH] Updates from the package template (#222) * Automatic package template update * Update .pre-commit-config.yaml @nabobalis leave it to the bot :stuck_out_tongue: * fix CI --------- Co-authored-by: Cadair <1391051+Cadair@users.noreply.github.com> Co-authored-by: Stuart Mumford Co-authored-by: Nabil Freij --- .cruft.json | 2 +- .pre-commit-config.yaml | 2 +- docs/nitpick-exceptions | 1 + sunkit_image/tests/test_enhance.py | 2 -- sunkit_image/tests/test_trace.py | 14 -------------- 5 files changed, 3 insertions(+), 18 deletions(-) diff --git a/.cruft.json b/.cruft.json index 17a80229..747f3f7d 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "c79fc5bff74958e24c9a925a330b8d3aa138f4ce", + "commit": "112d7d4adf0fa168bbb9ddb1886ad4f1e595b8be", "checkout": null, "context": { "cookiecutter": { diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 03c79482..41dc0a61 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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"] diff --git a/docs/nitpick-exceptions b/docs/nitpick-exceptions index e537fc88..f6be0171 100644 --- a/docs/nitpick-exceptions +++ b/docs/nitpick-exceptions @@ -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 diff --git a/sunkit_image/tests/test_enhance.py b/sunkit_image/tests/test_enhance.py index b91f52e3..8441965d 100644 --- a/sunkit_image/tests/test_enhance.py +++ b/sunkit_image/tests/test_enhance.py @@ -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) @@ -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) diff --git a/sunkit_image/tests/test_trace.py b/sunkit_image/tests/test_trace.py index c4e4c93a..c20c6361 100644 --- a/sunkit_image/tests/test_trace.py +++ b/sunkit_image/tests/test_trace.py @@ -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) @@ -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