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

Create an EntityType class to encapsulate constants associated with Dioptra Resources #651

Open
5 tasks
keithmanville opened this issue Oct 7, 2024 · 0 comments
Labels
refactor Changes that neither fix a bug nor add a feature

Comments

@keithmanville
Copy link
Collaborator

Implement a new EntityType dataclass that encapsulates constants associated with Dioptra Resources.

The implementation may look something like this.

@dataclass
class EntityType:
    name: str
    key: str
    id: int

QUEUE_TYPE = EntityType("Queue", "queue", 1)
EXPERIMENT_TYPE = EntityType("Experiment", "experiment", 2)
PLUGIN_FILE_TYPE = EntityType("Plug-in File", "plugin_file", 3)

Definition of done

  • identify all constants that need to be defined for each resource
  • Implement the dataclass and instantiate instances of the new dataclass for each Dioptra resource
  • Remove and duplicative constants and replace with references to new dataclass
  • All existing tests pass
  • The feature is merged into dev
@keithmanville keithmanville added the refactor Changes that neither fix a bug nor add a feature label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Changes that neither fix a bug nor add a feature
Projects
None yet
Development

No branches or pull requests

1 participant