Skip to content

MAINT: remove hard coded event type class name. #46

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

Merged
merged 2 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_activity_canceled_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelActivityCanceledEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelActivityCanceledEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelActivityCanceledEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelActivityCanceledLink()
self.data = EiffelActivityCanceledData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_activity_finished_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelActivityFinishedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelActivityFinishedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelActivityFinishedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelActivityFinishedLink()
self.data = EiffelActivityFinishedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_activity_started_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelActivityStartedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelActivityStartedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelActivityStartedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelActivityStartedLink()
self.data = EiffelActivityStartedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_activity_triggered_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelActivityTriggeredEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelActivityTriggeredEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelActivityTriggeredEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelActivityTriggeredLink()
self.data = EiffelActivityTriggeredData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_announcement_published_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelAnnouncementPublishedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelAnnouncementPublishedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelAnnouncementPublishedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelAnnouncementPublishedLink()
self.data = EiffelAnnouncementPublishedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_artifact_created_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelArtifactCreatedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelArtifactCreatedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelArtifactCreatedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelArtifactCreatedLink()
self.data = EiffelArtifactCreatedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_artifact_published_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelArtifactPublishedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelArtifactPublishedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelArtifactPublishedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelArtifactPublishedLink()
self.data = EiffelArtifactPublishedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_artifact_reused_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelArtifactReusedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelArtifactReusedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelArtifactReusedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelArtifactReusedLink()
self.data = EiffelArtifactReusedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_base_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -174,7 +174,7 @@ class EiffelBaseEvent(object):
tag = "_"
domain_id = "_"
version = "0.0.1"
meta = EiffelBaseMeta("EiffelBaseEvent", version)
meta = EiffelBaseMeta(__qualname__, version)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__qualname__ will break our python2 compatibility, which can be considered fine if we do a major tag update.
But we will have to discuss whether or not we are okay with this first.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be fine with doing a major version step and effectively leaving python 2.x behind, although I think we need to hold of and provide any potential users with a deprecation notice/period. What I'm reluctant to do is to maintain both a python 2.x and a python 3.x versions, but that is mostly common sense given the EOL of Python 2.x.

links = EiffelBaseLink()

def __init__(self, version=None, family="_", tag="_", domain_id="_"):
Expand Down
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_composition_defined_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelCompositionDefinedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelCompositionDefinedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelCompositionDefinedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelCompositionDefinedLink()
self.data = EiffelCompositionDefinedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_confidence_level_modified_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelConfidenceLevelModifiedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelConfidenceLevelModifiedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelConfidenceLevelModifiedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelConfidenceLevelModifiedLink()
self.data = EiffelConfidenceLevelModifiedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_environment_defined_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelEnvironmentDefinedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelEnvironmentDefinedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelEnvironmentDefinedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelEnvironmentDefinedLink()
self.data = EiffelEnvironmentDefinedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_flow_context_defined_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelFlowContextDefinedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelFlowContextDefinedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelFlowContextDefinedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelFlowContextDefinedLink()
self.data = EiffelFlowContextDefinedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_issue_defined_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelIssueDefinedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelIssueDefinedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelIssueDefinedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelIssueDefinedLink()
self.data = EiffelIssueDefinedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_issue_verified_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelIssueVerifiedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelIssueVerifiedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelIssueVerifiedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelIssueVerifiedLink()
self.data = EiffelIssueVerifiedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_source_change_created_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelSourceChangeCreatedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelSourceChangeCreatedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelSourceChangeCreatedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelSourceChangeCreatedLink()
self.data = EiffelSourceChangeCreatedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_source_change_submitted_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelSourceChangeSubmittedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelSourceChangeSubmittedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelSourceChangeSubmittedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelSourceChangeSubmittedLink()
self.data = EiffelSourceChangeSubmittedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_test_case_canceled_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelTestCaseCanceledEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelTestCaseCanceledEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelTestCaseCanceledEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelTestCaseCanceledLink()
self.data = EiffelTestCaseCanceledData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_test_case_finished_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelTestCaseFinishedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelTestCaseFinishedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelTestCaseFinishedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelTestCaseFinishedLink()
self.data = EiffelTestCaseFinishedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_test_case_started_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelTestCaseStartedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelTestCaseStartedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelTestCaseStartedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelTestCaseStartedLink()
self.data = EiffelTestCaseStartedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_test_case_triggered_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelTestCaseTriggeredEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelTestCaseTriggeredEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelTestCaseTriggeredEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelTestCaseTriggeredLink()
self.data = EiffelTestCaseTriggeredData()
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelTestExecutionRecipeCollectionCreatedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelTestExecutionRecipeCollectionCreatedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelTestExecutionRecipeCollectionCreatedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelTestExecutionRecipeCollectionCreatedLink()
self.data = EiffelTestExecutionRecipeCollectionCreatedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_test_suite_finished_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,6 +37,6 @@ class EiffelTestSuiteFinishedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelTestSuiteFinishedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelTestSuiteFinishedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelTestSuiteFinishedLink()
self.data = EiffelTestSuiteFinishedData()
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_test_suite_started_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 Axis Communications AB.
# Copyright 2019-2022 Axis Communications AB and others.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -37,5 +37,5 @@ class EiffelTestSuiteStartedEvent(EiffelBaseEvent):
def __init__(self, *args, **kwargs):
"""Initialize data, meta and links."""
super(EiffelTestSuiteStartedEvent, self).__init__(*args, **kwargs)
self.meta = EiffelBaseMeta("EiffelTestSuiteStartedEvent", self.version)
self.meta = EiffelBaseMeta(self.__class__.__name__, self.version)
self.links = EiffelTestSuiteStartedLink()