scipp / scipp/ess

[Requirement] Param class and common implementations

Open
#151 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

essreduce
Dominant language
Python
Stars
1
Forks
3
Avg merge
2d 11h
Merged PRs (30d)
17

Description

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 scipp/ess#152. 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 scipp/ess#152.

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading scipp/ess#152 and the ESSsans inputs mentioned as a prototype scenario, then compare the Mantid algorithm-property documentation example. No repository file or test entry point is identified in the issue, so locate the Python module and existing widget structure before defining the Param interface. Done means the base class, common implementations, validation behavior, widget construction, and test coverage are agreed and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.