Update dev requirements
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# Python
|
# Python
|
||||||
.env
|
.env
|
||||||
|
.venv/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
.mypy_cache/
|
.mypy_cache/
|
||||||
results/
|
results/
|
||||||
|
|||||||
+39
-23
@@ -60,41 +60,57 @@ Contributions to the web interface are welcome:
|
|||||||
## Code Style & Quality
|
## Code Style & Quality
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Please follow the code style and run linters before submitting.
|
> Follow the project’s code style and run linters before submitting any code.
|
||||||
|
|
||||||
The project adheres to:
|
This project enforces:
|
||||||
|
- **Black** : line length 100
|
||||||
|
- **Isort** : profile black
|
||||||
|
- **Flake8** : ignoring E203, E501, W503
|
||||||
|
- **Pylint** : ignoring W0511, W0718, R0801, R0903, R0914
|
||||||
|
- **Mypy** : ignoring unused-awaitable
|
||||||
|
|
||||||
- **Black** (line length 100)
|
See [.pre-commit-config.yaml](.pre-commit-config.yaml) for the exact configuration.
|
||||||
- **Isort** (profile black)
|
|
||||||
- **Flake8** (ignoring E203, E501, W503)
|
|
||||||
- **Pylint** (ignoring W0718, R0903, R0801)
|
|
||||||
- **Mypy** (ignoring unused-awaitable)
|
|
||||||
|
|
||||||
See [.pre-commit-config.yaml](.pre-commit-config.yaml) for exact configuration.
|
### Setup
|
||||||
|
|
||||||
### Running Linters Locally
|
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> Install pre-commit hooks to automatically check your code before commits:
|
> Use a virtual environment and install development dependencies:
|
||||||
> ```bash
|
|
||||||
> pip install pre-commit
|
```bash
|
||||||
> pre-commit install
|
# Create & activate a virtual environment
|
||||||
> ```
|
python3 -m venv .venv
|
||||||
|
source .venv/bin/activate # Linux/macOS
|
||||||
|
# .venv\Scripts\activate # Windows
|
||||||
|
|
||||||
|
# Install dev dependencies
|
||||||
|
pip install -r aperisolve/requirements-dev.txt
|
||||||
|
pip install -r aperisolve/requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running Tools Manually
|
||||||
|
|
||||||
|
Install pre-commit hooks to automatically check your code before commits:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pre-commit install
|
||||||
|
```
|
||||||
|
|
||||||
|
Check for issues:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pre-commit run --all-files
|
||||||
|
```
|
||||||
|
|
||||||
|
Format code:
|
||||||
|
|
||||||
**Manual checks:**
|
|
||||||
```bash
|
```bash
|
||||||
# Format code
|
|
||||||
black . --line-length 100
|
black . --line-length 100
|
||||||
isort . --profile black
|
isort . --profile black
|
||||||
|
|
||||||
# Check for issues
|
|
||||||
flake8 .
|
|
||||||
pylint **/*.py
|
|
||||||
mypy .
|
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> CI will automatically run these checks on every PR. Make sure they pass!
|
> Continuous Integration (CI) runs all checks on every PR. Ensure your code passes before submitting.
|
||||||
|
|
||||||
|
|
||||||
## Pull Request Guidelines
|
## Pull Request Guidelines
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
black==25.12.0
|
||||||
|
isort==7.0.0
|
||||||
|
flake8==7.3.0
|
||||||
|
mypy==1.18.1
|
||||||
|
pylint==4.0.4
|
||||||
|
pre-commit==4.5.1
|
||||||
Reference in New Issue
Block a user