-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* converted docs to mkdocs
- Loading branch information
Florian Maas
authored
Apr 15, 2022
1 parent
65d6dfe
commit 6e1d398
Showing
38 changed files
with
756 additions
and
489 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
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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
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,41 @@ | ||
--- | ||
title: CI/CD with Github actions | ||
--- | ||
|
||
when `include_github_actions` is set to `"y"`, a `.github` directory is | ||
added with the following structure: | ||
|
||
.github | ||
├── workflows | ||
├─── run-checks | ||
│ └── action.yml | ||
├─── setup-poetry-env | ||
│ └── action.yml | ||
├── on-merge-to-main.yml | ||
├── on-pull-request.yml | ||
└── on-release-main.yml | ||
|
||
`on-merge-to-main.yml` and `on-pull-request.yml` are identical except | ||
for their trigger conditions; the first is run whenever a new commit is | ||
made to `main` (which should | ||
[only](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches) | ||
happen through merge requests, hence the name), and the latter is run | ||
whenever a pull request is opened or updated. They call the `action.yml` | ||
files to set-up the environment, run the tests, and check the code | ||
formatting. | ||
|
||
`on-release-main.yml` does all of the former whenever a new release is | ||
made on the `main` branch. In addition, `on-release-main.yml` also | ||
publishes the project to Pypi or Artifactory if `publish_to` is set to | ||
`"pypi"` or `"artifactory"`, and it builds and deploys the documentation | ||
if `sphinx_docs` is set to `"y"`. To learn more about these features, | ||
see `Releasing to Pypi or Artifactory <./releasing>`{.interpreted-text | ||
role="doc"} and `Documentation with Sphinx | ||
<./sphinx>`{.interpreted-text role="doc"} | ||
|
||
Additionally, all workflows check for compatibility with multiple Python | ||
versions if `tox` is set to `"y"`. | ||
|
||
## Example CI/CD Pipeline | ||
|
||
[![Example pipeline](https://raw.githubusercontent.com/fpgmaas/cookiecutter-poetry/main/static/images/pipeline.png)](https://raw.githubusercontent.com/fpgmaas/cookiecutter-poetry/main/static/images/pipeline.png) |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
--- | ||
title: Formatting | ||
--- | ||
|
||
[isort](https://pycqa.github.io/isort/index.html) and | ||
[black](https://pypi.org/project/black/) are added as development | ||
dependencies. `black` and `isort` can be used to format the code with | ||
|
||
``` bash | ||
make format | ||
``` | ||
|
||
And the code style can be checked with | ||
|
||
``` bash | ||
make lint | ||
``` | ||
|
||
If `include_github_actions` is set to `"y"`, code formatting is checked | ||
for every merge request, every merge to main, and every release. |
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
--- | ||
title: Makefile | ||
--- | ||
|
||
The generated repository will have a `Makefile` available. A list of all | ||
available commands that are available can be obtained by running | ||
`make help` in the terminal. Initially, the following commands are | ||
available: | ||
|
||
``` | ||
install Install the poetry environment | ||
format Format code using isort and black. | ||
lint Check code formatting using isort and black. | ||
test Test the code with pytest | ||
build Build wheel file using poetry | ||
clean-build clean build artifacts | ||
publish publish a release to pypi. | ||
build-and-publish Build and publish. | ||
docs-generate convert docstrings to docs | ||
docs-build Build the docs | ||
docs-open Open the docs in the browser | ||
docs Generate, build and open the docs. | ||
docs-build-test Test if the documentation can be built without errors. | ||
docs-test Test if the documentation can be generated and built without errors. | ||
``` |
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
--- | ||
title: Poetry | ||
--- | ||
|
||
The generated repository will uses [Poetry](https://python-Poetry.org/) | ||
for its dependency management. When you have created your repository | ||
using this cookiecutter template, a Poetry environment is pre-configured | ||
in `pyproject.toml` and `Poetry.toml`. All you need to do is add your | ||
project-specific dependencies with | ||
|
||
``` bash | ||
poetry add <package> | ||
``` | ||
|
||
and then install the environment with | ||
|
||
``` bash | ||
make install | ||
``` | ||
|
||
By default, the environment is created in a `.venv` folder, so you can | ||
easily start an interactive shell within the environment with | ||
`poetry shell`. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.