Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imjoseangel/python-template
Python Template Repository
https://github.com/imjoseangel/python-template
Last synced: 2 days ago
JSON representation
Python Template Repository
- Host: GitHub
- URL: https://github.com/imjoseangel/python-template
- Owner: imjoseangel
- License: mit
- Created: 2023-04-13T20:19:49.000Z (over 1 year ago)
- Default Branch: devel
- Last Pushed: 2024-03-21T15:05:29.000Z (10 months ago)
- Last Synced: 2024-05-15T20:13:54.807Z (8 months ago)
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Python Template Repository
This python monorepo template has the following structure:
```sh
├── .flake8
├── dev-requirements.txt
├── pip-requirements.txt
├── pyproject.toml
├── libs/
└── projects/
```With this setup, you format and lint code deterministically locally and on the CI with:
```sh
python3 -m venv .venv# Make the sandbox active in the current shell session
source .venv/bin/activate# Install pinned pip first
pip install -r pip-requirements.txt# Install shared development dependencies, in a second step
# to use the pinned pip version
pip install -r dev-requirements.txt# Black, Flake8, and isort are now available. Use them as follows:
black --check .
flake8 .
isort --check-only .
```To create base’s development environment, go to directory libs/base and execute:
```sh
python3 -m venv .venv# Make the sandbox active in the current shell session
source .venv/bin/activate# Install pinned pip first
pip install -r $(git rev-parse --show-toplevel)/pip-requirements.txt# Install shared development dependencies and project/library-specific dependencies
pip install -r $(git rev-parse --show-toplevel)/dev-requirements.txt -r requirements.txt# With project-specific dependencies installed, typecheck your code as follows:
pyright .
```