Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate haddock3 test examples #68

Open
sverhoeven opened this issue May 2, 2022 · 4 comments
Open

Validate haddock3 test examples #68

sverhoeven opened this issue May 2, 2022 · 4 comments

Comments

@sverhoeven
Copy link
Member

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
Copy link
Member

joaomcteixeira commented May 3, 2022

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
Copy link
Contributor

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
Copy link
Member

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
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants