2023-05-15 13:23:02 +02:00
|
|
|
{% set is_open_source = cookiecutter.open_source_license != 'Proprietary' -%}
|
2023-05-19 18:32:16 +02:00
|
|
|
{% set repo = "/".join(cookiecutter.git_origin.removesuffix(".git").split(":")[-1].split("/")[-2:]) %}
|
2023-05-15 13:23:02 +02:00
|
|
|
# {{ cookiecutter.project_name }}
|
2023-05-20 23:11:08 +02:00
|
|
|
{% if cookiecutter.configure_ci == "True" %}[![CI status badge]({{ cookiecutter.woodpecker_server }}/api/badges/{{ repo }}/status.svg)](https://ci.pains-perdus.fr/histausse/test_ci_template){% endif %}
|
2023-05-19 18:32:16 +02:00
|
|
|
|
2023-05-15 13:23:02 +02:00
|
|
|
|
|
|
|
{{ cookiecutter.project_short_description }}
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
2023-05-20 23:11:08 +02:00
|
|
|
|
|
|
|
### With pip
|
|
|
|
|
2023-05-15 13:23:02 +02:00
|
|
|
This project can be installed using pip:
|
|
|
|
|
|
|
|
```
|
|
|
|
pip install git+{{ cookiecutter.project_url }}.git
|
|
|
|
```
|
|
|
|
|
2023-05-20 23:11:08 +02:00
|
|
|
### With Nix
|
|
|
|
|
|
|
|
There is a `flake.nix`, so you can clone the repo and use `nix shell` if you want.
|
|
|
|
|
|
|
|
### Docker/Podman
|
|
|
|
|
2023-05-24 12:33:11 +02:00
|
|
|
{% if cookiecutter.configure_ci == "True" %}
|
|
|
|
You can run this projet with docker or podman:
|
|
|
|
|
|
|
|
```
|
|
|
|
podman run --rm -it {{ cookiecutter.gitea_url.removeprefix('https://') }}/{{ cookiecutter.git_user }}/{{ cookiecutter.project_slug }}:latest {{ cookiecutter.project_slug }}
|
|
|
|
```
|
|
|
|
{% else %}
|
2023-05-20 23:11:08 +02:00
|
|
|
You can build a container image using nix. To build the image, in the repo, run:
|
|
|
|
|
|
|
|
```
|
|
|
|
nix build -o {{ cookiecutter.project_slug }}.img .#docker
|
|
|
|
```
|
|
|
|
|
|
|
|
You can then load the image with:
|
|
|
|
|
|
|
|
```
|
|
|
|
podman load < {{ cookiecutter.project_slug }}.img
|
|
|
|
```
|
2023-05-24 12:33:11 +02:00
|
|
|
{% endif %}
|
2023-05-20 23:11:08 +02:00
|
|
|
|
2023-05-24 12:33:11 +02:00
|
|
|
Notice the image is build with nix and is very minimalist.
|
2023-05-20 23:11:08 +02:00
|
|
|
|
2023-05-15 13:23:02 +02:00
|
|
|
{% if is_open_source %}
|
|
|
|
## License
|
|
|
|
|
|
|
|
This project if a free software released under the {{ cookiecutter.open_source_license }}.
|
|
|
|
|
|
|
|
## Dev
|
|
|
|
|
2023-05-15 22:00:30 +02:00
|
|
|
This project is managed by [poetry](https://python-poetry.org/).
|
2023-05-15 13:23:02 +02:00
|
|
|
|
2023-05-15 22:00:30 +02:00
|
|
|
To open a shell in a venv of the project:
|
2023-05-15 13:23:02 +02:00
|
|
|
```
|
|
|
|
git clone {{ cookiecutter.project_url }}.git
|
|
|
|
cd {{ cookiecutter.project_slug }}
|
2023-05-15 22:00:30 +02:00
|
|
|
poetry shell
|
|
|
|
poetry install
|
2023-05-15 13:23:02 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Test
|
|
|
|
|
|
|
|
Tests are run using `pytest`:
|
|
|
|
|
|
|
|
```
|
2023-05-15 22:41:42 +02:00
|
|
|
poetry run pytest
|
2023-05-15 13:23:02 +02:00
|
|
|
```
|
2023-05-15 22:41:42 +02:00
|
|
|
|
2023-05-15 13:23:02 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
## Author
|
|
|
|
|
|
|
|
- {{ cookiecutter.full_name }}
|
|
|
|
|
|
|
|
## Security
|
|
|
|
|
|
|
|
If you discover a potential security issue in this project, please contact {{ cookiecutter.email }}.
|
|
|
|
|