i-VRESSE / workflow-builder

Graphical interface to build a workflow file
https://i-vresse-workflow-builder.netlify.app/
Apache License 2.0
4 stars 2 forks source link

Validate haddock3 test examples #68

Open sverhoeven opened 2 years ago

sverhoeven commented 2 years ago

The workflow build validates workflows uploaded to it. We should check that the workflows at https://github.com/haddocking/haddock3/tree/main/examples are valid.

It would be nice to be able to run

yarn validate ../haddock3/examples/docking-protein-protein/docking-protein-protein-test.cfg
# in package.json:scripts:validate defined as
yarn ts-node src/validate_cli.ts  ../haddock3/examples/docking-protein-protein/docking-protein-protein-test.cfg
# if valid then return exit code 0 else print errors + return exit code 1

And have a way run multiple (similar to https://github.com/haddocking/haddock3/blob/main/examples/run_tests.py) in a CI job like

git clone https://github.com/haddocking/haddock3
find haddock3/examples -name \*test.cfg | xargs -n 1 yarn validate

Additionally it would be nice to compare the toml file the builder generates is comparable to the input.

joaomcteixeira commented 2 years ago

We have already unit tests that validate the examples config files; both *-test.cfg and all *.cfg. There is no need for the workflow builder to test it; wrong configs in the examples/ folder won't (shouldn't) pass into haddock3 main; tests would find it during pull request.

https://github.com/haddocking/haddock3/blob/005fac8b7d70adfdfedc007f0dd98bcf39c6ae72/tests/test_examples_general.py#L40-L42

rvhonorato commented 2 years ago

Yes there is @joaomcteixeira, the builder works in a different state than the source code. If it writes invalid config files these will go over the pipeline, spend computational resources and then fail, remember that computational resources cost money and time.

joaomcteixeira commented 2 years ago

Yes. I understand the need to validate the configuration files created by users using the workflow builder. But there is no need for the workflow builder to test the *-test.cfg; those are already tested.

sverhoeven commented 2 years ago

The validator that is part of the workflow builder should also find that the examples are valid. So it is more about testing whether the JS code is OK then that the examples are OK.