|
10 | 10 |
|
11 | 11 | * `pytest` for tests: `make test` |
12 | 12 | * `ruff` for linting/formatting: `make lint` (replaces both `black` and `isort`) |
| 13 | +* [pyproject-pipenv](https://github.com/fopina/pyproject-pipenv) to make sure dependencies in pyproject.toml and Pipfile are in sync |
13 | 14 | * `.github` with actions ready to be used |
14 | | - * [test](.github/workflows/test.yml) runs lint checks and unit tests |
15 | | - * [publish-dev](.github/workflows/publish-dev.yml) publishes feature branches (`dev`/`dev-*`) to [testpypi](https://test.pypi.org) |
| 15 | + * [test](.github/workflows/test.yml) runs lint checks, unit tests and pyproject-pipenv |
| 16 | + * [publish-dev](.github/workflows/publish-dev.yml) publishes feature branches (`dev`/`dev-*`) to [testpypi](https://test.pypi.org) - more about this on [Notes](#feature-branch-publishing) |
16 | 17 | * [publish-main](.github/workflows/publish-main.yml) publishes semver tags to [pypi](https://pypi.org) |
17 | 18 |
|
18 | 19 | ## New project checklist |
|
23 | 24 | * [ ] Add PYPI credentials to secrets |
24 | 25 | * `PYPI_USERNAME` and `PYPI_TOKEN` to publish tags to pypi |
25 | 26 | * `TESTPYPI_USERNAME` and `TESTPYPI_TOKEN` to publish dev branches to testpypi |
| 27 | +* [ ] Replace this README.md - template below |
| 28 | + |
| 29 | +## Notes |
| 30 | + |
| 31 | +### Feature branch publishing |
| 32 | + |
| 33 | +`publish-dev` workflow publishes `dev`/`dev-*` branches to [testpypi](https://test.pypi.org). |
| 34 | + |
| 35 | +Other common approach to publish dev branches is to use pre-release channels: version the package with a `rc` or `beta` suffix (such as `1.0.0-beta1`) and pypi will consider pre-release. In order to install this, the user needs to do `pip install PACKAGE --pre` otherwise the latest stable is picked up. |
| 36 | +However this will "pollute" your pypi index and it still requires you to bump the version (`1.0.0-beta1` < `1.0.0`) or to install the branch using specific version. |
| 37 | + |
| 38 | +Yet another approach is to simply use an entirely different package name for the dev releases. Tensorflow does that, for example, with [tf-nightly](https://pypi.org/project/tf-nightly/). |
| 39 | + |
| 40 | +## --- |
| 41 | + |
| 42 | +# fp-github-template-example |
| 43 | + |
| 44 | +CLI that echos whatever you tell it to. |
| 45 | + |
| 46 | +## Install |
| 47 | + |
| 48 | +``` |
| 49 | +pip install fp-github-template-example |
| 50 | +``` |
| 51 | + |
| 52 | +## Usage |
| 53 | + |
| 54 | +``` |
| 55 | +$ example-cli |
| 56 | +Got nothing to say? |
| 57 | +
|
| 58 | +$ example-cli hello |
| 59 | +HELLO right back at ya! |
| 60 | +``` |
| 61 | + |
| 62 | +```python |
| 63 | +>>> from example import demo |
| 64 | +>>> demo.echo('ehlo') |
| 65 | +'EHLO right back at ya!' |
| 66 | +``` |
| 67 | + |
| 68 | +## Build |
| 69 | + |
| 70 | +Check out [CONTRIBUTING.md](CONTRIBUTING.md) |
0 commit comments