-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add notes on how to create a release for Umberto
- Loading branch information
1 parent
652d57b
commit febeac3
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Poetry notes for Umberto | ||
|
||
## Poetry | ||
Remember that poetry cannot be installed in the same environment as the project. | ||
Create a virtual environment somewhere permanent and you can use a bash alias to drive poetry: | ||
|
||
```bash | ||
python -m venv ~/.poetry | ||
source ~/.poetry/bin/activate | ||
pip install poetry | ||
|
||
# check location of executable with | ||
which poetry | ||
|
||
# create alias (could be added to ~/.bash_profile) | ||
alias poetry="$HOME/.poetry/bin/poetry" | ||
``` | ||
|
||
When carrying out any of the below tasks create a new empty virtual environment! | ||
```bash | ||
python -m venv temp | ||
source temp/bin/activate | ||
``` | ||
|
||
## Add a dependency | ||
[Docs](https://python-poetry.org/docs/cli/#add) | ||
```bash | ||
poetry add numpy@^2 | ||
``` | ||
|
||
## Build ngsPETSc | ||
[Docs](https://python-poetry.org/docs/cli/#build) | ||
```bash | ||
poetry build | ||
``` | ||
|
||
## Create a release | ||
Follow these steps to create a release: | ||
```bash | ||
# For a bug fix: | ||
poetry version patch | ||
# OR for a minor version bump: | ||
poetry version minor | ||
# OR for a major release: | ||
poetry version minor | ||
|
||
git add pyproject.toml | ||
git commit -m "Release $(poetry version)" | ||
|
||
git tag -a -m "Release $(poetry version)" $(poetry version) | ||
|
||
git push | ||
git push origin $(poetry version) | ||
``` |