You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes#807
Current process is...
1. `topostats/entry_point.create_parser` : get arguments from commandline via the `process_parser` subparser (includes
DPI)
2. `topostats/run_topostats.run_topostats()` : loads the dictionary and updates it with any values from `arg`, will
update `savefig_dpi` with `--savefig-dpi` value.
3. Validate the updated configuration.
4. Load the default `topostats/plotting_dictionary.yaml` to the main `config["plotting"]["plot_dict"]"`. This adds in
all the image specific settings such as title and importantly DPI values for each image.
5. Validate the `config["plotting"]` configuration.
6. Update the plotting configuration with via `utils.update_plotting_config()`. This adds all the options _not_ defined
in the `plotting_dictionary` with those from `topostats/default_config.yaml`.
I think this is 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...
1. Updating the values from `plot_dictionary` with any that exist in the `default_config.yaml` under the `plotting`
section. Importantly this means that if any are `None` they do not update, logic that already existed in
`update_config()`.
2. Then adding to each image within `plot_dictionary` any values from the `plotting` section of `default_config.yaml`
that do _not_ already exist.
This avoids replacing the defaults from `plot_dictionary` with `None` values from the `plotting` section of
`default_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()` to `LOGGER.debug()` in `topostats.io.dict_to_hdf5` as I don't think printing the keys is that
informative.
The value was added to
topostats/default_config.yaml
to allow users to over-ride the defaults.Ideally we want...
if plotting["savefig_dpi"] is None
... use the values intopostats/plotting_dictionary.yaml
.else:
... use the values fromtopostats/default_config.yaml
/command line.The text was updated successfully, but these errors were encountered: