@@ -18,7 +18,7 @@ Thank you for your interest in contributing to MPFlash! This guide will help you
1818### Prerequisites
1919
2020- Python 3.9.2 or later
21- - Poetry for dependency management
21+ - uv for dependency management (recommended) or pip
2222- Git for version control
2323- A MicroPython board for testing (optional but recommended)
2424
@@ -42,10 +42,10 @@ Thank you for your interest in contributing to MPFlash! This guide will help you
4242
4343``` bash
4444# Install development dependencies
45- poetry install
45+ uv sync --all-extras
4646
47- # Activate virtual environment
48- poetry shell
47+ # Or using pip (if uv not available)
48+ pip install -e " .[dev,test,perf] "
4949```
5050
5151### Environment Configuration
@@ -66,10 +66,10 @@ PYTHONPATH=src # For development
6666
6767``` bash
6868# Run MPFlash to verify installation
69- poetry run mpflash --help
69+ uv run mpflash --help
7070
7171# Run tests to ensure everything works
72- poetry run pytest
72+ uv run pytest
7373```
7474
7575## Code Style Guidelines
@@ -171,16 +171,13 @@ Use these tools to maintain code quality:
171171
172172``` bash
173173# Format code
174- poetry run black mpflash/
174+ uv run ruff format mpflash/
175175
176- # Sort imports
177- poetry run isort mpflash/
176+ # Lint and fix code
177+ uv run ruff check --fix mpflash/
178178
179- # Remove unused imports
180- poetry run autoflake mpflash/ -r --in-place --remove-all-unused-imports
181-
182- # Type checking
183- poetry run mypy mpflash/
179+ # Type checking (if mypy is installed)
180+ uv run mypy mpflash/
184181```
185182
186183## Testing
@@ -306,22 +303,22 @@ def test_list_command():
306303
307304``` bash
308305# Run all tests
309- poetry run pytest
306+ uv run pytest
310307
311308# Run specific test file
312- poetry run pytest tests/test_download.py
309+ uv run pytest tests/test_download.py
313310
314311# Run tests with coverage
315- poetry run pytest --cov=mpflash
312+ uv run pytest --cov=mpflash
316313
317314# Run tests with verbose output
318- poetry run pytest -v
315+ uv run pytest -v
319316
320317# Run tests excluding slow tests
321- poetry run pytest -m " not basicgit"
318+ uv run pytest -m " not basicgit"
322319
323320# Run tests for specific functionality
324- poetry run pytest -k " flash"
321+ uv run pytest -k " flash"
325322```
326323
327324### Test Coverage
@@ -330,8 +327,8 @@ Maintain high test coverage:
330327
331328``` bash
332329# Generate coverage report
333- poetry run coverage run -m pytest
334- poetry run coverage html
330+ uv run coverage run -m pytest
331+ uv run coverage html
335332
336333# View coverage report
337334open htmlcov/index.html
@@ -528,14 +525,11 @@ To add support for a new hardware platform:
528525MPFlash uses semantic versioning:
529526
530527``` bash
531- # Patch version (bug fixes)
532- poetry version patch
533-
534- # Minor version (new features)
535- poetry version minor
536-
537- # Major version (breaking changes)
538- poetry version major
528+ # Update version in pyproject.toml manually
529+ # Or use a tool like bump2version:
530+ # bump2version patch # for bug fixes
531+ # bump2version minor # for new features
532+ # bump2version major # for breaking changes
539533```
540534
541535### Changelog
0 commit comments