Skip to content

Implement Registry and Query Logic #13

@szabo137

Description

@szabo137

Description:

Implement a structured system to manage beams, experiments and facilities in LaserExperiments.jl.

  • Experiments are combinations of beams (laser, electron, or more) and may be either generic or deployed.
  • Facilities contain deployed experiments and provide location metadata.
  • The runtime registry allows in-memory additions and queries, while contributions can be persisted to JSON and optionally submitted as GitHub pull requests.

Requirements:

  • Runtime registry to hold lasers, electron beams, experiments, and facilities in memory.
  • Functions to add entries to the runtime registry.
  • Contribution functions to persist entries to JSON files (via database layer).
  • Automatic update of facilities when adding experiments or deployed systems.
  • Optional GitHub PR helper to contribute entries upstream.
  • Validation to ensure references (laser, electron beam, facility) exist before saving.

Proposed API Examples:

# Add new laser beam
Registry.add_laser!(newlaser)

# Add new experiment at runtime
Registry.add_experiment!(newexp)

# Add new facility
Registry.add_facility!(newfacility)

# Query examples
Registry.experiments_in_facility("HiBEF")
Registry.facility_of_experiment("GammaRaySourceExp")
Registry.laser_of_experiment("InverseComptonExp")

# saving
Database.save() # saves registry in json files

Tasks:

  • Implement runtime registry methods (add_experiment!, add_facility!, etc.).
  • Implement contribution layer updating both experiments and facilities JSON files.
  • Add validation functions to prevent dangling references.
  • Implement unit tests covering runtime addition, persistence, and facility linkage.
  • (Optional) GitHub PR helper for automatic submission.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions