metrumresearchgroup / bbi

Next generation modeling platform
11 stars 2 forks source link

Fix setup of config file for `TestSpecifiedConfig*` tests #309

Closed kyleam closed 9 months ago

kyleam commented 9 months ago

When working on gh-307, I noticed that, despite passing, TestSpecifiedConfigByAbsPathLoaded and TestSpecifiedConfigByRelativePathLoaded have an error in their output:

=== RUN   TestSpecifiedConfigByRelativePathLoaded/[INT-LOCAL-006]/acop[INT-LOCAL-006]
INFO[0000] Command was 'bbi' while arguments were -d --config /tmp/bbi-test-w0wYU5G/meow/bbi.yaml nonmem run local --nm_version nm75 /tmp/bbi-test-w0wYU5G/working/acop/acop.mod
ERRO[0000] An error occurred trying to execute model. Error details are : exit status 1
ERRO[0000] Exit code was 1, details were exit status 1
ERRO[0000] output details were: time="2023-10-06T10:01:13-04:00" level=info msg="Successfully loaded specified configuration from /tmp/bbi-test-w0wYU5G/meow/bbi.yaml"
time="2023-10-06T10:01:13-04:00" level=info msg="Beginning Local Path"
time="2023-10-06T10:01:13-04:00" level=info msg="Setting logging to DEBUG"
time="2023-10-06T10:01:13-04:00" level=debug msg="Locating models from arguments"
time="2023-10-06T10:01:13-04:00" level=info msg="A total of 1 models have completed the initial preparation phase"
time="2023-10-06T10:01:13-04:00" level=debug msg="Building turnstile manager"
time="2023-10-06T10:01:13-04:00" level=debug msg="Beginning turnstile execution"
time="2023-10-06T10:01:13-04:00" level=info msg="Manager Details: Working: 0, Errors: 0, Completed: 0, Concurrency: 4, Iterations: 1"
time="2023-10-06T10:01:13-04:00" level=debug msg="[acop] Beginning local preparation phase"
time="2023-10-06T10:01:13-04:00" level=debug msg="[acop] Overwrite is currently set to true"
time="2023-10-06T10:01:13-04:00" level=debug msg="[acop] Writing initial gitignore file"
time="2023-10-06T10:01:13-04:00" level=debug msg="Requested save of config file /tmp/bbi-test-w0wYU5G/working/acop/acop"
time="2023-10-06T10:01:13-04:00" level=debug msg="[acop] Creating local execution script"
time="2023-10-06T10:01:13-04:00" level=debug msg="[acop] beginning script command generation. NMQual is set to false"
time="2023-10-06T10:01:13-04:00" level=fatal msg="nmVersion of  was provided but has no configurations in bbi.yaml!"
--- PASS: TestSpecifiedConfigByRelativePathLoaded (0.02s)
    --- PASS: TestSpecifiedConfigByRelativePathLoaded/[INT-LOCAL-006] (0.02s)
        --- PASS: TestSpecifiedConfigByRelativePathLoaded/[INT-LOCAL-006]/acop[INT-LOCAL-006] (0.00s)

That error is due to unintentionally passing an empty bbi.yaml file. The second to last commit of this series fixes that, and the last commit provides more extensive error checking to avoid similar errors in this code going unnoticed.


This is ready to review but should be merged after its base (gh-307).