https://github.com/jeremiegince/pythonproject-template
Python Template with uv
https://github.com/jeremiegince/pythonproject-template
docker poetry-python python3 template-project uv
Last synced: about 2 months ago
JSON representation
Python Template with uv
- Host: GitHub
- URL: https://github.com/jeremiegince/pythonproject-template
- Owner: JeremieGince
- License: apache-2.0
- Created: 2024-01-20T18:35:11.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-11-05T14:45:31.000Z (5 months ago)
- Last Synced: 2026-01-02T05:03:02.167Z (3 months ago)
- Topics: docker, poetry-python, python3, template-project, uv
- Language: Python
- Homepage:
- Size: 458 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: change_project_attributes.py
- License: LICENSE
Awesome Lists containing this project
README
# PythonProject-Template
[](https://github.com/JeremieGince/PythonProject-Template/stargazers)
[](https://github.com/JeremieGince/PythonProject-Template/network/members)
[](https://www.python.org/downloads/release/python-310/)
[](https://pypi.org/project/MatchCake)
[](https://pypi.org/project/MatchCake)
[](LICENSE)



[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)
# Description
This is a template for a Python project.
It includes a basic project structure, a Dockerfile, a requirements.txt file a README.md file, etc.
The goal of this template is to provide a starting point for a Python project. Once you have cloned this repository,
you can start by changing the `attributes` of the project using the `change_project_attributes.py` script with
the following command:
```bash
python change_project_attributes.py --help
```
Then you can start developing your project by adding your code to the `src` directory.
The project is constituted by the following parts:
- **/.github**: This directory contains the GitHub Actions workflows that are responsible for
- running the tests: `.github/workflows/tests.yml`
- build the distribution: `.github/workflows/build_dist.yml`
- build the documentation: `.github/workflows/docs.yml`
- **/data**: This directory will contain the data that will be used and generated by the project.
- **/dist**: This directory will contain the distribution of the project.
- **/docs**: This directory will contain the documentation of the project.
- **/images**: This directory will contain the images that will be used in the README.md file or in the documentation.
- **/sphinx**: This directory contains the configuration of the Sphinx documentation.
- **/src**: This directory will contain the source code of the project. This is where you will add your own sauce.
- **/tests**: This directory will contain the tests of the project.
- **/docker_files**: This directory contains the scripts that will help you build the docker image and run the
project in a container.
- **Dockerfile**: This file is responsible for building the docker image of the project.
- **.gitattributes**: This file is responsible for setting the git attributes of the project.
- **.gitignore**: This file is responsible for ignoring the files that you don't want to commit to the repository.
A basic one is already provided and should be enough for most of the projects.
- **pyproject.toml**: This file is responsible for listing the dependencies of the project and the
configuration of the project.
- **README.md**: This file is responsible for providing information about the project.
A basic structure is provided after this little introduction.
- **change_project_attributes.py**: This script is responsible for changing the attributes of the project.
Feel free to remove it once you used it.
- **setup.py**: This file is responsible for setting up the project.
- **LICENSE**: This file is responsible for providing the license of the project.
# README TEMPLATE
## Installation
### Development Dependencies
With `uv` installed, run the following commands to install the dependencies:
```bash
uv venv .venv
uv sync --dev
```
With `python` and `pip` installed, run the following commands to install the dependencies:
```bash
python -m venv .venv
source .venv/bin/activate
pip install uv
python -m uv sync --dev
```
With `poetry` installed, run the following commands to install the dependencies:
```bash
python -m venv .venv
source .venv/bin/activate
poetry install
```
## Scripting Usage
To run a single training, you can run the following command:
```bash
python -m
```
and to know the parameters you can use the help command:
```bash
python -m --help
```
## Deployment
You will need to install Docker to run the trainings in a container.
You can install Docker by following the instructions [here](https://docs.docker.com/get-docker/).
To build the docker image of the project you can run the following command:
```bash
docker build -t :latest .
```
The container can be run in two different modes:
- **release**: This mode is responsible for running the __main__.py of the current package.
- **it**: This is a development mode that is responsible for running the container in the interactive mode.
To run a mode `` you can run the following command:
```bash
docker run --name - --detach --rm --volume=://data -e "MODE=" :latest
```
where `` is the absolute path in your local machine where you want to store the data generated by the phase.
The `` is the root directory of the project.
There is another way you can do all of this. You can use the `docker_files/build_image_and_run.py` script. This script
will build the image and run the mode you want. You can run the script with the following command:
```bash
python docker_files/build_image_and_run.py --mode=
```
## References
## License
## Acknowledgements
## Citation
```
```