Skip to content

Fix I04 chain: fastcs 0.14.0-beta.2, yaml-driven launch, symbol-name fixes#55

Merged
gilesknap merged 8 commits into
mainfrom
fix_i04_chain
May 20, 2026
Merged

Fix I04 chain: fastcs 0.14.0-beta.2, yaml-driven launch, symbol-name fixes#55
gilesknap merged 8 commits into
mainfrom
fix_i04_chain

Conversation

@gilesknap
Copy link
Copy Markdown
Contributor

Summary

  • Bump fastcs to 0.14.0-beta.2 (set_idset_path, controllers list with explicit id:, version banner change)
  • Refactor CATioServerController.__init__ to accept a CATioServerControllerOptions dataclass so the controller can be driven by the FastCS yaml-launch flow; bolt fastcs.launch._launch onto the typer app (run / schema subcommands alongside ioc)
  • Fix EtherCAT/symbol naming issues uncovered while running on the I04 chain:
    • Sanitize EtherCAT names containing hyphens (e.g. BL04I-EA-ERIO-01) to valid fastcs group names, preserving numeric suffixes to avoid collisions
    • Add limit/compact/map abbreviations and reorder _ABBREVIATIONS to stop truncation from dropping distinguishing suffixes (fixes duplicate fastcs_name in EP4374-0002)
    • Tighten regex patterns for channel symbol matching
  • Switch tests to ephemeral ports; add test_terminal_yaml_duplicates.py to guard against future duplicate fastcs_name entries
  • Remove unused GSD bloat and the in-tree .planning/ scratch directory

Test plan

  • pytest passes locally (unit + system tests, including the new duplicate-name guard)
  • catio run and catio schema work via the new yaml-launch flow
  • Confirmed against the I04 chain hardware/config that the renamed symbols and sanitized group names match expected PV layout
  • Phoebus launcher (opi/phoebus-launch.sh) still launches correctly with the updated entrypoint

🤖 Generated with Claude Code

gilesknap and others added 8 commits May 7, 2026 08:17
Refactor CATioServerController.__init__ to accept a CATioServerControllerOptions dataclass (TCP/route/scan-timings sub-dataclasses) so the controller can be driven by the FastCS yaml-launch flow. Bolt fastcs.launch._launch onto the existing typer app so `run` and `schema` subcommands sit alongside the bespoke `ioc` command. Update the example fastcs.yaml + regenerate schema.json + adjust the test_system fixture and the phoebus launcher accordingly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- set_id(pv_prefix) → set_path([pv_prefix]) (set_id removed in b2)
- fastcs.yaml controllers: dict-keyed-by-id → list with explicit id:
- relax test_cli_version: launcher now emits app + FastCS version lines

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add abbreviations for 'limit' -> 'lim', 'compact' -> 'cpt', and
'map' -> 'm' to prevent truncation from discarding distinguishing
suffixes when generating fastcs_names for long symbol names.

Also reorder _ABBREVIATIONS alphabetically by abbreviation value
for easier maintenance.

Add test_terminal_yaml_duplicates.py to detect any future duplicate
fastcs_name entries in terminal_types.yaml symbol nodes and CoE
subindices.
- Extend trim_ecat_name() to handle names with invalid fastcs characters (e.g., hyphens in 'BL04I-EA-ERIO-01')
- Convert non-UpperCamelCase names by splitting on non-alphanumeric runs and title-casing letter-starting segments
- Preserve numeric-only segments by appending to last letter segment to avoid collisions (e.g., 'ERIO-01' vs 'ERIO-02')
- Add comprehensive tests including hyphenated names and numeric suffix differentiation
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 95.06173% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.92%. Comparing base (51f476f) to head (ec3cbef).

Files with missing lines Patch % Lines
src/fastcs_catio/__main__.py 50.00% 3 Missing ⚠️
src/fastcs_catio/client.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #55      +/-   ##
==========================================
+ Coverage   73.68%   73.92%   +0.23%     
==========================================
  Files          19       19              
  Lines        4093     4130      +37     
==========================================
+ Hits         3016     3053      +37     
  Misses       1077     1077              

☔ View full report in Codecov by Sentry.
📢 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.

@gilesknap gilesknap merged commit 0ad44b8 into main May 20, 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.

2 participants