mirror of
https://github.com/caronc/apprise.git
synced 2025-12-15 10:04:06 +08:00
build environment improvements (#1385)
This commit is contained in:
@@ -20,19 +20,87 @@ merge your contributions smoothly.
|
||||
tox -e qa
|
||||
```
|
||||
|
||||
- ✔️ All tests pass locally.
|
||||
|
||||
- ✔️ Your code is clean and consistently formatted:
|
||||
```bash
|
||||
tox -e format
|
||||
```
|
||||
|
||||
|
||||
- ✔️ You followed the plugin template (if adding a new plugin).
|
||||
- ✔️ You included inline docstrings and respected the BSD 2-Clause license.
|
||||
- ✔️ Your commit message is descriptive.
|
||||
|
||||
---
|
||||
|
||||
## 📦 Local Development Setup
|
||||
|
||||
To get started with development:
|
||||
|
||||
### 🧰 System Requirements
|
||||
|
||||
- Python >= 3.9
|
||||
- `pip`
|
||||
- `git`
|
||||
- Optional: `VS Code` with the Python extension
|
||||
|
||||
### 🚀 One-Time Setup
|
||||
|
||||
```bash
|
||||
git clone https://github.com/caronc/apprise.git
|
||||
cd apprise
|
||||
|
||||
# Install all runtime + dev dependencies
|
||||
pip install .[dev]
|
||||
```
|
||||
|
||||
(Optional, but recommended if actively developing):
|
||||
```bash
|
||||
pip install -e .[dev]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🧪 Running Tests
|
||||
|
||||
```bash
|
||||
pytest # Run all tests
|
||||
pytest tests/foo.py # Run a specific test file
|
||||
```
|
||||
|
||||
Run with coverage:
|
||||
```bash
|
||||
pytest --cov=apprise --cov-report=term
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🧹 Linting & Formatting with ruff
|
||||
|
||||
```bash
|
||||
ruff check apprise tests # Check linting
|
||||
ruff check apprise tests --fix # Auto-fix
|
||||
ruff format apprise tests # Format files
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🧰 Optional: Using VS Code
|
||||
|
||||
1. Open the repo: `code .`
|
||||
2. Press `Ctrl+Shift+P → Python: Select Interpreter`
|
||||
3. Choose the same interpreter you used for `pip install .[dev]`
|
||||
4. Press `Ctrl+Shift+P → Python: Discover Tests`
|
||||
|
||||
`.vscode/settings.json` is pre-configured with:
|
||||
|
||||
- pytest as the test runner
|
||||
- ruff for linting
|
||||
- PYTHONPATH set to project root
|
||||
|
||||
No `.venv` is required unless you choose to use one.
|
||||
|
||||
---
|
||||
|
||||
## 📌 How to Contribute
|
||||
|
||||
1. **Fork the repository** and create a new branch.
|
||||
|
||||
Reference in New Issue
Block a user