Fix/ruff linting#122
Open
RaulSMS wants to merge 96 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
Since this is a beta release of the fork it is a common practice to reset the version
feat: migrate packaging to pyproject.toml for PyPI publication as pyt…
helps with pip install -e ".[test,lint]"
Add Pyright type checking for the core j1939 library folder
during the merge commit 4d1baec to update this branch to latest master I overlooked some already fixed errors.
Add Scorecard workflow for supply-chain security
Generates SLSA (Supply-chain Levels for Software Artifacts) provenance for GitHub releases. This proves to users (and OpenSSF Scorecard) that the release artifacts were securely built inside your GitHub Actions workflow and haven't been tampered with.
fix PR comment #44 (comment)
Configure Dependabot for GitHub Actions and pip
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.3.0 to 6.3.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v5.3.0...v6.3.0) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: 6.3.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Fix: sigend releases
…/setup-python-6.3.0 chore(deps): bump actions/setup-python from 5.3.0 to 6.3.0
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: