Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Support for flexible configuration #166

Open
5 tasks
dzhoshkun opened this issue Jul 23, 2018 · 6 comments
Open
5 tasks

Support for flexible configuration #166

dzhoshkun opened this issue Jul 23, 2018 · 6 comments

Comments

@dzhoshkun
Copy link
Collaborator

dzhoshkun commented Jul 23, 2018

We have decided to migrate the format of NiftyNet configuration files from INI to YAML, as the latter is more flexible. As part of this migration, we have also decided to break the configuration parameters down into a file hierarchy, rather than presenting the user with a single, long configuration file. This with the aim of supporting a wider spectrum of users; such that beginner-level users will not have to deal with advanced configuration parameters, while more advanced users will have much more control.

The CMICLab branch has sample files (under the config/issue-189 folder) demonstrating the proposed new configuration hierarchy. In addition, the CMICLab issue has a long discussion thread with useful pointers. However as GitHub is the main development platform for NiftyNet, we are going to continue the relevant development work here. Also now the configuration parameters are documented on RTD.

This will have a large impact on NiftyNet users. As such, a staged approach may be more suitable to deal with it:

@dzhoshkun
Copy link
Collaborator Author

@wyli We stalled the development on this due to the refactoring of the NiftyNet engine architecture. Is now a good time to resume it?

Adding @csudre to this discussion as well.

@wyli
Copy link
Member

wyli commented Jul 23, 2018

Thanks for restarting this @dzhoshkun. The proposed new config looks really nice.

The next step (to implement the first two stages you mentioned) would be creating a new parser in parallel to the user parameters parser. Potentially we could have both .ini and .yaml supported during the transition?

At the moment "sections" in .ini are just dictionaries: loading here: (https://github.com/NifTK/NiftyNet/blob/v0.3.0/niftynet/utilities/user_parameters_parser.py#L159) and parsing here: (https://github.com/NifTK/NiftyNet/blob/v0.3.0/niftynet/utilities/user_parameters_parser.py#L255)

@dzhoshkun
Copy link
Collaborator Author

Yes, we can support both file formats during the transition. I will add a deprecation warning to the current parser.

@dzhoshkun
Copy link
Collaborator Author

dzhoshkun commented Jul 24, 2018

As this is quite extensive work, I've broken it down into multiple issues (all referenced within this issue's description above). However it makes sense to complete all the issues, and then merge the changes back, as we would like to switch directly to the new nested configuration file hierarchy instead of first switching the current configuration file structure to YAML, and then switching to the nested hierarchy. The latter approach might confuse users.

@dzhoshkun
Copy link
Collaborator Author

@ericspod Please could you discuss with me before assigning tickets to me. Thanks.

@dzhoshkun dzhoshkun removed their assignment May 28, 2019
@atbenmurray
Copy link
Collaborator

Note that this is active WRT the hackathon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants