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 #187

Merged
merged 2 commits into from
Jan 20, 2025
Merged
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
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/sunpy/package-template",
"commit": "d6b86e07efa31959f43e99ba32d323cf76736a05",
"commit": "ff0522bc171a1fc63022ed2a371f70669173012e",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down Expand Up @@ -32,7 +32,7 @@
".github/workflows/sub_package_update.yml"
],
"_template": "https://github.com/sunpy/package-template",
"_commit": "d6b86e07efa31959f43e99ba32d323cf76736a05"
"_commit": "ff0522bc171a1fc63022ed2a371f70669173012e"
}
},
"directory": null
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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.8.6"
rev: "v0.9.1"
hooks:
- id: ruff
args: ["--fix", "--unsafe-fixes"]
Expand Down
9 changes: 3 additions & 6 deletions sunkit_pyvista/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ def verify_cache_images(plotter):
allowed_warning = IMAGE_REGRESSION_WARNING

if test_name is None:
msg = (
"Unable to identify calling test function. This function "
"should only be used within a pytest environment."
)
msg = "Unable to identify calling test function. This function should only be used within a pytest environment."
raise RuntimeError(
msg,
)
Expand All @@ -83,13 +80,13 @@ def verify_cache_images(plotter):

error = pyvista.compare_images(str(image_filename), plotter)
if error > allowed_error:
msg = "Exceeded image regression error of " f"{IMAGE_REGRESSION_ERROR} with an image error of " f"{error}"
msg = f"Exceeded image regression error of {IMAGE_REGRESSION_ERROR} with an image error of {error}"
raise RuntimeError(
msg,
)
if error > allowed_warning:
warnings.warn(
"Exceeded image regression warning of " f"{IMAGE_REGRESSION_WARNING} with an image error of " f"{error}",
f"Exceeded image regression warning of {IMAGE_REGRESSION_WARNING} with an image error of {error}",
stacklevel=2,
)
return None
Expand Down
4 changes: 2 additions & 2 deletions sunkit_pyvista/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def set_view_angle(self, angle: u.deg):
"""
view_angle = angle.to_value(u.deg)
if not (view_angle > 0 and view_angle <= 180):
msg = "specified view angle must be " "0 deg < angle <= 180 deg"
msg = "specified view angle must be 0 deg < angle <= 180 deg"
raise ValueError(msg)
zoom_value = self.camera.view_angle / view_angle
self.camera.zoom(zoom_value)
Expand Down Expand Up @@ -290,7 +290,7 @@ def plot_map(
clip_interval=clip_interval,
)
else:
msg = "Clip percentile interval must be " "specified as two numbers."
msg = "Clip percentile interval must be specified as two numbers."
raise ValueError(
msg,
)
Expand Down
2 changes: 1 addition & 1 deletion sunkit_pyvista/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
except Exception:
import warnings

warnings.warn(f'could not determine {__name__.split(".")[0]} package version; this indicates a broken installation')
warnings.warn(f"could not determine {__name__.split('.')[0]} package version; this indicates a broken installation")
del warnings

version = "0.0.0"
Loading