nfdi4plants / ARCCommander

Tool to manage your ARCs
MIT License
11 stars 9 forks source link

[Feature Request] Sanity checks #77

Closed HLWeil closed 1 year ago

HLWeil commented 2 years ago

Is your feature request related to a problem? Please describe. Currently the ArcCommander naively ignores some errors in the arc structure. E.g. when an investigation file is missing. This can lead to some unwanted situtations. E.g. when "arc study add" is run, the study file gets initiated but the study can't be registered in the missing investigation file.

Describe the solution you'd like Instead, prior to performing tasks that might fail halfway, sanity checks should be performed. Intuitively I would let them fail and provide additional helpful information and tips for how to solve the issue. Here I see two ways to implement this:

  1. One standard check that is performed before running any command that fails if any part of the Arc specification is missing (little bit like git). (+) Very manageable as errors might only be done in a single place (-) This might fail even though the missing part might not even affect the command

  2. A few selected standard checks, used in the specific scenarios they are needed. (+) Commands only fail if they actually can't run successfully (-) More complexity leaves room for more programming errors

@cgarth @JonasLukasczyk @muehlhaus Any opinions on this?