Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR configures ruff's source directory and applies automated formatting to remove blank lines between import groups in test files. It also adds a mypy exclusion for the "trees" directory and includes an opencode workflow file in the .trash directory.
Changes:
- Added ruff configuration for
srcandincludepatterns in pyproject.toml - Removed blank lines between imports in numerous test files across the codebase (automated formatting)
- Added "trees/.*" to mypy exclusion list
- Added opencode workflow file to .trash directory
Reviewed changes
Copilot reviewed 123 out of 124 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Added ruff src/include configuration and mypy trees exclusion |
| particula/util/tests/*.py | Removed blank lines between import groups (multiple files) |
| particula/tests/*.py | Removed blank lines between import groups (multiple files) |
| particula/particles//tests/.py | Removed blank lines between import groups (multiple files) |
| particula/gas//tests/.py | Removed blank lines between import groups (multiple files) |
| particula/dynamics//tests/.py | Removed blank lines between import groups (multiple files) |
| particula/activity/tests/*.py | Removed blank lines between import groups (multiple files) |
| particula/equilibria/tests/*.py | Removed blank lines between import groups |
| particula/integration_tests/*.py | Removed blank lines between import groups |
| .trash/.github/workflows/opencode.yml | Added new workflow file to trash directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import numpy as np | ||
| import pytest | ||
|
|
||
| import particula.util.convert_units as convert_units | ||
| import pytest |
There was a problem hiding this comment.
The import order has been changed so that particula.util.convert_units is imported before pytest. According to PEP 8 and common Python conventions, standard library imports (like pytest which is a third-party package) should be separated from first-party imports. The correct order should be:
- Standard library imports
- Third-party imports (pytest)
- First-party imports (particula.util.convert_units)
The imports should be reordered to place pytest before particula.util.convert_units, with a blank line separating third-party from first-party imports.
| src = ["particula"] | ||
| include = ["particula/**/*.py"] |
There was a problem hiding this comment.
The include pattern is redundant with the src configuration. When src = ["particula"] is set, ruff already defaults to checking Python files in that source directory. The explicit include = ["particula/**/*.py"] pattern is unnecessary and could potentially cause confusion or conflicts with the default behavior. Consider removing this line to simplify the configuration.
No description provided.