Fix/ruff linting#122
Open
RaulSMS wants to merge 128 commits into
Open
Conversation
To support agentic development
Extend the DTC class and Dm1 sender/receiver to handle SAE J1939-73 SPN conversion methods 1, 2, 3, and 4 (previously only CM 4 / CM-bit-clear was supported and other methods were logged as errors on receive). TX takes an optional per-DTC 'cm' key (default 4); RX disambiguates the CM-bit-set case via a new Dm1(rx_cm_bit_set=...) constructor arg.
Add claude init
Add support for all four DM1 SPN conversion methods
* feat: remove numpy * test: add coverage for j1939_22 logic * test: clean up docs and remove constant * feat: use constants instead of hardcoded numbers
improvements
test latency
With the two-thread model introduced in this branch, the protocol thread iterates _snd_buffer in async_job_thread concurrently with send_pgn being called from a user/timer thread. The check-then-write on _snd_buffer was unprotected, creating a live race (RuntimeError: dictionary changed size during iteration on CPython). j1939_22.py already wraps its send_pgn buffer writes with _buffer_lock; this commit brings j1939_21.py to the same standard. CAN I/O (_send_tp_bam / _send_tp_rts) is intentionally kept outside the lock to avoid holding it during I/O.
Two new tests in test_threading.py covering the race condition fixed in the previous commit: - test_send_pgn_concurrent_no_crash: 4 threads hammer send_pgn while the protocol thread is running; verifies no RuntimeError or crash. - test_send_pgn_j1939_21_buffer_lock_no_race: two threads race to send to the same src/dst pair simultaneously; verifies the check-then-write is atomic (exactly one succeeds, one is rejected).
Fix/pr5 buffer lock and tests
- Remove test_helpers/__init__.py so find_packages() no longer picks it up; feeder.py stays in test_helpers/ as the contributor prefers. - Move conftest.py to the repo root so pytest auto-discovers the feeder fixture — no more explicit `from test_helpers.conftest import feeder` in every test file. - Add test_helpers to find_packages(exclude=...) as an explicit guard. - Drop the now-redundant explicit fixture imports from all test files. Fixes the issue documented in reviews/issue-test-folder-structure.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ments General threading and other misc. improvements
Updates the requirements on [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) to permit the latest version. - [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst) - [Commits](readthedocs/sphinx_rtd_theme@3.0.0...3.1.0) --- updated-dependencies: - dependency-name: sphinx-rtd-theme dependency-version: 3.1.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
…theme-gte-3.1.0 chore(deps): update sphinx-rtd-theme requirement from >=3.0 to >=3.1.0
Updates the requirements on [sphinx](https://github.com/sphinx-doc/sphinx) to permit the latest version. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/v8.1.3/CHANGES.rst) - [Commits](sphinx-doc/sphinx@v7.0.0...v8.1.3) --- updated-dependencies: - dependency-name: sphinx dependency-version: 8.1.3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
…8.1.3 chore(deps): update sphinx requirement from >=7.0 to >=8.1.3
# Conflicts: # j1939/version.py
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.1 to 2.4.3. - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](ossf/scorecard-action@f49aabe...4eaacf0) --- updated-dependencies: - dependency-name: ossf/scorecard-action dependency-version: 2.4.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…ossf/scorecard-action-2.4.3 chore(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.3
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2 to 3. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](softprops/action-gh-release@v2...v3) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: '3' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…softprops/action-gh-release-3 chore(deps): bump softprops/action-gh-release from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v3...v4) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…github/codeql-action-4 chore(deps): bump github/codeql-action from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 7.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](actions/checkout@v4.2.2...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…actions/checkout-7.0.0 chore(deps): bump actions/checkout from 4.2.2 to 7.0.0
…resses and improve veto timeout logic #54
Implement COMMANDED ADDRESS logic
…1 and J1939_22 classes; add tests for passive observation behavior #59
Allow wildcards to receive PDU1 messages
# Conflicts: # j1939/j1939_21.py # j1939/j1939_22.py
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.1 to 7.0.1. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@4cec3d8...043fb46) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…actions/upload-artifact-7.0.1 chore(deps): bump actions/upload-artifact from 4.6.1 to 7.0.1
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.
Fix RaulSMS#18
And also fix the
ruff check .warnings: