Skip to content

Commit dfaeea8

Browse files
committed
update release.md
1 parent 313d5d7 commit dfaeea8

File tree

3 files changed

+44
-73
lines changed

3 files changed

+44
-73
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.github/.tmp/
2+
tests/readme_test/
23

34
# Byte-compiled / optimized / DLL files
45
__pycache__/

RELEASE.md

Lines changed: 42 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@ The process of releasing a new version involves several steps:
1414

1515
6. [Milestone](#milestone)
1616

17-
7. [HISTORY.md](#history.md)
17+
7. [Update HISTORY](#update-history)
1818

19-
8. [Distribution](#distribution)
19+
8. [Check the release](#check-the-release)
2020

21-
9. [Making the release](#making-the-release)
21+
8. [Bump Version](#bump-version)
2222

23-
9.1. [Tag and release to PyPI](#tag-and-release-to-pypi)
24-
25-
9.2. [Update the release on GitHub](#update-the-release-on-github)
23+
10. [Create the Release on GitHub](#create-the-release-on-github)
2624

25+
11. [Close milestone and create new milestone](#close-milestone-and-create-new-milestone)
2726

2827
## Install Copulas from source
2928

@@ -73,7 +72,7 @@ isort -c copulas tests examples
7372
```
7473

7574
The execution has finished with no errors, 1 test skipped and 3 warnings.
76-
75+
7776
## Documentation
7877

7978
The documentation must be up to date and generated with:
@@ -112,7 +111,7 @@ Before doing the actual release, we need to test that the candidate works with S
112111
git checkout -b test-copulas-X.Y.Z
113112
```
114113

115-
2. Update the pyproject.toml to set the minimum version of Copulas to be the same as the version of the release. For example,
114+
2. Update the pyproject.toml to set the minimum version of Copulas to be the same as the version of the release. For example,
116115

117116
```toml
118117
'copulas>=X.Y.Z.dev0'
@@ -130,7 +129,7 @@ git push --set-upstream origin test-copulas-X.Y.Z
130129

131130
## Milestone
132131

133-
It's important check that the git hub and milestone issues are up to date with the release.
132+
It's important check that the GitHub and milestone issues are up to date with the release.
134133

135134
You neet to check that:
136135

@@ -142,101 +141,71 @@ You neet to check that:
142141
- All the pull requests closed since the latest release are associated to an issue. If necessary, create issues
143142
and assign them to the milestone. Also assigne the person who opened the issue to them.
144143

145-
## HISTORY.md
144+
## Update HISTORY
145+
Run the [Release Prep](https://github.com/sdv-dev/Copulas/actions/workflows/prepare_release.yml) workflow. This workflow will create a pull request with updates to HISTORY.md
146146

147147
Make sure HISTORY.md is updated with the issues of the milestone:
148148

149149
```
150150
# History
151-
151+
152152
## X.Y.Z (YYYY-MM-DD)
153-
153+
154154
### New Features
155-
155+
156156
* <ISSUE TITLE> - [Issue #<issue>](https://github.com/sdv-dev/Copulas/issues/<issue>) by @resolver
157-
157+
158158
### General Improvements
159-
159+
160160
* <ISSUE TITLE> - [Issue #<issue>](https://github.com/sdv-dev/Copulas/issues/<issue>) by @resolver
161-
161+
162162
### Bug Fixed
163-
163+
164164
* <ISSUE TITLE> - [Issue #<issue>](https://github.com/sdv-dev/Copulas/issues/<issue>) by @resolver
165165
```
166166

167167
The issue list per milestone can be found [here][milestones].
168168

169169
[milestones]: https://github.com/sdv-dev/Copulas/milestones
170170

171-
## Distribution
172-
173-
Generate the distribution executing:
174-
175-
```bash
176-
make dist
177-
```
178-
179-
This will create a `dist` and `build` directories. The `dist` directory contains the library installer.
180-
181-
```
182-
dist/
183-
├── copulas-<version>-py2.py3-none-any.whl
184-
└── copulas-<version>.tar.gz
185-
```
186-
187-
Now, create a new virtualenv with the distributed file generated and run the README.md examples:
188-
189-
1. Create the copulas-test directory (out of the Copulas directory):
171+
Put the pull request up for review and get 2 approvals to merge into `main`.
190172

191-
```bash
192-
mkdir copulas-test
193-
cd copulas-test
194-
```
195-
196-
2. Create a new virtuelenv and activate it:
173+
## Check the release
174+
Check if the release can be made:
197175

198176
```bash
199-
virtualenv -p $(which python3.6) .venv
200-
source .venv/bin/activate
177+
make check-release
201178
```
202179

203-
3. Install the wheel distribution:
204-
205-
```bash
206-
pip install /path/to/copulas/dist/<copulas-distribution-version-any>.whl
180+
## Bump Version
181+
The `stable` branch needs to updated with the changes from `main`. Run the following:
182+
```shell
183+
git checkout main
184+
git pull origin main
185+
make git-merge-main-stable
207186
```
208187

209-
4. Now you are ready to execute the README.md examples.
210-
211-
## Making the release
188+
Depending on the type of release, you will need to one of these different commands to bump the version:
212189

213-
At the end, we need to make the release. First, check if the release can be made:
190+
**Note**: Run `git pull origin main && git checkout main` first.
214191

215-
```bash
216-
make check-release
217-
```
192+
* `bumpversion-patch`: This will release a patch, which is the most common type of release. Use this when the changes are bugfixes or enhancements that do not modify the existing user API. Changes that modify the user API to add new features but that do not modify the usage of the previous features can also be released as a patch.
193+
* `bumpversion-minor`: This will release the next minor version. Use this if the changes modify the existing user API in any way, even if it is backwards compatible. Minor backwards incompatible changes can also be released as minor versions while the library is still in beta state. After the major version 1 has been released, minor version can only be used to add backwards compatible API changes.
194+
* `bumpversion-major`: This will release the next major version. Use this to if the changes modify the user API in a backwards incompatible way after the major version 1 has been released.
218195

219-
### Tag and release to PyPI
196+
## Create the Release on GitHub
220197

221-
Once we are sure that the release can be made we can use different commands depending on
222-
the type of release that we want to make:
198+
After the update to HISTORY.md is merged into `main` and the version is bumped, it is time to [create the release GitHub](https://github.com/sdv-dev/Copulas/releases/new).
199+
- Create a new tag with the version number with a v prefix (e.g. v0.3.1)
200+
- The target should be the `main` branch
201+
- Release title is the same as the tag (e.g. v0.3.1)
202+
- This is not a pre-release (`Set as a pre-release` should be unchecked)
223203

224-
* `make release`: This will relase a patch, which is the most common type of release. Use this
225-
when the changes are bugfixes or enhancements that do not modify the existing user API. Changes
226-
that modify the user API to add new features but that do not modify the usage of the previous
227-
features can also be released as a patch.
228-
* `make release-minor`: This will release the next minor version. Use this if the changes modify
229-
the existing user API in any way, even if it is backwards compatible. Minor backwards incompatible
230-
changes can also be released as minor versions while the library is still in beta state.
231-
After the major version 1 has been released, minor version can only be used to add backwards
232-
compatible API changes.
233-
* `make release-major`: This will release the next major version. Use this to if the changes modify
234-
the user API in a backwards incompatible way after the major version 1 has been released.
204+
Click `Publish release`, which will kickoff the release workflow and automatically upload the package to public PyPI.
235205

206+
The release workflow will create a pull request and auto-merge it into `main` that bumps to the next development release (e.g. 0.12.3 → 0.12.4.dev0).
236207

237-
### Update the release on GitHub
208+
## Close milestone and create new milestone
238209

239-
Once the tag and the release to PyPI has been made, go to GitHub and edit the freshly created "tag" to
240-
add the title and release notes, which should be exactly the same that we added to the HISTORY.md file.
210+
Finaly, **close the milestone** and, if it does not exist, **create the next milestone**.
241211

242-
Finaly, close the milestone and, if it does not exit, create the next one.

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[tox]
22
envlist = py39-lint, py3{8,9,10,11,12,13}-{readme,unit,end_to_end,numerical,minimum,tutorials}
3+
isolated_build=true
34

45
[testenv]
56
skipsdist = false

0 commit comments

Comments
 (0)