Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #807
Current process is...
topostats/entry_point.create_parser
: get arguments from commandline via theprocess_parser
subparser (includes DPI)topostats/run_topostats.run_topostats()
: loads the dictionary and updates it with any values fromarg
, will updatesavefig_dpi
with--savefig-dpi
value.topostats/plotting_dictionary.yaml
to the mainconfig["plotting"]["plot_dict"]"
. This adds in all the image specific settings such as title and importantly DPI values for each image.config["plotting"]
configuration.utils.update_plotting_config()
. This adds all the options not defined in theplotting_dictionary
with those fromtopostats/default_config.yaml
.This was wrong because we have
plotting_config["plot_dict"][image] = {**options, **main_config}
and so the options from**main_config
override those from**options
as you can not have dictionaries with duplicate keys.This has been fixed by...
plot_dictionary
with any that exist in thedefault_config.yaml
under theplotting
section. Importantly this means that if any areNone
they do not update, logic that already existed inupdate_config()
.plot_dictionary
any values from theplotting
section ofdefault_config.yaml
that do not already exist.This avoids replacing the defaults from
plot_dictionary
withNone
values from theplotting
section ofdefault_config.yaml
.Tests included which check equality of dictionaries and that
LOGGER.info()
is included when changes are made to the DPI.Other Changes
LOGGER.info()
toLOGGER.debug()
intopostats.io.dict_to_hdf5
as I don't think printing the keys is that informative.