-
Notifications
You must be signed in to change notification settings - Fork 3
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
Refactor config #411
base: add_unit_test_for_config
Are you sure you want to change the base?
Refactor config #411
Conversation
d91f9be
to
42b4798
Compare
This reverts commit f7592c5.
5ac3a8c
to
9850c73
Compare
install mono in CI
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.
Much cleaner implementation! LGTM
@@ -26,7 +31,7 @@ library_prediction: | |||
variable_modifications: 'Oxidation@M;Acetyl@Protein_N-term' | |||
max_var_mod_num: 2 | |||
missed_cleavages: 1 | |||
precursor_len: | |||
precursor_len: # TODO: make this min/max ? |
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.
The way how the gui interacts with the config makes it easier if this is a treated like a fixed length tuple.
do_print : bool, optional | ||
Whether to print the modified config. Default is False. | ||
""" | ||
|
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.
Can you add a sentence about the strategy of using a tracking config
""" | ||
Recursively update target_dict in-place with values from update_dict, following specific rules for different types. | ||
|
||
For each value that gets updated, the corresponding value in tracking_dict is updated with experiment_name. |
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.
The variable name experiment_name
was a bit of a misstranslation which we kept for too long. Let's rename it here.
|
||
For each value that gets updated, the corresponding value in tracking_dict is updated with experiment_name. | ||
|
||
Args: |
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.
(nit) numpy style docstrings
""" | ||
for key, update_value in update_config.items(): | ||
if key not in target_config: | ||
raise ValueError(f"Key not found in target_config: '{key}'") |
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.
Should we make this more explicit?
Something like: Updating configs does not allow defining new keys.
Refactor the config class:
tracking_config
variable)