ISISComputingGroup / ISISComputingGroup/IBEX

Reflectometry: Script Checker

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

Description

As a POLREF scientist I would like to have a utility in genie_python that helps me check any given script for validity, similar to the `dry_run` flag in reflectometry scripts, i.e. it just prints out what the script would do but not actually do it. There should be a clear distinction from a user interaction point of view between running the script and checking the script. This has cost them time before as they ran a script overnight but forgot to disable dry run.

### Acceptance Criteria
- There is a utility in genie_python that lets you "dry run" any script file, i.e.
1. User types something like `check_script("some_file.py")`,
2. Script is run but any commands contained therein are simply printed to console, nothing is actually set, no runs started etc.

### Notes
We have a genie [simulation mode](https://github.com/ISISComputingGroup/ibex_user_manual/wiki/Simulating-Scripts), it may be enough to have a wrapper that loads a given script and executes any code inside within a `with g.sim.Simulate():` block.

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.