What's wrong
The "Build" workflow is failing on PR #37 (feature/registered-event-sources), run
https://github.com/Cratis/Chronicle.Python/actions/runs/37098674267 — the "Check formatting"
step (ruff format --check .) fails because the Python code block in
Documentation/event-sources.md has an unwrapped import statement and an
EventStreamDefinition(...) call that exceed the project's 120-character line length
([tool.ruff] line-length = 120) and are not formatted per ruff's style.
Reproduced locally against feature/registered-event-sources (078435676d3359e252eaeb6c32eb6061f6b860db)
with ruff 0.16.10:
unformatted: File would be reformatted
--> Documentation/event-sources.md:12:27
The fix
Running ruff format Documentation/event-sources.md produces this diff, after which
ruff format --check . (190 files), ruff check ., mypy src, and pytest (14 passed)
all pass clean on that branch:
diff --git a/Documentation/event-sources.md b/Documentation/event-sources.md
index a177a46..8b18b03 100644
--- a/Documentation/event-sources.md
+++ b/Documentation/event-sources.md
@@ -9,13 +9,20 @@ Routing belongs to the append, not to event types.
```python
from cratis_chronicle.event_sources import (
- ConcurrencyDimensions, EventSourceDefinition, EventStreamDefinition, resolve_routing,
+ ConcurrencyDimensions,
+ EventSourceDefinition,
+ EventStreamDefinition,
+ resolve_routing,
)
account = EventSourceDefinition(
"Account",
concurrency=ConcurrencyDimensions.EVENT_SOURCE_ID,
- streams=(EventStreamDefinition("Transactions", concurrency=ConcurrencyDimensions.EVENT_SOURCE_ID | ConcurrencyDimensions.EVENT_STREAM_ID),),
+ streams=(
+ EventStreamDefinition(
+ "Transactions", concurrency=ConcurrencyDimensions.EVENT_SOURCE_ID | ConcurrencyDimensions.EVENT_STREAM_ID
+ ),
+ ),
)
routing = resolve_routing({account.name: account}, "Account", "Transactions")
Why this is an issue and not a PR/push
The fix is a single-file, mechanical ruff format run with no semantic change, verified
against the feature/registered-event-sources branch. This session's git/GitHub write
permissions (git push, gh pr) are gated behind manual approval that wasn't available
here, so I could not push the fix commit to the PR branch or open a pull request. @einari —
feel free to run ruff format Documentation/event-sources.md on your branch (or apply the
diff above) to unblock the Build workflow on #37.
What's wrong
The "Build" workflow is failing on PR #37 (
feature/registered-event-sources), runhttps://github.com/Cratis/Chronicle.Python/actions/runs/37098674267 — the "Check formatting"
step (
ruff format --check .) fails because the Python code block inDocumentation/event-sources.mdhas an unwrappedimportstatement and anEventStreamDefinition(...)call that exceed the project's 120-character line length(
[tool.ruff] line-length = 120) and are not formatted per ruff's style.Reproduced locally against
feature/registered-event-sources(078435676d3359e252eaeb6c32eb6061f6b860db)with
ruff 0.16.10:The fix
Running
ruff format Documentation/event-sources.mdproduces this diff, after whichruff format --check .(190 files),ruff check .,mypy src, andpytest(14 passed)all pass clean on that branch:
Why this is an issue and not a PR/push
The fix is a single-file, mechanical
ruff formatrun with no semantic change, verifiedagainst the
feature/registered-event-sourcesbranch. This session's git/GitHub writepermissions (
git push,gh pr) are gated behind manual approval that wasn't availablehere, so I could not push the fix commit to the PR branch or open a pull request. @einari —
feel free to run
ruff format Documentation/event-sources.mdon your branch (or apply thediff above) to unblock the Build workflow on #37.