Skip to content

release.py: fix conda/PyPI name matching; propose next-minor caps - #567

Merged
jan-janssen merged 2 commits into
mainfrom
release-minor-cap
Oct 23, 2026
Merged

jan-janssen merged 2 commits into
mainfrom
release-minor-cap

Conversation

@ligerzero-ai

@ligerzero-ai ligerzero-ai commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

This PR changes .ci_support/release.py, which deploy.yml runs to turn the == pins in pyproject.toml into published ranges. It makes two bug fixes and one policy proposal, and they can be split if you'd rather take only the fixes.

1. Bug fix: name matching in get_env_version

l.replace("-", "") was meant to strip the YAML list marker, but it removes every hyphen. So matplotlib-base becomes matplotlibbase and scikit-learn becomes scikitlearn. Neither matches its name in pyproject.toml, so both fall through to an exact == pin. Released 0.0.48 shows the effect, in the optional extras:

  • scikit-learn==1.9.1; extra == "clusters"
  • matplotlib==3.11.2; extra == "matplotlib"

The fix strips only the "- " marker and maps matplotlib-base → matplotlib. A simulated deploy (environment-old.yml plus this script) then gives matplotlib>=3.8.0,<3.12.0 and scikit-learn>=1.2.1,<1.10.0.

2. Defensive fix: strip each list entry

Each entry parsed from a pin line is now .strip()ped. Without that, a pin written as the last item of a multi-line list (no trailing comma) keeps its newline, never matches, and stays exact. This doesn't currently affect structuretoolkit's pyproject.toml, but it is the bug behind matplotlib==3.11.1; extra == "plot" in vaspparser 0.0.12, which uses the same script.

3. Policy proposal: cap at the next minor instead of <=pin

Today a dependency with a lower version in environment-old.yml is published as >=old,<=pin. For example, 0.0.48 has numpy<=2.5.3, so every new patch release of numpy needs a new structuretoolkit release before the two can be installed together.

This PR caps at the next minor instead, <X.(Y+1).0 (e.g. numpy>=1.23.5,<2.6.0). A version whose minor part isn't an integer keeps <=pin. Pins with no older version in environment-old.yml stay exact as before.

For context: this is a policy choice, not a correction. The shared pyiron/actions release workflow defaults to semantic-upper-bound: 'patch', which is in the same spirit as <=pin. pyiron_workflow, semantikon and pyiron_workflow_atomistics opt into 'minor', and this proposes the same for structuretoolkit. Happy to drop this part and keep only the fixes above.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a08b42d4-c66c-4f82-9a99-13b3c2986ddb
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.44%. Comparing base (62e905d) to head (d8073fa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #567   +/-   ##
=======================================
  Coverage   97.44%   97.44%           
=======================================
  Files          29       29           
  Lines        2033     2033           
=======================================
  Hits         1981     1981           
  Misses         52       52           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ligerzero-ai ligerzero-ai changed the title release.py: cap dependencies at the next minor instead of <=pin; fix conda name mapping release.py: fix conda/PyPI name matching; propose next-minor caps Oct 22, 2026
@jan-janssen
jan-janssen merged commit aecfeec into main Oct 23, 2026
21 checks passed
@jan-janssen
jan-janssen deleted the release-minor-cap branch October 23, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants