Skip to content
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

Configuration management refactoring #1666

Open
marcofavorito opened this issue Aug 16, 2020 · 2 comments
Open

Configuration management refactoring #1666

marcofavorito opened this issue Aug 16, 2020 · 2 comments
Labels
core enhancement New feature or request

Comments

@marcofavorito
Copy link
Contributor

marcofavorito commented Aug 16, 2020

Is your feature request related to a problem? Please describe.
The implementation of configuration management could be simplified and cleaned up.

Among other things:

  • Simplify configuration loader instantiation.
  • Implement proper custom loader, instead of wrapping it at import time.
  • Implement PyPI dependency class (borrow from pip?), instead of raw dict type.
  • add protocol specification as separate configuration class (and not inheriting from ProtocolConfig), change and clean up the loading of a protocol specification.
  • the key-order-preserving YAML loading is a bit hacky; that could be made neater as well
  • fix the discrepancies introuced in [AEA-506] Handle multipage AEA configuration  #1674 between AgentConfig and the other configuration classes. In particular, the first expects a multi-paged YAML file, which contrasts with the from_json/to_json interface, which only expects a JSON object (and not a list)
  • in tests, make validators as fixtures.

Describe the solution you'd like
Address some of the above.

Describe alternatives you've considered
n/a

Additional context
low priority.

@DavidMinarsch
Copy link
Contributor

Related #969

@solarw
Copy link
Contributor

solarw commented Jan 4, 2021

some thoughts:

  1. Change internal configuration representation. use dict/mapping instead of variables inside the Configuration classes
    to make it more from/to json compatible, all the properties will stay the same, init method the same,
    the primary goal is to unify: to/from json methods on base class, instead of writing it for every class.
    also, dict/mapping inside the config can help to use some yaml friendly mapping to preserve order while dealing with configs

  2. Use AgentConfigManager for loading/accessing/modifying agent-wide configurations including overrides.
    just to have a single point of responsibility with all validation in one place. so every time config for aea project loaded from the file system, it's better to handle it with config manager, to avoid direct modifications.

  3. would be nice to find the way to unify agent configuration properties with builders some, to avoid code duplication when new aea configuraion option is added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants