Create records for appending tables - #20
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## update_to_fastcs_0.11 #20 +/- ##
=========================================================
+ Coverage 39.11% 45.90% +6.79%
=========================================================
Files 18 18
Lines 997 1039 +42
=========================================================
+ Hits 390 477 +87
+ Misses 607 562 -45 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LuisFSegalla
left a comment
There was a problem hiding this comment.
It looks good for me. I'm not so sure how the newest versions of FastCS are implementing the attributes handling, but I can't see anything obviously wrong with the code. I'm happy to test it against real hardware whenever you're available to do so!
|
This projects going to be updated to use FastCS 0.11 once #17 is in; would you mind rebasing over that branch, @hyperrealist? I can help, if there are ambiguous merge conflicts. |
ce11833 to
f834d4d
Compare
f163852 to
d23f70b
Compare
d23f70b to
dc45db0
Compare
dc45db0 to
7272e37
Compare
| panda_name + PandaName(sub_field="MODE"), | ||
| AttrR( | ||
| Enum( | ||
| enum.Enum( |
There was a problem hiding this comment.
This is an integer valued enum. The values from PandA are strings.
@shihab-dls remind me what fastcs uses the names/values of an Enum for?
There was a problem hiding this comment.
Pull request overview
This PR implements support for PandABlocks-server v4 “has_mode” tables by adding local/derived FastCS records needed for table append/streaming, and updates the project tooling (uv/tox-uv, CI, container, renovate/gitleaks, etc.).
Changes:
- Add table append support via a new
Appendcommand wrapper and NEXT_WRITE-controlled dispatch in table IO. - Create additional records for has_mode tables (NEXT_WRITE, MODE, QUEUED_LINES, and a clear action).
- Modernize project tooling: uv-based workflows/tox config, Docker/devcontainer updates, renovate/gitleaks, and Python 3.13 CI/classifiers.
Reviewed changes
Copilot reviewed 32 out of 33 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_table_io.py | Adds unit tests for NEXT_WRITE-controlled Put vs Append behavior. |
| tests/test_client_wrapper.py | Adds unit test ensuring Append command is sent correctly. |
| tests/test_blocks.py | Adds tests around _make_table_field behavior for has_mode vs non-has_mode tables. |
| tests/conftest.py | Removes previous debug-oriented pytest exception hook. |
| src/fastcs_pandablocks/panda/io/table.py | Introduces NextWrite/Mode enums and appending logic in TableFieldIO.send. |
| src/fastcs_pandablocks/panda/client_wrapper.py | Adds RawPanda.append_to_panda() wrapper sending pandablocks.commands.Append. |
| src/fastcs_pandablocks/panda/blocks/data.py | Fixes handler naming/awaiting and a typo in an error message. |
| src/fastcs_pandablocks/panda/blocks/blocks.py | Creates NEXT_WRITE/MODE/QUEUED_LINES and a clear action for has_mode tables; wires append IO. |
| src/fastcs_pandablocks/main.py | Adds an explicit main() entrypoint. |
| renovate.json | Adds Renovate configuration. |
| pyproject.toml | Updates metadata/tooling (dependency groups, tox config, ruff config, CI python versions). |
| docs/conf.py | Fixes intersphinx URL for fastcs docs. |
| Dockerfile | Switches to ubuntu-devcontainer base and uv-based build/runtime layout. |
| .python-version | Pins default Python version. |
| .pre-commit-config.yaml | Updates hooks (ruff autofix, uv sync hook, gitleaks). |
| .gitleaks.toml | Adds gitleaks config/allowlist rule. |
| .github/workflows/periodic.yml | Adjusts tox invocation for linkcheck under new tox config. |
| .github/workflows/ci.yml | Updates CI orchestration, python matrix, container gating, and job dependencies. |
| .github/workflows/_tox.yml | Switches tox runs to uv run --locked. |
| .github/workflows/_test.yml | Switches tests to uv run --locked, updates checkout/codecov actions. |
| .github/workflows/_release.yml | Updates artifact download action and release action pin. |
| .github/workflows/_pypi.yml | Updates artifact download action. |
| .github/workflows/_docs.yml | Switches docs build to uv run --locked tox -e docs. |
| .github/workflows/_dist.yml | Switches build/twine steps to uvx; updates checkout action. |
| .github/workflows/_container.yml | Adds publish input and gates push on test success + tag. |
| .github/workflows/_check.yml | Removes branch/PR detection workflow. |
| .github/ISSUE_TEMPLATE/bug_report.md | Minor wording change to “behaviour”. |
| .github/dependabot.yml | Removes Dependabot configuration. |
| .github/CONTRIBUTING.md | Updates copier-template documentation link. |
| .github/actions/install_requirements/action.yml | Removes custom install action (replaced by uv usage). |
| .devcontainer/devcontainer.json | Updates devcontainer to use uv/venv cache strategy. |
| .copier-answers.yml | Updates copier template version and settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Changed from hard-coded parent_block.clear to per-table CLEAR commands - Each table field now gets its own CLEAR command using qualified PandaName - Uses setattr() with attribute_name derived from table field + CLEAR sub_field - Prevents overwrites when multiple has_mode tables exist on same block - Clients can now address clear action per table via expected name (issue PandABlocks#18) - Added test_make_table_field_multiple_has_mode_tables to verify independence
e6d6184
into
PandABlocks:update_to_fastcs_0.11
Fixes #18