Skip to content

Adopt the src layout, VCS versioning and supply chain pinning - #1057

Merged
Zethson merged 1 commit into
mainfrom
feat/src-layout
Jul 28, 2026
Merged

Adopt the src layout, VCS versioning and supply chain pinning#1057
Zethson merged 1 commit into
mainfrom
feat/src-layout

Conversation

@Zethson

@Zethson Zethson commented Jul 28, 2026

Copy link
Copy Markdown
Member

Aligns packaging with the scverse cookiecutter and closes the supply chain gaps that repo-health flags.

Packaging

  • pertpy/ moves to src/pertpy/, with tool.hatch.build.targets.wheel.packages pointing at it. The built wheel is unchanged: pertpy/ at the top level, py.typed included.
  • The version now comes from the git tags via hatch-vcs, so releases no longer need a pyproject.toml edit — just the tag. docs/conf.py already read the version from the installed metadata, so it needed no change.
  • requires-python drops the <3.15 upper bound.
  • tool.coverage.paths maps the installed package back onto src, so codecov still annotates the repository files.

Read the Docs shallow-clones and fetches only the branch being built, which makes VCS versioning report a wrong version. The post_checkout job in .readthedocs.yml is the remedy RTD documents for exactly this.

Supply chain

  • Every pre-commit hook is pinned to a commit SHA in the standard # frozen: form (security/precommit-pinned).
  • Dependabot now covers the pre-commit ecosystem alongside github-actions, matching the template's config (security/dependabot).

Actions were already SHA-pinned and every workflow already declares a minimal top-level permissions:, so security/actions-pinned and the workflow half of security/workflow-permissions were already green.

Moves the package to `src/pertpy` and derives the version from the git
tags with hatch-vcs, both as the scverse cookiecutter recommends, and
drops the `<3.15` upper bound on `requires-python`.

Pins every pre-commit hook to a commit SHA and lets Dependabot update the
pre-commit ecosystem alongside the actions, which closes the remaining
supply chain gaps that scverse/repo-health flags.
@Zethson
Zethson merged commit 84a701a into main Jul 28, 2026
19 of 20 checks passed
@Zethson
Zethson deleted the feat/src-layout branch July 28, 2026 14:17
@codecov-commenter

codecov-commenter commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.81%. Comparing base (6ff5978) to head (02c0e69).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1057   +/-   ##
=======================================
  Coverage   78.81%   78.81%           
=======================================
  Files          52       52           
  Lines        7280     7280           
=======================================
  Hits         5738     5738           
  Misses       1542     1542           
Files with missing lines Coverage Δ
src/pertpy/__init__.py 100.00% <ø> (ø)
src/pertpy/_doc.py 100.00% <ø> (ø)
src/pertpy/_logger.py 73.45% <ø> (ø)
src/pertpy/_parallel.py 72.72% <ø> (ø)
src/pertpy/_types.py 100.00% <ø> (ø)
src/pertpy/data/__init__.py 100.00% <ø> (ø)
src/pertpy/data/_dataloader.py 100.00% <ø> (ø)
src/pertpy/data/_datasets.py 100.00% <ø> (ø)
src/pertpy/metadata/__init__.py 100.00% <ø> (ø)
src/pertpy/metadata/_cell_line.py 54.44% <ø> (ø)
... and 42 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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