Skip to content

makes changes to publish to PyPI #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

anthonyduong9
Copy link
Contributor

@anthonyduong9 anthonyduong9 commented Apr 17, 2025

Renames the project to eai-delphi, sets up fully automated releases from CI, adds a PyPI publish GitHub Action, and moves tests outside of the package, since that's where they are in https://github.com/pypa/sampleproject.

The fully automated releases use the commit messages to determine the next semantic version number. For example:

  • a commit message with prefix fix: increments the PATCH version, e.g. 0.0.0 -> 0.0.1
  • a commit message with prefix feat: increments the MINOR version, e.g. 0.0.0 -> 0.1.0
  • a commit message with BREAKING CHANGE: in the footer, increments the MAJOR version, e.g. 0.0.0 -> 1.0.0.

IMO, this works best if you select the Squash and merge option on PRs, to edit and use the merge message.

Important

Before merging,

  1. log in at https://pypi.org/
  2. go to https://pypi.org/manage/account/publishing/
  3. fill in the fields like
Screenshot 2025-04-16 at 8 15 11 PM
  1. click Add.

Fixes #116

@anthonyduong9 anthonyduong9 force-pushed the make-changes-to-publish-to-PyPI branch from 1bb5a58 to b15ede5 Compare April 17, 2025 03:24
@anthonyduong9 anthonyduong9 marked this pull request as ready for review April 17, 2025 03:25
@anthonyduong9
Copy link
Contributor Author

@luciaquirke it sounds like you also took a step before 1-4 (to register a trusted publisher) but wasn't sure what it was and so didn't write it, in case it'd mislead.

@anthonyduong9 anthonyduong9 force-pushed the make-changes-to-publish-to-PyPI branch from b15ede5 to 12f5f0d Compare April 21, 2025 04:00
@anthonyduong9 anthonyduong9 force-pushed the make-changes-to-publish-to-PyPI branch from 12f5f0d to e90c0e6 Compare April 21, 2025 04:01
@@ -278,7 +278,9 @@ pytest .

Run an end-to-end test:

```python -m delphi.tests.e2e```
```python -m tests.e2e```
Copy link
Contributor

@luciaquirke luciaquirke Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't work for me, was this changed intentionally? I'm going to revert this part in main unless I'm missing something, lmk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work now? I made the change because I'd moved the tests directory out of the delphi directory. But because tests/* was in .gitignore, I had to push again so those files would be in the PR - maybe I hadn't done that by the time you ran the command.

@luciaquirke
Copy link
Contributor

Thanks for the contribution! 🚀

@luciaquirke luciaquirke merged commit f604299 into EleutherAI:main Apr 21, 2025
4 checks passed
@anthonyduong9
Copy link
Contributor Author

Thanks for the contribution! 🚀

No problem!

Also, I don't see eai-delphi on PyPI, and I see the publish steps aren't being run (e.g. at https://github.com/EleutherAI/delphi/actions/runs/14567429264/job/40858900354). Does someone need to upload with twine and/or add a trusted publisher?

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.

It'd be helpful to publish delphi to PyPI
2 participants