-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement new Namespace-based class discovery
This commit reworks the discovery of metamodel classes and namespaces. It introduces the `Namespace` object, whose instances keep track of the contained classes. Namespace objects are discovered through the Python entrypoint system. This makes extending the metamodel significantly easier. It's no longer necessary to add weirdly formatted entries into barely documented dictionaries, with errors only appearing at some arbitrary later point. Discovery of classes now happens via a custom metaclass by simply inheriting from `ModelElement`. This also allows additional metadata to be specified at subclassing time, which is especially relevant for namespace versioning. Due to this, the following decorators are now no longer needed and have been deprecated: - `@xtype_handler`: Was used to register classes for discovery, which is now done by the metaclass. - `@attr_equal`: This overwrites the `__eq__` method to compare against an attribute. Now handled by the `eq=...` class keyword argument.
- Loading branch information
1 parent
2e65e49
commit c8be001
Showing
50 changed files
with
3,211 additions
and
1,500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.