Skip to content

Handle parameters starting with numbers and convert them to valid names #71

Closed

Description

@GDYendell

Currently parameters are failing in two ways:

WARNING:root:Removing parameters with invalid names: ['0/status/decoder/name']
WARNING:root:Removing parameters with invalid names: ['1/status/decoder/name']
WARNING:root:Removing parameters with invalid names: ['2/status/decoder/name']
WARNING:root:Removing parameters with invalid names: ['3/status/decoder/name']
Invalid name:
1 validation error for SignalR
name
  String should match pattern '^([A-Z][a-z0-9]*)*$' [type=string_pattern_mismatch, input_value='0StatusTimestamp', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/string_pattern_mismatch
Invalid name:
1 validation error for SignalR
name
  String should match pattern '^([A-Z][a-z0-9]*)*$' [type=string_pattern_mismatch, input_value='0StatusError', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/string_pattern_mismatch
Invalid name:
1 validation error for SignalR
name
  String should match pattern '^([A-Z][a-z0-9]*)*$' [type=string_pattern_mismatch, input_value='0StatusConnected', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/string_pattern_mismatch

The simplest fix would be to intercept these values during introspection and add a string to the front to make it valid, or move the number to the end. Also these parameters should have Status and Config removed from them to shorten the PVs.

Note the same applies to group names:

2025-05-29T16:03:23.504146465 WARN pvxs.ioc.group.processor
     Group GARYI04:FR:FR0:DECODER:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2025-05-29T16:03:23.505063821 WARN pvxs.ioc.group.processor
     Group GARYI04:FR:FR1:DECODER:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2025-05-29T16:03:23.505121630 WARN pvxs.ioc.group.processor
     Group GARYI04:FR:FR2:DECODER:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2025-05-29T16:03:23.505153269 WARN pvxs.ioc.group.processor
     Group GARYI04:FR:FR3:DECODER:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
GARYI04:EF:PVI: Error Group not created: invalid field name "0_config_acqid"
GARYI04:MW:PVI: Error Group not created: invalid field name "0_config_ctrl_port"

These could potentially be handled in the same logic.

Acceptance Criteria

  • These parameters are handled correctly
  • Unit tests added to show these parameters are handled

Activity

  1. GDYendell commented on May 29, 2025

    @GDYendell
    ContributorAuthor

    It would also be good to understand why these parameters are failing and others aren't because it is only a few of them and I would have though all FP/FR parameters might have the same problem

  2. self-assigned this
    on Jun 6, 2025
  3. GDYendell commented on Jun 24, 2025

    @GDYendell
    ContributorAuthor

    @shihab-dls I imagine the fix to this will make use of DiamondLightSource/fastcs#122

  4. GDYendell commented on Aug 19, 2025

    @GDYendell
    ContributorAuthor

    @shihab-dls while you are working on DiamondLightSource/fastcs#192 I will point fastcs-odin at that branch and see if it solves this problem

  5. self-assigned this
    on Aug 19, 2025
  6. linked a pull request that will close this issueHandle meta and fan parameters correctly #79on Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions