-
Notifications
You must be signed in to change notification settings - Fork 28
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
Convert default.cfg
to YAML files
#274
Conversation
Codecov Report
@@ Coverage Diff @@
## main #274 +/- ##
==========================================
+ Coverage 55.01% 56.06% +1.04%
==========================================
Files 53 55 +2
Lines 3439 3530 +91
==========================================
+ Hits 1892 1979 +87
- Misses 1547 1551 +4
Continue to review full report at Codecov.
|
Note, these only affect the defaults inside the core code. The user config will remain as is, simple and beautiful 😜 |
But the user will not know how to write things since the default uses a different syntax…..
Asking for support troubles…
|
Thinking deeply about it, considering issues related to the architecture, maintainability, and user perspective, I think what is best is to prepare a |
I suggest to first check carefully the current |
Sounds good. I have the script to regenerate the yamls, so we can leave this as a draft. I will prepare what's left, and when the parameters have been parsed, we recreate the yamls and merge this one. Also, I thought we can have the |
Ok - I then need to find the time to clean and test the `defaults.cfg` files.
|
The parameters inside each layer are, for now, just a draft to demonstrate.
Added a Fetch this branch and run:
You will get a file Once this PR is accepted, the And, naturally, we ended up answering #55 |
Done. I have updated the first message of this PR, please read it. |
Made some updates:
|
@amjjbonvin this PR is ready to be merged. You can continue adding documentation to the |
- hoover: No help yet
+ hover: No help yet
Since you expect the text to be between quotes should this also be the case when there is “No help yet” ?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best to merge indeed and then keep adding description to the yams files.
No. You only need quotes when your strings have special characters like colon @sverhoeven we are merging 😉 |
Convert modules'
default.cfg
to YAML files for better integration with other platforms (such as i-VRESSE/workflow-builder#1) and as a documentation source for documentation generating scripts. This PR is the result of our bi-weekly meetings.These changes do NOT affect the HADDOCK3 toml-like user configuration file.
The proposed
yaml
structure for modules' default config is as follows (OUTDATED):I think it is easier to maintain if the expert levels are subdictionaries in the yaml file (this is how it is implemented in this PR, but can be changed).Nested dictionaries are also supported as is the case for thetopoaa
module.Personally, I like the yaml structure and is giving very nice feeling and results while developing this PR.
The original
default.cfg
files were converted to YAML with this script.@sverhoeven what other keys per parameter do we need for IVRESSE, any additional requirements?
YAML pros against JSON:
YAML cons against the current format:
haddock-cfg
CLI that translatesdefault.yml
to user readable haddock3 config filesImplemented a
CLI
to retrieve the default configuration in the nice human-readable haddock3 format, for example:haddock3-cfg -h
haddock3-cfg -m topoaa
It will generate a haddock3 config with helper messages like the example below:
This generated config can be copy-pasted directly to the user's haddock3 config file.
TODO:
defaults.cfg
(in another Pull Request) the newdefaults.yml
can be regenerated before merging this PR.defaults.cfg
After this PR is accepted you need to perform the following commands from inside the
haddock3
folder and conda environment:conda env update --file requirements.yml --prune
python setup.py develop --no-deps