timaeus-research / devinterp

Tools for studying developmental interpretability in neural networks.
77 stars 14 forks source link

Add a CI job for deploying to {test,}pypi #66

Closed JasonGross closed 9 months ago

JasonGross commented 9 months ago

This CI job will build the distribution and deploy to test-pypi on all pushes and PRs to main. Additionally, it will deploy to pypi on all tagged releases.

The setup follows https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ very closely, with a few minor adjustments:

  1. publishing to pypi happens only on releases
  2. publishing to test-pypi does not happen on releases
  3. the version is automatically bumpped to $ver.dev$(date +%s) on test-pypi deployment
  4. a push or pull request is automatically created after a tagged release, bumping the version

Note that someone with permission will need to configure pypi and testpypi to accept packages from github actions as per Python's instructions.