Skip to content

build: prepare modelhawk for publishing to PyPI - #12

Draft
Pyhroff wants to merge 1 commit into
mainfrom
claude/hopeful-pasteur-ywuubj
Draft

Pyhroff wants to merge 1 commit into
mainfrom
claude/hopeful-pasteur-ywuubj

Conversation

@Pyhroff

@Pyhroff Pyhroff commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Gets modelhawk ready for its first PyPI release. The name modelhawk was free on PyPI on 1 Dec 2026.

Changes

  • pyproject.toml: SPDX license = "MIT" (PEP 639) replaces the license table and the deprecated License classifier, and the build needs setuptools>=77.
  • requires-python goes from >=3.8 to >=3.9, and the 3.8 classifier is dropped. CI's oldest tested version is 3.9, so 3.8 was claimed but never run. Revert this if you want to keep 3.8 and add it to CI.
  • Author and Homepage URL added.
  • modelhawk.egg-info/ (build output) is no longer committed, and .gitignore now ignores *.egg-info/, build/ and dist/.
  • The README still says "no install" (python modelhawk.py ...), which stays true. After publishing you can add pipx install modelhawk.
  • .github/workflows/release.yml: the same workflow memsentry and ragsentry use. On a v* tag it builds, runs twine check, checks that the tag matches pyproject.toml's version, then publishes through PyPI trusted publishing (OIDC, no stored token). The action refs are pinned to commit SHAs, as in your other repos.

Verification

$ python -m build && twine check dist/*
PASSED (wheel and sdist)
# wheel installed into a fresh venv, then run from outside the source tree:
$ python -c "import modelhawk; print(modelhawk.__file__)"   # -> site-packages
$ modelhawk --help                                         # entry point works
$ pytest --import-mode=importlib tests                # against the installed wheel
10 passed

To publish (you)

  1. Merge this.
  2. On pypi.org: Your account → Publishing → Add a new pending publisher. Enter project modelhawk, owner Pyhroff, repository ModelHawk, workflow release.yml, environment pypi.
  3. Optionally, in this repo's Settings → Environments, create pypi and require your approval.
  4. Version 1.1.0 has never been tagged: git tag v1.1.0 && git push origin v1.1.0.
  5. Once it's live, change the README's "Install" section to pip install modelhawk. aisec-suite's README and docs/PORTFOLIO.md list ModelHawk as "not on PyPI", so update those too.

A pending publisher doesn't reserve the name. Until the first upload, anyone can register modelhawk, so don't wait too long between merging and tagging.


Generated by Claude Code

- SPDX license expression (PEP 639) instead of the license table and
  the License classifier; setuptools>=77, no separate wheel requirement.
- requires-python >=3.9: CI's oldest tested version is 3.9, so 3.8 was
  claimed but never run.
- Author and Homepage in the metadata.
- Stop tracking modelhawk.egg-info (build output) and ignore it.
- Release workflow that publishes through PyPI trusted publishing on a
  v* tag matching the version (same as memsentry and ragsentry).

Claude-Session: https://claude.ai/code/session_01DHVivbcpuTt8KAM1KQR5Lm
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.

1 participant