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

Rework class / namespace discovery #456

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Wuestengecko
Copy link
Member

@Wuestengecko Wuestengecko commented Oct 2, 2024

No description provided.

@Wuestengecko Wuestengecko force-pushed the class-discovery branch 3 times, most recently from ab8e8a6 to 12d008f Compare October 14, 2024 15:07
@Wuestengecko Wuestengecko force-pushed the class-discovery branch 4 times, most recently from bf99b03 to 98e903d Compare October 18, 2024 08:01
@Wuestengecko Wuestengecko force-pushed the class-discovery branch 3 times, most recently from 7e13af6 to e6a3963 Compare November 14, 2024 09:03
@Wuestengecko Wuestengecko force-pushed the class-discovery branch 3 times, most recently from 1ca4fa8 to bb63451 Compare November 18, 2024 13:18
@Wuestengecko Wuestengecko force-pushed the class-discovery branch 3 times, most recently from 58ce90d to c1cf3c0 Compare November 27, 2024 14:12
@Wuestengecko Wuestengecko force-pushed the class-discovery branch 6 times, most recently from c3f5125 to 43f0f85 Compare December 13, 2024 13:41
@Wuestengecko Wuestengecko changed the base branch from master to html-newlines December 13, 2024 13:42
Base automatically changed from html-newlines to master December 13, 2024 14:20
@Wuestengecko Wuestengecko force-pushed the class-discovery branch 5 times, most recently from e701888 to 9394970 Compare December 16, 2024 17:40
@Wuestengecko Wuestengecko marked this pull request as ready for review December 16, 2024 17:49
@Wuestengecko Wuestengecko requested a review from vik378 as a code owner December 16, 2024 17:49
@Wuestengecko Wuestengecko changed the base branch from master to workflow-concurrency December 17, 2024 17:17
@Wuestengecko Wuestengecko force-pushed the class-discovery branch 2 times, most recently from bcd22a4 to deb8e14 Compare December 18, 2024 09:04
Base automatically changed from workflow-concurrency to master December 18, 2024 09:04
Wuestengecko and others added 2 commits December 18, 2024 11:16
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant