-
-
Notifications
You must be signed in to change notification settings - Fork 384
Modernize python packaging #851
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
base: develop
Are you sure you want to change the base?
Conversation
@mpenkov apart from the TODO below, this should be good to go
ref #848 (comment) |
5dbee20
to
0b7b5af
Compare
Can you please update the release/ subdirectory? What's the new process for making a new release? |
release/README.md
Outdated
 | ||
|
||
- Check that the [latest commit](https://github.com/piskvorky/smart_open/commits/develop) on `develop` passed all CI. | ||
- Make sure you're on `master` and you're up to date: | ||
- `git checkout master && git pull` | ||
- Merge `develop` into `master`. | ||
- `git pull origin develop --no-ff --no-edit && git push` | ||
- Draft a [new release](https://github.com/piskvorky/smart_open/releases/new). | ||
- Fill in the new tag + enter. | ||
- Confirm that it reads "Excellent! This tag will be created from the target when you publish this release.". | ||
- Select target branch `master`. | ||
- Click "Generate release notes" on the right top. | ||
- Keep the tab open. | ||
- Copy the generated bullet points into `CHANGELOG.md`. | ||
- Commit `CHANGELOG.md` to `master` and push: | ||
- `git checkout master && git pull && git add CHANGELOG.md && git commit -m "Update CHANGELOG.md" && git push` | ||
- Click "Publish release". | ||
- Github Actions `release.yml` is triggered, and uploads distributions to PyPI and to the Github Release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mpenkov how does this look? rendered version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple follow up commits, please look at the rendered version :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to reduce cognitive complexity as much as possible:
- Added a new update_changelog.py which iterates over the diff and prepends a new section to
CHANGELOG.md
in the same format as usual. - The rest of the versioning is now fully automatic: 4 scripts less, no more copy pasting.
…open into pypa-publish * 'develop' of https://github.com/RaRe-Technologies/smart_open: Remove head_bucket call from s3.SinglepartWriter (piskvorky#857)
I'm a bit busy with my life outside of open source at the moment, but I'll have a look at this as soon as I get some spare cycles. |
release/update_help_txt.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted here as part of release folder clean up (wasn't and won't be used during release flow) and opened #853
* 'develop' of https://github.com/ddelange/smart_open: Add help.txt linting step (piskvorky#853)
tests (package) | ||
transport | ||
utils | ||
version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first time #853 comes in handy: just pulled develop
and lint started failing on this PR :)
release/README.md
Outdated
|
||
- Check that the [latest commit](https://github.com/piskvorky/smart_open/commits/develop) on `develop` passed all CI. | ||
- Make sure you're on `develop` and you're up to date locally: | ||
- `git checkout develop && git pull` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we reduce the number of manual steps and copy/pasting here? Previously, releasing was a simple matter of calling prepare.sh and merge.sh and following the on-screen instructions, with occasional reference to this README.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fdd7e2e adds release/release.sh
with chmod +x 👍
Motivation
Fix #859
Release is failing.
release.yml
release.yml
(good security for trusted publishing: git release permission vs general push permission)dependabot.yml
to check for github actions updates monthly (opens PRs to bump actions/setup-python etc if available)setup.py
andversion.py
in favour ofpyproject.toml
andsetuptools_scm
for git-based versioningsmart_open
folder using rename commit to retain blame (as we don't want tests in the whl/tar.gz)v7....
as git tags prefix, it will be automatically stripped by setuptools_scm at runtime.a small demo of the versioning scheme of setuptools_scm:
Tests
Only delivery plumbing.
Work in progress
Checklist
Workflow