From 407a00de91bf9344ecf8b5d05afa842b9e60c6a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:35:06 -0500 Subject: [PATCH 1/3] Bump pypa/gh-action-pypi-publish from 1.12.2 to 1.12.3 (#236) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.12.2 to 1.12.3.
Release notes

Sourced from pypa/gh-action-pypi-publish's releases.

v1.12.3

✨ What's Improved

With the updates by @​woodruffw💰 and @​webknjaz💰 via #309 and #313, it is now possible to publish distribution packages that include core metadata v2.4, like those built using maturin. This is done by bumping Twine to v6.0.1 and pkginfo to v1.12.0.

📝 Docs

We've made an attempt to clarify the runtime and workflow shape that are expected to be supported for calling this action in: https://github.com/marketplace/actions/pypi-publish#Non-goals.

[!TIP] Please, let us know in the release discussion if anything still remains unclear. TL;DR always call pypi-publish once per job; don't invoke it in reusable workflows; physically move building the dists into separate jobs having restricted permissions and storing the dists as GitHub Actions artifacts; when using self-hosted runners, make sure to still use pypi-publish on a GitHub-provided infra with runs-on: ubuntu-latest, while building and testing may remain self-hosted; don't perform any other actions in the publishing job; don't call pypi-publish from composite actions.

🛠️ Internal Updates

@​br3ndonland💰 improved the container image generation automation to include Git SHA in #301. And @​woodruffw💰 added the workflow_ref context to Trusted Publishing debug logging in #305, helping us diagnose misconfigurations faster. #313 also extends the smoke test in the CI to check against the maturin-made dists. Additionally, jeepney and secretstorage transitive deps have been added to the pip constraint-based lock file, as Dependabot seems to have missed those earlier.

🪞 Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.12.2...v1.12.3

🧔‍♂️ Release Manager: @​webknjaz 🇺🇦

🙏 Special Thanks to @​samuelcolvin💰 for nudging me to cut this release sooner and for sponsoring me via @​pydantic💰!

🔌 Shameless Plug: The other day I've made this 🦋 Bluesky 🇺🇦 FOSS Maintainers Starter Pack subscribe to read news from people like me :)

💬 Discuss on Bluesky 🦋, on Mastodon 🐘 and on GitHub.

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pypa/gh-action-pypi-publish&package-manager=github_actions&previous-version=1.12.2&new-version=1.12.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cd.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index c951fd76..6f2adff5 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -58,7 +58,7 @@ jobs: ls -ltrh ls -ltrh dist - name: Publish to Test PyPI - uses: pypa/gh-action-pypi-publish@v1.12.2 + uses: pypa/gh-action-pypi-publish@v1.12.3 with: repository-url: https://test.pypi.org/legacy/ verbose: true @@ -96,5 +96,5 @@ jobs: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.12.2 + - uses: pypa/gh-action-pypi-publish@v1.12.3 if: startsWith(github.ref, 'refs/tags') From 6a7a87a71a08004f61bdd2b5d1eebfcad055e7ec Mon Sep 17 00:00:00 2001 From: "Connor Stone, PhD" Date: Tue, 14 Jan 2025 09:54:24 -0800 Subject: [PATCH 2/3] Mask initialize bug (#238) During initialization some models modified masked data, this would then be an issue if the data were unmasked. New version copies the data before doing modifications to preserve the original data --- astrophot/models/_shared_methods.py | 6 +++--- astrophot/models/galaxy_model_object.py | 2 +- astrophot/models/multi_gaussian_expansion_model.py | 2 +- astrophot/models/point_source.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/astrophot/models/_shared_methods.py b/astrophot/models/_shared_methods.py index c00b3b26..be31ef0d 100644 --- a/astrophot/models/_shared_methods.py +++ b/astrophot/models/_shared_methods.py @@ -180,7 +180,7 @@ def parametric_segment_initialize( return # Get the sub-image area corresponding to the model image target_area = target[model.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() if target_area.has_mask: mask = target_area.mask.detach().cpu().numpy() target_dat[mask] = np.median(target_dat[np.logical_not(mask)]) @@ -477,7 +477,7 @@ def spline_segment_initialize( profR = parameters["I(R)"].prof.detach().cpu().numpy() target_area = target[self.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() if target_area.has_mask: mask = target_area.mask.detach().cpu().numpy() target_dat[mask] = np.median(target_dat[np.logical_not(mask)]) @@ -578,7 +578,7 @@ def relspline_initialize(self, target=None, parameters=None, **kwargs): super(self.__class__, self).initialize(target=target, parameters=parameters) target_area = target[self.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() if target_area.has_mask: mask = target_area.mask.detach().cpu().numpy() target_dat[mask] = np.median(target_dat[np.logical_not(mask)]) diff --git a/astrophot/models/galaxy_model_object.py b/astrophot/models/galaxy_model_object.py index 7bad13b8..bbe2ec57 100644 --- a/astrophot/models/galaxy_model_object.py +++ b/astrophot/models/galaxy_model_object.py @@ -63,7 +63,7 @@ def initialize(self, target=None, parameters: Optional[Parameter_Node] = None, * if not (parameters["PA"].value is None or parameters["q"].value is None): return target_area = target[self.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() if target_area.has_mask: mask = target_area.mask.detach().cpu().numpy() target_dat[mask] = np.median(target_dat[np.logical_not(mask)]) diff --git a/astrophot/models/multi_gaussian_expansion_model.py b/astrophot/models/multi_gaussian_expansion_model.py index dd71726b..d6f42da8 100644 --- a/astrophot/models/multi_gaussian_expansion_model.py +++ b/astrophot/models/multi_gaussian_expansion_model.py @@ -62,7 +62,7 @@ def initialize(self, target=None, parameters=None, **kwargs): super().initialize(target=target, parameters=parameters) target_area = target[self.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() if target_area.has_mask: mask = target_area.mask.detach().cpu().numpy() target_dat[mask] = np.median(target_dat[np.logical_not(mask)]) diff --git a/astrophot/models/point_source.py b/astrophot/models/point_source.py index 6c8a3552..a05cc350 100644 --- a/astrophot/models/point_source.py +++ b/astrophot/models/point_source.py @@ -47,7 +47,7 @@ def initialize(self, target=None, parameters=None, **kwargs): if parameters["flux"].value is not None: return target_area = target[self.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() with Param_Unlock(parameters["flux"]), Param_SoftLimits(parameters["flux"]): icenter = target_area.plane_to_pixel(parameters["center"].value) edge = np.concatenate( From 8a6f651e8760ffa185e0aa35899cf7feeb44cdee Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:55:27 -0500 Subject: [PATCH 3/3] chore: update pre-commit hooks (#237) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.13.0...v1.14.1) Co-authored-by: Connor Stone, PhD Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1f7f06b5..83f8fe3c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,7 @@ repos: # args: ["--fix", "--show-fixes"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.13.0" + rev: "v1.14.1" hooks: - id: mypy files: src