ISISComputingGroup / ISISComputingGroup/IBEX

genie_python: Make cset API more user-friendly

Open
#2,689 2 comments 0 reactions 0 assignees View on GitHub
re-requested
Dominant language
No language data
Stars
6
Forks
2
Avg merge
16h 40m
Merged PRs (30d)
2

Description

As a user, I would like the genie_python `cset` method API to be more intuitive and reflected in the documentation so that I'm not confused when using it in seemingly sensible ways.

This arose in the training when some did `g.cset("BLOCK", value=10)`. That syntax is sensible elsewhere in `genie_python` but doesn't work in `cset`. The current API accepts the following:

- Two un-named arguments (block name, value) followed by named runcontrol arguments
- An arbitrary number of named arguments where the name is the block name

Only 0 or 2 un-named arguments are accepted so the above fails. It is not clear from the documentation what is accepted. The current `cset` currently has an entirely arbitrary interface which can easily lead to errors (as happened to us). This should be reconsidered and improved to have a defined interface. It should maintain backwards compatibility to preserve current script behaviour.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.