Features
- **Config Namespace Instantiation**: Introduced a new `instantiate` method in the Config namespace object, enabling users to instantiate objects in several intuitive ways:
- Utilizing the SkeletonKey framework directly:
python
model = skeletonkey.instantiate(args.model, arg1=arg1, arg2=arg2, arg3=arg3)
- Via the model's instantiation method:
python
model = args.model.instantiate(arg1=arg1, arg2=arg2, arg3=arg3)
- Through direct Config object calls:
python
model = args.model(arg1=arg1, arg2=arg2, arg3=arg3)
This addition aims to simplify and diversify the object creation process within the framework.
Enhancements
- **Project File Structure Rework**: The entire project’s file structure has been reorganized to support the new instantiation methods and to avoid issues with circular imports, enhancing the code’s modularity and maintainability.
- **Fetch Functionality**: Added new `fetch` functionality along with an example case that serves as a basic test, demonstrating the integration of remote resources or configurations seamlessly into the project.
Changes
- **Renaming of `import_class` to `import_target`**: To better reflect its expanded role in importing both classes and other targets required by the `instantiate` and `fetch` methods, `import_class` has been renamed to `import_target`.
- **Command Line Config Overrides**: The command line interface has been enhanced to allow users to directly override the main configuration, providing greater flexibility in configuration management during runtime.
- **Type Annotation Adjustments**: The explicit type annotations for the Config object in the `instantiate` method have been removed to accommodate the restructured instantiation approach. A shared Config interface is suggested as a potential solution for maintaining type checking and annotations integrity.