Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/extrange/project-template
Template repository for all my projects.
https://github.com/extrange/project-template
Last synced: about 1 month ago
JSON representation
Template repository for all my projects.
- Host: GitHub
- URL: https://github.com/extrange/project-template
- Owner: extrange
- Created: 2024-08-10T12:39:19.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-11-18T00:44:21.000Z (about 1 month ago)
- Last Synced: 2024-11-18T01:33:04.037Z (about 1 month ago)
- Language: Dockerfile
- Size: 117 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project Template
My personal project template, for my Python/TS projects.
With this project template, you get:
- Automated testing on commit and when PRs are opened targeting the main branch (via pytest)
- `.env` validation via Pydantic Settings
- Devcontainer features, in particular:
- Run tests and formatting on commit (via pre-commit)
- Python linting with Ruff
- Dockerfile linting with Hadolint
- Non-root user setup
- Python package management with Poetry
- [`src/` project layout][src-layout]
- Production `compose.yml` file## Getting Started
To start using this template, click 'Use this template' on the top right.
Create a root `env/` folder, and add `local.env` and `prod.env` inside for your local and production environment variables respectively.
Then, open the project in a Devcontainer.
Run your project with `python -m my_project.main`.
If you found this template useful, feel free to contribute back!
## Useful Info
Skip pre-commit hooks:
`git commit --no-verify -m 'my commit'`
## Opinions
Linting: While it is possible to lint every file, in practice simply linting the files that matter is sufficient. We don't want commits or actions to fail simply because of whitespace or format issues.
[src-layout]: https://docs.pytest.org/en/7.1.x/explanation/goodpractices.html#src-layout