https://github.com/yezz123/pypi-python-template
Quickly creating a new Modern Python project and publishing it to PyPI ✨
https://github.com/yezz123/pypi-python-template
Last synced: 7 months ago
JSON representation
Quickly creating a new Modern Python project and publishing it to PyPI ✨
- Host: GitHub
- URL: https://github.com/yezz123/pypi-python-template
- Owner: yezz123
- License: mit
- Created: 2023-01-23T07:41:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-27T22:47:57.000Z (over 1 year ago)
- Last Synced: 2025-01-29T04:41:26.537Z (8 months ago)
- Language: Python
- Size: 31.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: docs/code_of_conduct.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Quickly creating a new Modern Python project and publishing it to PyPI ✨## Features
- use `hatch` to manage dependencies.
- use `pre-commit` to manage formatting and linting.
- use `pytest` to run tests.
- use `coverage` to generate coverage reports.
- use `mypy` to check types.
- use `black` to format code.
- use `ruff` to lint code.
- use `isort` to sort imports.
- Set of scripts to run all the commands. e.g. `bash scripts/test.sh` , `bash scripts/test_html.sh` , `bash scripts/format.sh` , `bash scripts/lint.sh` .
- GitHub Actions to run tests, lints and publish to PyPI.
- Use `Dependabot` to keep dependencies up to date.
- Use `MkDocs` to generate documentation.
- Use `Mkdocs-material` for beautiful documentations Theme.## Installation
You can add pypi-python-template in a few easy steps. First of all, install the dependency:
```shell
$ pip install pypi-python-template---> 100%
Successfully installed pypi-python-template
```## Development 🚧
### Setup environment 📦
You should create a virtual environment and activate it:
```bash
python -m venv venv/
``````bash
source venv/bin/activate
```And then install the development dependencies:
```bash
# Install dependencies
pip install -e .[test,lint,docs]
```### Run tests 🌝
You can run all the tests with:
```bash
bash scripts/test.sh
```> Note: You can also generate a coverage report with:
```bash
bash scripts/test_html.sh
```### Format the code 🍂
Execute the following command to apply `pre-commit` formatting:
```bash
bash scripts/format.sh
```Execute the following command to apply `mypy` type checking:
```bash
bash scripts/lint.sh
```### Generate documentation 📖
You can start the documentation with:
```bash
bash scripts/docs.sh
```## License
This project is licensed under the terms of the MIT license.