haddock3 icon indicating copy to clipboard operation
haddock3 copied to clipboard

Add logic to check for incompatible parameters

Open rvhonorato opened this issue 7 months ago • 2 comments

You are about to submit a new Pull Request. Before continuing make sure you read the contributing guidelines and that you comply with the following criteria:

  • [x] You have sticked to Python. Please talk to us before adding other programming languages to HADDOCK3
  • [ ] Your PR is about CNS
  • [x] Your code is well documented: proper docstrings and explanatory comments for those tricky parts
  • [x] You structured the code into small functions as much as possible. You can use classes if there is a (state) purpose
  • [x] Your code follows our coding style
  • [x] You wrote tests for the new code
  • [x] tox tests pass. Run tox command inside the repository folder
  • [ ] -test.cfg examples execute without errors. Inside examples/ run python run_tests.py -b
  • [x] PR does not add any dependencies, unless permission granted by the HADDOCK team
  • [x] PR does not break licensing
  • [ ] Your PR is about writing documentation for already existing code :fire:
  • [ ] Your PR is about writing tests for already existing code :godmode:

This PR adds a logic to check for parameter incompatibilities.

For example; with #918 I added a new parameter called less_io however you cannot use this parameter together with mode=batch.

So now you can define a new incompatible property of a given parameter in the haddock.modules.defaults.yaml;

less_io:
  # ...
  incompatible:
    mode: batch

Which will then be validated when the run is being setup.

rvhonorato avatar Jul 11 '24 13:07 rvhonorato