Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Requirement] Param class and common implementations #29

Open
SimonHeybrock opened this issue May 16, 2024 · 2 comments
Open

[Requirement] Param class and common implementations #29

SimonHeybrock opened this issue May 16, 2024 · 2 comments

Comments

@SimonHeybrock
Copy link
Member

SimonHeybrock commented May 16, 2024

Executive summary

For auto-generating workflow parameter input widgets, a base class and implementations for common param types are needed

Context and background knowledge

See #28. Have a look at, e.g., https://docs.mantidproject.org/v6.1.0/algorithms/LoadEventNexus-v1.html. The widget and the table of properties in the docs page was generated programmatically. Each line corresponds to a "param" as described here (Mantid calls these "algorithm properties").

Inputs

The param classes will have a number of required and optional inputs. Something like:

Required:

  • Name
  • Description
  • Type
  • Required
  • Default value

Optional:

  • Bounds
  • Validators

Methodology

The Param base class (working title) should run things such as validators.

Outputs

Implementations of the Param class must be able to construct a simple widget that can be included in higher-level widgets as part of #28.

Examples of required Param implementations:

  • BinEdgeParam (linear/log, start, stop, num, unit, ...)
  • Boolean, integer, ...
  • Scalar (float) with unit
  • Filename/path

Which interfaces are required?

Python module / function

Test cases

Params for ESSsans inputs make a good scenario for prototyping and testing

Comments

  • Feature: Generate Python code from param class with set values.
@jl-wynen
Copy link
Member

See also scipp/sciline#139 for a discussion and prototypes.

@SimonHeybrock
Copy link
Member Author

See also scipp/sciline#139 for a discussion and prototypes.

Note that the Param described in the requirement does not need any relation/interaction with Sciline, unlike in the linked issue.

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

No branches or pull requests

2 participants