refactor template
This commit is contained in:
@@ -5,52 +5,52 @@
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install {{ cookiecutter.project_slug }}
|
||||
uv sync
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
{{ cookiecutter.project_slug }} --help
|
||||
{{ cookiecutter.project_slug }} config show
|
||||
{{ cookiecutter.project_slug }} config init
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Default config path (XDG):
|
||||
|
||||
```
|
||||
~/.config/{{ cookiecutter.project_slug }}/config.toml
|
||||
```
|
||||
|
||||
Override with:
|
||||
|
||||
```bash
|
||||
export {{ cookiecutter.package_name | upper }}_CONFIG=/path/to/config.toml
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
This project uses `uv` for dependency management and the following tools:
|
||||
|
||||
### Setup
|
||||
```bash
|
||||
uv sync
|
||||
uv sync --group dev
|
||||
```
|
||||
|
||||
### Code Quality
|
||||
- **Ruff**: Linting and formatting
|
||||
```bash
|
||||
uv run ruff check --fix
|
||||
uv run ruff format
|
||||
```
|
||||
|
||||
- **MyPy**: Type checking
|
||||
```bash
|
||||
uv run mypy .
|
||||
```
|
||||
```bash
|
||||
uv run ruff check src tests
|
||||
uv run ruff format src tests
|
||||
uv run mypy src
|
||||
uv run invoke lint
|
||||
```
|
||||
|
||||
### Testing
|
||||
```bash
|
||||
uv run pytest
|
||||
```
|
||||
|
||||
### Version Management
|
||||
- **bump-my-version**: Automated version bumping with git tags
|
||||
```bash
|
||||
uv run bump-my-version bump patch # {{ cookiecutter.version }} → 0.1.1
|
||||
uv run bump-my-version bump minor # {{ cookiecutter.version }} → 0.2.0
|
||||
uv run bump-my-version bump major # {{ cookiecutter.version }} → 1.0.0
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```python
|
||||
from {{ cookiecutter.package_name }}.core import say_hello
|
||||
|
||||
say_hello() # prints: Hello, World!
|
||||
say_hello("Alice") # prints: Hello, Alice!
|
||||
uv run invoke test
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT License - see LICENSE file for details.
|
||||
MIT License - see LICENSE file for details.
|
||||
|
||||
Reference in New Issue
Block a user