Skip to content

Commit e978c9c

Browse files
committed
Added ACTIVITY_STATUS vocabulary
Deleted unused welding activities
1 parent 5e17135 commit e978c9c

4 files changed

Lines changed: 37 additions & 31 deletions

File tree

bam_masterdata/datamodel/v2/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
- Changed descriptions: $NAME, $SHOW_IN_PROJECT_OVERVIEW, START_DATE, END_DATE
88
- `$SHOW_IN_PROJECT_OVERVIEW` changed property_label
99
- Deleted EXPERIMENTAL_STEP.EXPERIMENTAL_RESULTS, $ANNOTATIONS_STATE, $XMLCOMMENTS
10+
- Deleted `GMAW_BASE` and `LASER_HYBRID_MAGNET` (Cagtay)

bam_masterdata/datamodel/v2/activities.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -268,34 +268,6 @@ class Weldment(Processing):
268268
)
269269

270270

271-
class GmawBase(Weldment):
272-
defs = ObjectTypeDef(
273-
code="GMAW_BASE",
274-
description="""
275-
A simple gas metal arc welding (GMAW) experiment
276-
""",
277-
iri="https://bam.de/masterdata/GmawBase",
278-
references=[],
279-
generated_code_prefix="GMAW_BASE",
280-
aliases=[],
281-
previous_versions=["EXPERIMENTAL_STEP.WELDMENT.GMAW_BASE"],
282-
)
283-
284-
285-
class LaserHybridMagnet(Weldment):
286-
defs = ObjectTypeDef(
287-
code="LASER_HYBRID_MAGNET",
288-
description="""
289-
A welding experiment using laser-hybrid welding with magnetic support
290-
""",
291-
iri="https://bam.de/masterdata/LaserHybridMagnet",
292-
references=[],
293-
generated_code_prefix="LASER_HYBRI_MAGNE",
294-
aliases=[],
295-
previous_versions=["EXPERIMENTAL_STEP.WELDMENT.LASER_HYBRID_MAGNET"],
296-
)
297-
298-
299271
class FcgTest(Test):
300272
defs = ObjectTypeDef(
301273
code="FCG_TEST",

bam_masterdata/datamodel/v2/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class Activity(BaseEntity):
125125
)
126126

127127
status = PropertyTypeAssignment(
128-
code="STATUS",
128+
code="ACTIVITY_STATUS",
129129
data_type="CONTROLLEDVOCABULARY",
130130
vocabulary_code="ACTIVITY_STATUS",
131131
property_label="Status",
@@ -154,8 +154,8 @@ class Activity(BaseEntity):
154154
data_type="XML",
155155
property_label="Spreadsheet",
156156
description="""
157-
Optional structured spreadsheet used to capture tabular parameters, intermediate values,
158-
or structured notes associated with an entity. This field is intended for lightweight,
157+
Structured spreadsheet used to capture tabular parameters, intermediate values, or
158+
structured notes associated with an entity. This field is intended for lightweight,
159159
human-curated data and is not a replacement for datasets or result files.
160160
""",
161161
mandatory=False,
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
from bam_masterdata.metadata.definitions import VocabularyTerm, VocabularyTypeDef
2+
from bam_masterdata.metadata.entities import VocabularyType
3+
4+
5+
class ActivityStatus(VocabularyType):
6+
defs = VocabularyTypeDef(
7+
code="ACTIVITY_STATUS",
8+
description="""Current status of the activity: PLANNED, RUNNING, COMPLETED, CANCELLED.""",
9+
)
10+
11+
planned = VocabularyTerm(
12+
code="PLANNED",
13+
label="Planned",
14+
description="""The activity is planned but has not yet started.""",
15+
)
16+
17+
running = VocabularyTerm(
18+
code="RUNNING",
19+
label="Running",
20+
description="""The activity is currently running.""",
21+
)
22+
23+
completed = VocabularyTerm(
24+
code="COMPLETED",
25+
label="Completed",
26+
description="""The activity has been completed.""",
27+
)
28+
29+
cancelled = VocabularyTerm(
30+
code="CANCELLED",
31+
label="Cancelled",
32+
description="""The activity has been cancelled and will not be completed.""",
33+
)

0 commit comments

Comments
 (0)