Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
118 additions
and
51 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
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ _seed.py | |
__pycache__ | ||
|
||
# test | ||
.coverage* | ||
.coverage | ||
.mypy_cache | ||
.pytest_cache | ||
.ruff_cache | ||
|
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 |
---|---|---|
@@ -1,30 +1,89 @@ | ||
## Setting up a dev environment | ||
# Contributing | ||
|
||
## Local Development | ||
|
||
```bash | ||
git clone <url> | ||
# get the code | ||
git clone git@github.com:metaist/pdfmerge.git | ||
cd pdfmerge | ||
python -m .venv --prompt pdfmerge | ||
source .venv/bin/activate | ||
pip install -e ".[dev]" | ||
|
||
# create a virtual environment | ||
python -m venv .venv --prompt pdfmerge | ||
. .venv/bin/activate | ||
pip install --upgrade pip | ||
|
||
# install dependencies and dev tools | ||
pip install -e ".[dev]" | ||
pnpm install -g cspell | ||
``` | ||
|
||
## Making a release | ||
As you work on the code, you should periodically run: | ||
|
||
```bash | ||
pdm lint # for type checks | ||
pdm test # for unit tests | ||
``` | ||
|
||
This repo generally tries to maintain type-correctness (via `mypy` and `pyright`) and complete unit test coverage. | ||
|
||
## Making a Release | ||
|
||
Checkout `prod`: | ||
|
||
```bash | ||
git checkout prod | ||
git merge --no-ff --no-edit main | ||
# update __init__.py version | ||
# update changelog.md | ||
pdm all | ||
``` | ||
|
||
Update top-most `__init__.py`: | ||
|
||
```python | ||
__version__ = "X.0.1" | ||
``` | ||
|
||
Update `CHANGELOG.md`: | ||
|
||
Sections order is: `Fixed`, `Changed`, `Added`, `Deprecated`, `Removed`, `Security`. | ||
|
||
```markdown | ||
--- | ||
|
||
git commit -m "release: $VER" | ||
git tag "$VER" | ||
[X.0.1]: https://github.com/metaist/pdfmerge/compare/X.0.0...X.0.1 | ||
|
||
## [X.0.1] - XXXX-XX-XXT00:00:00Z | ||
|
||
**Fixed** | ||
|
||
**Changed** | ||
|
||
**Added** | ||
|
||
**Deprecated** | ||
|
||
**Removed** | ||
|
||
**Security** | ||
``` | ||
|
||
### | ||
|
||
```bash | ||
export VER="X.0.1" | ||
|
||
# update docs | ||
pdm docs | ||
|
||
# check build | ||
pip install -e . | ||
|
||
# commit and push tags | ||
git commit -am "release: $VER" | ||
git tag $VER | ||
git push | ||
git push --tags | ||
|
||
git checkout main | ||
git merge --no-ff --no-edit prod | ||
git push | ||
``` | ||
|
||
[Create the release on GitHub](https://github.com/metaist/pdfmerge/releases/new). The `pypi.yaml` workflow will attempt to publish it to PyPI. |
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
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
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
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.