Repository navigation
Clean up dependency and tooling configuration - #92
Merged
Merged
Conversation
- Consolidate dev dependencies into a single [dependency-groups] dev group (pytest, ruff, mypy). Previously pytest sat in [project.optional-dependencies] while ruff/black were in [dependency-groups] -- two groups both named "dev" with split contents. mypy is added since CI relies on it. - Declare networkx as a proper optional dependency ([project.optional-dependencies] networkx) so it can be installed via OsmToRoadGraph[networkx] instead of a manual side install. - Remove the duplicate "SIM" entry from the ruff lint select list. - Drop black in favour of ruff's built-in formatter: remove [tool.black] and add [tool.ruff] with line-length = 120 and target-version = "py313" (the old black target-version py311 also contradicted requires-python >= 3.13). CI now runs `ruff format --check` instead of `black --check`. One f-string whitespace normalization in algorithms.py results from the formatter switch. - README: document networkx as an optional dependency installable via the OsmToRoadGraph[networkx] extra. Note: CI still lints with flake8; switching it to `ruff check` is left out because ruff currently reports pre-existing findings that would need to be resolved first. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI now lints with `ruff check` instead of flake8, so the [tool.ruff.lint] configuration in pyproject.toml is actually enforced. flake8 is dropped from the workflow dependencies. Also bumped the deprecated action versions: actions/checkout@v1 -> v4 and actions/setup-python@v1 -> v5 (both v1 releases run on long-EOL Node). Resolved the 5 pre-existing lint findings that ruff reports but flake8 did not, so the build stays green: - way_parser_helper.is_way_acceptable: return the condition directly (SIM103) - xml_handler indoor branch: collapse the nested if into the elif (SIM102) - xml_handler PercentageFile: SIM115 silenced with a noqa + rationale; the handle is intentionally owned for the wrapper's lifetime - shortest-distances-drawing example: two if/else blocks turned into ternary expressions (SIM108) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ruff format --checkinstead ofblack --check. One f-string whitespace normalization in algorithms.py results from the formatter switch.Note: CI still lints with flake8; switching it to
ruff checkis left out because ruff currently reports pre-existing findings that would need to be resolved first.