https://github.com/julesgirardon/spyrk
Spyrk is a Python project designed to facilitate development and TDD practice.
https://github.com/julesgirardon/spyrk
bash black flake8 isort mypy pytest python tdd
Last synced: 3 months ago
JSON representation
Spyrk is a Python project designed to facilitate development and TDD practice.
- Host: GitHub
- URL: https://github.com/julesgirardon/spyrk
- Owner: JulesGirardon
- Created: 2025-06-26T12:54:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-26T13:18:31.000Z (about 1 year ago)
- Last Synced: 2025-06-26T14:24:31.200Z (about 1 year ago)
- Topics: bash, black, flake8, isort, mypy, pytest, python, tdd
- Language: Shell
- Homepage: https://jules-girardon.vercel.app
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spyrk
Spyrk is a Python project designed to facilitate modern development workflows, automation, and Test-Driven Development (TDD).
---
## π Quick Start
1. **Clone the repository**
```bash
git clone git@github.com:JulesGirardon/spyrk.git
cd spyrk
```
2. **Install dependencies and set up the environment**
```bash
./install
```
---
## π οΈ Requirements
- Python 3.12 or higher
- [uv](https://github.com/astral-sh/uv) (for fast dependency management)
- Git
---
## π Project Structure
- `bin/` : Automation scripts for development, testing, linting, type checking, documentation, and cache clearing.
- `src/` : Main source code.
- `tests/` : Unit and integration tests.
- `docs/` : Sphinx documentation.
- `.venv/` : Virtual environment (created automatically).
- `pyproject.toml` : Project configuration and dependencies.
---
## β‘ Main Commands
All automation scripts are in the `bin/` directory.
Run them from the project root (with the virtual environment activated):
| Script | Description |
| ------------ | ------------------------------------------------------------ |
| `mypycheck` | Run type checking with mypy |
| `ruffcheck` | Lint and auto-fix code with Ruff |
| `tests` | Run tests with coverage (HTML report) |
| `make_doc` | Generate documentation with Sphinx |
| `clearcache` | Remove all Python cache files and folders |
Scripts in main directory.
| Script | Description |
| ------------ | ------------------------------------------------------------ |
| `install` | Install all dependencies (dev, lint, testsβ¦) |
| `codecheck` | Run type checks (mypy), lint (ruff), and tests with coverage |
Example usage:
```bash
./codecheck
bin/tests
bin/make_doc
bin/clearcache
```
---
## π§ͺ Testing
- Tests are in the `tests/` directory.
- Run all tests with coverage:
```bash
bin/tests
```
- Coverage HTML report is generated in `htmlcov`.
---
## π Documentation
- Documentation is generated with Sphinx.
- To build the docs:
```bash
bin/make_doc
```
- Output is in `docs/build/html`.
---
## π§Ή Cache Cleaning
Remove all Python cache files and folders:
```bash
bin/clearcache
```
---
## π Quality Tools
- **Type Checking**: mypy (`bin/mypycheck`)
- **Linting & Auto-fix**: Ruff (`bin/ruffcheck`)
- **Testing & Coverage**: pytest (`bin/tests`)
- **Documentation**: Sphinx (`bin/make_doc`)
---
## π‘ Recommended Workflow
1. Install dependencies: `./install`
2. Check code quality: `bin/codecheck`
3. Run tests: `bin/tests`
4. Generate docs: `bin/make_doc`
5. Clean cache: `bin/clearcache`
---
## π Example `.gitignore`
Here is a recommended `.gitignore` for your project:
````gitignore
# Python cache
__pycache__/
*.pyc
*.pyo
*.pyd
.mypy_cache/
.pytest_cache/
.ruff_cache/
.coverage
htmlcov/
.cache/
# Virtual environments
.venv/
env/
venv/
# Sphinx build
docs/build/
docs/_build/
# IDE files
.vscode/
.idea/
*.swp
# OS files
.DS_Store
Thumbs.db