Skip to content

Create records for appending tables - #20

Merged
hyperrealist merged 8 commits into
PandABlocks:update_to_fastcs_0.11from
hyperrealist:18-fastcs-pandablocks-create-records-for-appending-tables
Jun 22, 2026
Merged

Create records for appending tables#20
hyperrealist merged 8 commits into
PandABlocks:update_to_fastcs_0.11from
hyperrealist:18-fastcs-pandablocks-create-records-for-appending-tables

Conversation

@hyperrealist

@hyperrealist hyperrealist commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Fixes #18

  • records added
  • tests added

@codecov

codecov Bot commented Dec 9, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.03704% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.90%. Comparing base (8c2c896) to head (272ec38).

Files with missing lines Patch % Lines
src/fastcs_pandablocks/panda/blocks/data.py 22.22% 7 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LuisFSegalla LuisFSegalla left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@shihab-dls

Copy link
Copy Markdown
Contributor

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.

@hyperrealist
hyperrealist force-pushed the 18-fastcs-pandablocks-create-records-for-appending-tables branch from ce11833 to f834d4d Compare December 10, 2025 11:49
@hyperrealist
hyperrealist requested a review from coretl December 11, 2025 16:47
Comment thread docs/conf.py Outdated
Comment thread docs/conf.py
Comment thread src/fastcs_pandablocks/panda/blocks/blocks.py Outdated
Comment thread src/fastcs_pandablocks/panda/blocks/blocks.py Outdated
Comment thread src/fastcs_pandablocks/panda/blocks/blocks.py Outdated
Comment thread src/fastcs_pandablocks/panda/blocks/blocks.py Outdated
Comment thread src/fastcs_pandablocks/panda/blocks/blocks.py Outdated
Comment thread src/fastcs_pandablocks/panda/blocks/blocks.py Outdated
@hyperrealist
hyperrealist force-pushed the 18-fastcs-pandablocks-create-records-for-appending-tables branch from f163852 to d23f70b Compare December 15, 2025 10:38
@hyperrealist
hyperrealist changed the base branch from main to update_to_fastcs_0.11 December 15, 2025 10:59
@hyperrealist
hyperrealist force-pushed the 18-fastcs-pandablocks-create-records-for-appending-tables branch from d23f70b to dc45db0 Compare December 15, 2025 11:02
@hyperrealist
hyperrealist force-pushed the 18-fastcs-pandablocks-create-records-for-appending-tables branch from dc45db0 to 7272e37 Compare June 18, 2026 15:42
@hyperrealist
hyperrealist requested a review from coretl June 18, 2026 15:55
Comment thread src/fastcs_pandablocks/panda/io/table.py Outdated
panda_name + PandaName(sub_field="MODE"),
AttrR(
Enum(
enum.Enum(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread tests/test_blocks.py
@hyperrealist
hyperrealist requested a review from Copilot June 22, 2026 09:02
@hyperrealist
hyperrealist marked this pull request as ready for review June 22, 2026 09:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Append command 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.

Comment thread src/fastcs_pandablocks/panda/io/table.py
Comment thread src/fastcs_pandablocks/panda/blocks/blocks.py
Comment thread Dockerfile
Comment thread Dockerfile
- 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
@hyperrealist
hyperrealist requested a review from coretl June 22, 2026 10:26
@hyperrealist
hyperrealist merged commit e6d6184 into PandABlocks:update_to_fastcs_0.11 Jun 22, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create records for appending tables

5 participants