Browse Source

Added new post and imported fix from the-plain-libre.

dev
Franco Masotti 4 years ago
parent
commit
a167b79a99
  1. 69
      _posts/2018-04-17-python-release-workflow.md
  2. 15
      _sass/main.scss

69
_posts/2018-04-17-python-release-workflow.md

@ -0,0 +1,69 @@
---
title: My Python release workflow
tags: [python, git]
updated: 2018-04-17 15:00
description: A personal reminder with the instructions for releasing new versions of Python packages
---
This is a personal reminder for the operations to do
in case of a new version release with some of my Python repositories.
<!--more-->
## Rules
- Use [fpyutils](https://github.com/frnmst/fpyutils) or [md_toc](https://github.com/frnmst/md-toc), as example blueprints.
- Assume that the root of the repository is `./`.
- Variables are marked with the dollar (`$`) sign.
## Workflow
1. Check that the current branch is not `master`:
```shell
[ "$(echo git branch | grep "*" | tr -d '* ')" = "master" ] && echo "STOP" || echo "OK"
```
1. Finish working on the development branch (usually `dev`) and commit
1. `git add -A`
2. `git commit -am "$commit_message"`
3. `git push`
2. Update version numbers and do all necessary verifications
1. update version numbers in:
- `./setup.py`
- `./docs/conf.py`
- any file in the `./packages` directory.
2. `make pep`
3. `make test`
4. `sudo make install`
5. `cd ~ && python`
6. `import $package_name`
7. `cd $OLDPWD`
8. `sudo make remove`
9. `make clean`
10. `git add -A`
11. `git commit -am "Preparing for new release."`
12. `git push`
3. Update the documentation
1. `make doc`
2. `cp -aR docs/_build/html ~`
3. `git checkout gh-pages`
4. `rm -rf _sources _static`
5. `mv ~/html/{*,.nojekyll,.buildinfo} .`
6. `git add -A`
7. `git commit -am "New release."`
8. `git push`
4. Merge the `$dev_branch` branch into `master` and create a new annotated git tag
1. `git checkout master`
2. `git merge $dev_branch`
3. `git tag -a $version_id -m "New release."`
4. `git push`
5. `git push origin $version_id`
5. Upload the package to PIP
1. `make dist`
2. `make upload`
6. Update downstream districution packages (eg: `PKGBUILD` files).

15
_sass/main.scss

@ -127,8 +127,7 @@ iframe {
margin: 45px 0 !important;
}
ul,
ol {
ul {
list-style-type: circle;
margin: 40px 0;
padding-left: 50px;
@ -141,6 +140,18 @@ ol {
}
}
ol {
margin: 40px 0;
padding-left: 50px;
li {
word-wrap: break-word;
}
img {
margin: 40px 0;
border-radius: 5px;
}
}
sup {
vertical-align: top;
position: relative;

Loading…
Cancel
Save