-
Notifications
You must be signed in to change notification settings - Fork 151
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
[MNT] Tags using enums #2235
Comments
Hi, can I take up this issue? |
Yes please! Let me know if you want any help. |
Hi @chrisholder, I'd like to work on this issue. I have a few queries:
Could you please advise on which approach would be more appropriate? |
@aeon-actions-bot assign @lucifer4073 |
Hi @lucifer4073! Happy for you to take this issue assuming @itsdivya1309 is also happy with this as they indicated they wanted to work on this. My idea of how this issue would be developed is incrementally module by module. Since I work closely on the clustering module that could be a good place to start? To begin the enums should be optional (i.e. the changes should not break any module that currently uses the strings). Additionally we don't need enums (for now) for the tags that are just booleans only for fields where you pass a string currently. For example for algorithm_type we could have something like:
We could then use it:
Keep it simple to begin just refactoring one module (clustering if you want). Once the PR is up we will probably need to get the opinion of others since this will be a package wide change. This file here contains all the info on valid tags currently and will probably be where the enums will exist. I'd imagine once we have incrementally refactored the package we will then remove support for strings and enforce the use of enums. |
Hi, @lucifer4073! I appreciate you taking this up. I was interested in working on this, but I am occupied with other stuff. I’m happy for you to take the lead on this one. Let me know if you need any help! |
Hi @chrisholder @TonyBagnall can you please review the PR? |
Someone will review it when they get around to it, no guarantee that is going to be quick. |
Describe the feature or idea you want to propose
In aeon we use the _tags to define the capabilities. For examples:
For values like "algorithm_type" and "X_inner_type" which we use a string value for it would be nice if these were defined with enums.
Describe your proposed solution
Add an enum for each tag form example:
Assuming we had a enum for each type we could then do something like this:
As the values of the enums that they resolve to are the same string values it means we don't need to change any of the actual tag logic. Additionally we can better assert the tag is valid by checking if a value is an instance for Enum.
Describe alternatives you've considered, if relevant
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: