dsw-models 4.26.1__tar.gz → 4.27.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {dsw_models-4.26.1 → dsw_models-4.27.0}/PKG-INFO +10 -10
  2. {dsw_models-4.26.1 → dsw_models-4.27.0}/dsw/models/build_info.py +4 -4
  3. {dsw_models-4.26.1 → dsw_models-4.27.0}/dsw/models/common.py +3 -3
  4. {dsw_models-4.26.1 → dsw_models-4.27.0}/dsw/models/document_template/metadata.py +1 -1
  5. {dsw_models-4.26.1 → dsw_models-4.27.0}/dsw/models/knowledge_model/common.py +17 -21
  6. {dsw_models-4.26.1 → dsw_models-4.27.0}/dsw/models/knowledge_model/events.py +93 -100
  7. {dsw_models-4.26.1 → dsw_models-4.27.0}/dsw/models/knowledge_model/flat.py +22 -21
  8. {dsw_models-4.26.1 → dsw_models-4.27.0}/dsw/models/knowledge_model/tree.py +7 -2
  9. dsw_models-4.27.0/dsw/models/project/__init__.py +0 -0
  10. dsw_models-4.27.0/dsw/models/project/common.py +14 -0
  11. dsw_models-4.27.0/dsw/models/project/events.py +100 -0
  12. dsw_models-4.27.0/dsw/models/project/files.py +15 -0
  13. dsw_models-4.27.0/dsw/models/project/replies.py +94 -0
  14. dsw_models-4.27.0/dsw/models/py.typed +0 -0
  15. dsw_models-4.27.0/pyproject.toml +38 -0
  16. dsw_models-4.26.1/LICENSE +0 -202
  17. dsw_models-4.26.1/dsw_models.egg-info/PKG-INFO +0 -43
  18. dsw_models-4.26.1/dsw_models.egg-info/SOURCES.txt +0 -21
  19. dsw_models-4.26.1/dsw_models.egg-info/dependency_links.txt +0 -1
  20. dsw_models-4.26.1/dsw_models.egg-info/not-zip-safe +0 -1
  21. dsw_models-4.26.1/dsw_models.egg-info/requires.txt +0 -1
  22. dsw_models-4.26.1/dsw_models.egg-info/top_level.txt +0 -1
  23. dsw_models-4.26.1/pyproject.toml +0 -42
  24. dsw_models-4.26.1/setup.cfg +0 -4
  25. dsw_models-4.26.1/setup.py +0 -3
  26. {dsw_models-4.26.1 → dsw_models-4.27.0}/README.md +0 -0
  27. {dsw_models-4.26.1 → dsw_models-4.27.0}/dsw/models/__init__.py +0 -0
  28. {dsw_models-4.26.1 → dsw_models-4.27.0}/dsw/models/document_template/__init__.py +0 -0
  29. {dsw_models-4.26.1 → dsw_models-4.27.0}/dsw/models/knowledge_model/__init__.py +0 -0
  30. {dsw_models-4.26.1 → dsw_models-4.27.0}/dsw/models/knowledge_model/package.py +0 -0
@@ -1,13 +1,11 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: dsw-models
3
- Version: 4.26.1
3
+ Version: 4.27.0
4
4
  Summary: Library with DSW models and basic IO operations
5
+ Keywords: dsw,config,yaml,parser
6
+ Author: Marek Suchánek
5
7
  Author-email: Marek Suchánek <marek.suchanek@ds-wizard.org>
6
8
  License: Apache License 2.0
7
- Project-URL: Homepage, https://ds-wizard.org
8
- Project-URL: Repository, https://github.com/ds-wizard/engine-tools
9
- Project-URL: Documentation, https://guide.ds-wizard.org
10
- Keywords: dsw,config,yaml,parser
11
9
  Classifier: Development Status :: 4 - Beta
12
10
  Classifier: License :: OSI Approved :: Apache Software License
13
11
  Classifier: Programming Language :: Python
@@ -16,11 +14,13 @@ Classifier: Programming Language :: Python :: 3.13
16
14
  Classifier: Programming Language :: Python :: 3.14
17
15
  Classifier: Topic :: Text Processing
18
16
  Classifier: Topic :: Utilities
19
- Requires-Python: <4,>=3.12
20
- Description-Content-Type: text/markdown
21
- License-File: LICENSE
22
17
  Requires-Dist: pydantic
23
- Dynamic: license-file
18
+ Requires-Python: >=3.12, <4
19
+ Project-URL: Homepage, https://ds-wizard.org
20
+ Project-URL: Repository, https://github.com/ds-wizard/engine-tools
21
+ Project-URL: Documentation, https://guide.ds-wizard.org
22
+ Project-URL: Issues, https://github.com/ds-wizard/ds-wizard/issues
23
+ Description-Content-Type: text/markdown
24
24
 
25
25
  # Data Stewardship Wizard: Models
26
26
 
@@ -9,9 +9,9 @@ BuildInfo = namedtuple(
9
9
  )
10
10
 
11
11
  BUILD_INFO = BuildInfo(
12
- version='v4.26.1~2e1c502',
13
- built_at='2026-01-10 17:15:32Z',
14
- sha='2e1c502c11e1e2fd885a1c696488008a1ca9b343',
12
+ version='v4.27.0~8ec71bd',
13
+ built_at='2026-02-03 08:45:11Z',
14
+ sha='8ec71bd85dfbea66adedb6590f7d76ae5143bbaa',
15
15
  branch='HEAD',
16
- tag='v4.26.1',
16
+ tag='v4.27.0',
17
17
  )
@@ -7,13 +7,13 @@ NULL_UUID = uuid.UUID('00000000-0000-0000-0000-000000000000')
7
7
 
8
8
 
9
9
  def to_camel(s: str) -> str:
10
- parts = s.split("_")
11
- return parts[0] + "".join(word.capitalize() for word in parts[1:])
10
+ parts = s.split('_')
11
+ return parts[0] + ''.join(word.capitalize() for word in parts[1:])
12
12
 
13
13
 
14
14
  class BaseModel(pydantic.BaseModel):
15
15
  model_config = pydantic.ConfigDict(
16
16
  alias_generator=to_camel,
17
17
  populate_by_name=True,
18
- extra="forbid",
18
+ extra='forbid',
19
19
  )
@@ -20,7 +20,7 @@ class DocumentTemplateStep(BaseModel):
20
20
  class DocumentTemplateFormat(BaseModel):
21
21
  uuid: UUID
22
22
  name: str
23
- icon: str = ""
23
+ icon: str
24
24
  steps: list[DocumentTemplateStep]
25
25
 
26
26
 
@@ -101,22 +101,20 @@ class DomainQuestionValidation(pydantic.BaseModel):
101
101
 
102
102
 
103
103
  QuestionValidation = typing.Annotated[
104
- typing.Union[
105
- MinLengthQuestionValidation,
106
- MaxLengthQuestionValidation,
107
- RegexQuestionValidation,
108
- OrcidQuestionValidation,
109
- DoiQuestionValidation,
110
- MinNumberQuestionValidation,
111
- MaxNumberQuestionValidation,
112
- FromDateQuestionValidation,
113
- ToDateQuestionValidation,
114
- FromDateTimeQuestionValidation,
115
- ToDateTimeQuestionValidation,
116
- FromTimeQuestionValidation,
117
- ToTimeQuestionValidation,
118
- DomainQuestionValidation,
119
- ],
104
+ MinLengthQuestionValidation |
105
+ MaxLengthQuestionValidation |
106
+ RegexQuestionValidation |
107
+ OrcidQuestionValidation |
108
+ DoiQuestionValidation |
109
+ MinNumberQuestionValidation |
110
+ MaxNumberQuestionValidation |
111
+ FromDateQuestionValidation |
112
+ ToDateQuestionValidation |
113
+ FromDateTimeQuestionValidation |
114
+ ToDateTimeQuestionValidation |
115
+ FromTimeQuestionValidation |
116
+ ToTimeQuestionValidation |
117
+ DomainQuestionValidation,
120
118
  pydantic.Field(discriminator='type'),
121
119
  ]
122
120
 
@@ -152,11 +150,9 @@ class RequestFailedTypeHintResponse(BaseTypeHintResponse):
152
150
 
153
151
 
154
152
  TypeHintResponse = typing.Annotated[
155
- typing.Union[
156
- SuccessTypeHintResponse,
157
- RemoteErrorTypeHintResponse,
158
- RequestFailedTypeHintResponse,
159
- ],
153
+ SuccessTypeHintResponse |
154
+ RemoteErrorTypeHintResponse |
155
+ RequestFailedTypeHintResponse,
160
156
  pydantic.Field(discriminator='response_type'),
161
157
  ]
162
158
 
@@ -5,16 +5,23 @@ from uuid import UUID
5
5
 
6
6
  import pydantic
7
7
 
8
- from .common import (BaseModel, TAnnotations, THeaders, TQuestionValueType,
9
- MetricMeasure, QuestionValidation, TypeHintExchange)
8
+ from .common import (
9
+ BaseModel,
10
+ MetricMeasure,
11
+ QuestionValidation,
12
+ TAnnotations,
13
+ THeaders,
14
+ TQuestionValueType,
15
+ TypeHintExchange,
16
+ )
10
17
 
11
18
 
12
19
  T = typing.TypeVar('T')
13
20
 
14
21
 
15
- class EditEventField(BaseModel, typing.Generic[T]):
22
+ class EditEventField[T](BaseModel):
16
23
  changed: bool
17
- value: T | None = None
24
+ value: T | None
18
25
 
19
26
  @pydantic.model_serializer(mode='wrap')
20
27
  def _serialize(self, handler):
@@ -24,13 +31,13 @@ class EditEventField(BaseModel, typing.Generic[T]):
24
31
  data = handler(self)
25
32
  return {'changed': True, 'value': data.get('value')}
26
33
 
27
- @staticmethod
28
- def no_change() -> 'EditEventField[T]':
29
- return EditEventField(changed=False, value=None)
34
+ @classmethod
35
+ def no_change(cls) -> typing.Self:
36
+ return cls(changed=False, value=None)
30
37
 
31
- @staticmethod
32
- def change(value: T) -> 'EditEventField[T]':
33
- return EditEventField(changed=True, value=value)
38
+ @classmethod
39
+ def change(cls, value: T) -> typing.Self:
40
+ return cls(changed=True, value=value)
34
41
 
35
42
 
36
43
  class BaseEventContent(BaseModel):
@@ -124,16 +131,14 @@ class AddFileQuestionEventContent(_AddQuestionEventContent):
124
131
 
125
132
 
126
133
  AddQuestionEventContent = typing.Annotated[
127
- typing.Union[
128
- AddOptionsQuestionEventContent,
129
- AddMultiChoiceQuestionEventContent,
130
- AddListQuestionEventContent,
131
- AddValueQuestionEventContent,
132
- AddIntegrationQuestionEventContent,
133
- AddItemSelectQuestionEventContent,
134
- AddFileQuestionEventContent,
135
- ],
136
- pydantic.Field(discriminator='question_type')
134
+ AddOptionsQuestionEventContent |
135
+ AddMultiChoiceQuestionEventContent |
136
+ AddListQuestionEventContent |
137
+ AddValueQuestionEventContent |
138
+ AddIntegrationQuestionEventContent |
139
+ AddItemSelectQuestionEventContent |
140
+ AddFileQuestionEventContent,
141
+ pydantic.Field(discriminator='question_type'),
137
142
  ]
138
143
 
139
144
 
@@ -187,16 +192,14 @@ class EditFileQuestionEventContent(_EditQuestionEventContent):
187
192
 
188
193
 
189
194
  EditQuestionEventContent = typing.Annotated[
190
- typing.Union[
191
- EditOptionsQuestionEventContent,
192
- EditMultiChoiceQuestionEventContent,
193
- EditListQuestionEventContent,
194
- EditValueQuestionEventContent,
195
- EditIntegrationQuestionEventContent,
196
- EditItemSelectQuestionEventContent,
197
- EditFileQuestionEventContent,
198
- ],
199
- pydantic.Field(discriminator='question_type')
195
+ EditOptionsQuestionEventContent |
196
+ EditMultiChoiceQuestionEventContent |
197
+ EditListQuestionEventContent |
198
+ EditValueQuestionEventContent |
199
+ EditIntegrationQuestionEventContent |
200
+ EditItemSelectQuestionEventContent |
201
+ EditFileQuestionEventContent,
202
+ pydantic.Field(discriminator='question_type'),
200
203
  ]
201
204
 
202
205
 
@@ -263,12 +266,10 @@ class AddCrossReferenceEventContent(_AddReferenceEventContent):
263
266
 
264
267
 
265
268
  AddReferenceEventContent = typing.Annotated[
266
- typing.Union[
267
- AddResourcePageReferenceEventContent,
268
- AddURLReferenceEventContent,
269
- AddCrossReferenceEventContent,
270
- ],
271
- pydantic.Field(discriminator='reference_type')
269
+ AddResourcePageReferenceEventContent |
270
+ AddURLReferenceEventContent |
271
+ AddCrossReferenceEventContent,
272
+ pydantic.Field(discriminator='reference_type'),
272
273
  ]
273
274
 
274
275
 
@@ -295,12 +296,10 @@ class EditCrossReferenceEventContent(_EditReferenceEventContent):
295
296
 
296
297
 
297
298
  EditReferenceEventContent = typing.Annotated[
298
- typing.Union[
299
- EditResourcePageReferenceEventContent,
300
- EditURLReferenceEventContent,
301
- EditCrossReferenceEventContent,
302
- ],
303
- pydantic.Field(discriminator='reference_type')
299
+ EditResourcePageReferenceEventContent |
300
+ EditURLReferenceEventContent |
301
+ EditCrossReferenceEventContent,
302
+ pydantic.Field(discriminator='reference_type'),
304
303
  ]
305
304
 
306
305
 
@@ -373,12 +372,10 @@ class AddWidgetIntegrationEventContent(_AddIntegrationEventContent):
373
372
 
374
373
 
375
374
  AddIntegrationEventContent = typing.Annotated[
376
- typing.Union[
377
- AddApiIntegrationEventContent,
378
- AddApiLegacyIntegrationEventContent,
379
- AddWidgetIntegrationEventContent,
380
- ],
381
- pydantic.Field(discriminator='integration_type')
375
+ AddApiIntegrationEventContent |
376
+ AddApiLegacyIntegrationEventContent |
377
+ AddWidgetIntegrationEventContent,
378
+ pydantic.Field(discriminator='integration_type'),
382
379
  ]
383
380
 
384
381
 
@@ -429,12 +426,10 @@ class EditWidgetIntegrationEventContent(_EditIntegrationEventContent):
429
426
 
430
427
 
431
428
  EditIntegrationEventContent = typing.Annotated[
432
- typing.Union[
433
- EditApiIntegrationEventContent,
434
- EditApiLegacyIntegrationEventContent,
435
- EditWidgetIntegrationEventContent,
436
- ],
437
- pydantic.Field(discriminator='integration_type')
429
+ EditApiIntegrationEventContent |
430
+ EditApiLegacyIntegrationEventContent |
431
+ EditWidgetIntegrationEventContent,
432
+ pydantic.Field(discriminator='integration_type'),
438
433
  ]
439
434
 
440
435
 
@@ -557,52 +552,50 @@ class MoveExpertEventContent(_MoveQuestionEventContent):
557
552
 
558
553
  # Event
559
554
  EventContent = typing.Annotated[
560
- typing.Union[
561
- AddKnowledgeModelEventContent,
562
- EditKnowledgeModelEventContent,
563
- AddChapterEventContent,
564
- EditChapterEventContent,
565
- DeleteChapterEventContent,
566
- AddQuestionEventContent,
567
- EditQuestionEventContent,
568
- DeleteQuestionEventContent,
569
- AddAnswerEventContent,
570
- EditAnswerEventContent,
571
- DeleteAnswerEventContent,
572
- AddChoiceEventContent,
573
- EditChoiceEventContent,
574
- DeleteChoiceEventContent,
575
- AddReferenceEventContent,
576
- EditReferenceEventContent,
577
- DeleteReferenceEventContent,
578
- AddExpertEventContent,
579
- EditExpertEventContent,
580
- DeleteExpertEventContent,
581
- AddIntegrationEventContent,
582
- EditIntegrationEventContent,
583
- DeleteIntegrationEventContent,
584
- AddTagEventContent,
585
- EditTagEventContent,
586
- DeleteTagEventContent,
587
- AddMetricEventContent,
588
- EditMetricEventContent,
589
- DeleteMetricEventContent,
590
- AddPhaseEventContent,
591
- EditPhaseEventContent,
592
- DeletePhaseEventContent,
593
- AddResourceCollectionEventContent,
594
- EditResourceCollectionEventContent,
595
- DeleteResourceCollectionEventContent,
596
- AddResourcePageEventContent,
597
- EditResourcePageEventContent,
598
- DeleteResourcePageEventContent,
599
- MoveQuestionEventContent,
600
- MoveAnswerEventContent,
601
- MoveChoiceEventContent,
602
- MoveReferenceEventContent,
603
- MoveExpertEventContent,
604
- ],
605
- pydantic.Field(discriminator='event_type')
555
+ AddKnowledgeModelEventContent |
556
+ EditKnowledgeModelEventContent |
557
+ AddChapterEventContent |
558
+ EditChapterEventContent |
559
+ DeleteChapterEventContent |
560
+ AddQuestionEventContent |
561
+ EditQuestionEventContent |
562
+ DeleteQuestionEventContent |
563
+ AddAnswerEventContent |
564
+ EditAnswerEventContent |
565
+ DeleteAnswerEventContent |
566
+ AddChoiceEventContent |
567
+ EditChoiceEventContent |
568
+ DeleteChoiceEventContent |
569
+ AddReferenceEventContent |
570
+ EditReferenceEventContent |
571
+ DeleteReferenceEventContent |
572
+ AddExpertEventContent |
573
+ EditExpertEventContent |
574
+ DeleteExpertEventContent |
575
+ AddIntegrationEventContent |
576
+ EditIntegrationEventContent |
577
+ DeleteIntegrationEventContent |
578
+ AddTagEventContent |
579
+ EditTagEventContent |
580
+ DeleteTagEventContent |
581
+ AddMetricEventContent |
582
+ EditMetricEventContent |
583
+ DeleteMetricEventContent |
584
+ AddPhaseEventContent |
585
+ EditPhaseEventContent |
586
+ DeletePhaseEventContent |
587
+ AddResourceCollectionEventContent |
588
+ EditResourceCollectionEventContent |
589
+ DeleteResourceCollectionEventContent |
590
+ AddResourcePageEventContent |
591
+ EditResourcePageEventContent |
592
+ DeleteResourcePageEventContent |
593
+ MoveQuestionEventContent |
594
+ MoveAnswerEventContent |
595
+ MoveChoiceEventContent |
596
+ MoveReferenceEventContent |
597
+ MoveExpertEventContent,
598
+ pydantic.Field(discriminator='event_type'),
606
599
  ]
607
600
 
608
601
 
@@ -3,8 +3,15 @@ from uuid import UUID
3
3
 
4
4
  import pydantic
5
5
 
6
- from .common import (BaseModel, TAnnotations, TQuestionValueType, THeaders,
7
- MetricMeasure, QuestionValidation, TypeHintExchange)
6
+ from .common import (
7
+ BaseModel,
8
+ MetricMeasure,
9
+ QuestionValidation,
10
+ TAnnotations,
11
+ THeaders,
12
+ TQuestionValueType,
13
+ TypeHintExchange,
14
+ )
8
15
 
9
16
 
10
17
  class BaseKMFlatEntity(BaseModel):
@@ -80,11 +87,9 @@ class WidgetIntegration(BaseKMFlatEntity):
80
87
 
81
88
 
82
89
  Integration = typing.Annotated[
83
- typing.Union[
84
- ApiIntegration,
85
- ApiLegacyIntegration,
86
- WidgetIntegration,
87
- ],
90
+ ApiIntegration |
91
+ ApiLegacyIntegration |
92
+ WidgetIntegration,
88
93
  pydantic.Field(discriminator='integration_type'),
89
94
  ]
90
95
 
@@ -148,15 +153,13 @@ class FileQuestion(QuestionBase):
148
153
 
149
154
 
150
155
  Question = typing.Annotated[
151
- typing.Union[
152
- OptionsQuestion,
153
- MultiChoiceQuestion,
154
- ListQuestion,
155
- ValueQuestion,
156
- IntegrationQuestion,
157
- ItemSelectQuestion,
158
- FileQuestion,
159
- ],
156
+ OptionsQuestion |
157
+ MultiChoiceQuestion |
158
+ ListQuestion |
159
+ ValueQuestion |
160
+ IntegrationQuestion |
161
+ ItemSelectQuestion |
162
+ FileQuestion,
160
163
  pydantic.Field(discriminator='question_type'),
161
164
  ]
162
165
 
@@ -179,11 +182,9 @@ class CrossReference(BaseKMFlatEntity):
179
182
 
180
183
 
181
184
  Reference = typing.Annotated[
182
- typing.Union[
183
- ResourcePageReference,
184
- URLReference,
185
- CrossReference,
186
- ],
185
+ ResourcePageReference |
186
+ URLReference |
187
+ CrossReference,
187
188
  pydantic.Field(discriminator='reference_type'),
188
189
  ]
189
190
 
@@ -2,8 +2,13 @@ from uuid import UUID
2
2
 
3
3
  import pydantic
4
4
 
5
- from .common import (BaseModel, TAnnotations, TQuestionValueType,
6
- QuestionValidation, TypeHintExchange)
5
+ from .common import (
6
+ BaseModel,
7
+ QuestionValidation,
8
+ TAnnotations,
9
+ TQuestionValueType,
10
+ TypeHintExchange,
11
+ )
7
12
 
8
13
 
9
14
  class BaseKMTreeEntity(BaseModel):
File without changes
@@ -0,0 +1,14 @@
1
+ from uuid import UUID
2
+
3
+ from ..common import BaseModel
4
+
5
+
6
+ TODO_LABEL_UUID = UUID('615b9028-5e3f-414f-b245-12d2ae2eeb20')
7
+
8
+
9
+ class UserInfo(BaseModel):
10
+ uuid: UUID
11
+ first_name: str
12
+ last_name: str
13
+ gravatar_hash: str
14
+ image_url: str | None
@@ -0,0 +1,100 @@
1
+ import typing
2
+ from uuid import UUID, uuid4
3
+
4
+ import pydantic
5
+
6
+ from ..common import BaseModel
7
+ from .common import UserInfo
8
+ from .replies import ReplyValue
9
+
10
+
11
+ class BaseProjectEvent(BaseModel):
12
+ uuid: UUID = pydantic.Field(default_factory=uuid4)
13
+ type: str
14
+
15
+
16
+ class BaseProjectPathEvent(BaseProjectEvent):
17
+ path: str
18
+
19
+ @property
20
+ def path_parts(self) -> list[str]:
21
+ return self.path.split('.') if self.path else []
22
+
23
+
24
+ class SetPhaseEvent(BaseProjectEvent):
25
+ type: typing.Literal['SetPhaseEvent'] = 'SetPhaseEvent'
26
+ phase_uuid: UUID | None
27
+
28
+
29
+ class SetReplyEvent(BaseProjectPathEvent):
30
+ type: typing.Literal['SetReplyEvent'] = 'SetReplyEvent'
31
+ value: ReplyValue
32
+
33
+
34
+ class ClearReplyEvent(BaseProjectPathEvent):
35
+ type: typing.Literal['ClearReplyEvent'] = 'ClearReplyEvent'
36
+
37
+
38
+ class SetLabelsEvent(BaseProjectPathEvent):
39
+ type: typing.Literal['SetLabelsEvent'] = 'SetLabelsEvent'
40
+ labels: list[UUID]
41
+
42
+
43
+ class AddCommentEvent(BaseProjectPathEvent):
44
+ type: typing.Literal['AddCommentEvent'] = 'AddCommentEvent'
45
+ thread_uuid: UUID
46
+ comment_uuid: UUID
47
+ text: str
48
+ private: bool = False
49
+ new_thread: bool
50
+
51
+
52
+ class EditCommentEvent(BaseProjectPathEvent):
53
+ type: typing.Literal['EditCommentEvent'] = 'EditCommentEvent'
54
+ thread_uuid: UUID
55
+ comment_uuid: UUID
56
+ text: str
57
+ private: bool = False
58
+
59
+
60
+ class DeleteCommentEvent(BaseProjectPathEvent):
61
+ type: typing.Literal['DeleteCommentEvent'] = 'DeleteCommentEvent'
62
+ thread_uuid: UUID
63
+ comment_uuid: UUID
64
+ private: bool = False
65
+
66
+
67
+ class AssignCommentThreadEvent(BaseProjectPathEvent):
68
+ type: typing.Literal['AssignCommentThreadEvent'] = 'AssignCommentThreadEvent'
69
+ thread_uuid: UUID
70
+ private: bool = False
71
+ assigned_to: UserInfo | None
72
+
73
+
74
+ class ResolveCommentThreadEvent(BaseProjectPathEvent):
75
+ type: typing.Literal['ResolveCommentThreadEvent'] = 'ResolveCommentThreadEvent'
76
+ thread_uuid: UUID
77
+ private: bool = False
78
+ comment_count: int
79
+
80
+
81
+ class ReopenCommentThreadEvent(BaseProjectPathEvent):
82
+ type: typing.Literal['ReopenCommentThreadEvent'] = 'ReopenCommentThreadEvent'
83
+ thread_uuid: UUID
84
+ private: bool = False
85
+ comment_count: int
86
+
87
+
88
+ ProjectEvent = typing.Annotated[
89
+ SetPhaseEvent |
90
+ SetReplyEvent |
91
+ ClearReplyEvent |
92
+ SetLabelsEvent |
93
+ AddCommentEvent |
94
+ EditCommentEvent |
95
+ DeleteCommentEvent |
96
+ AssignCommentThreadEvent |
97
+ ResolveCommentThreadEvent |
98
+ ReopenCommentThreadEvent,
99
+ pydantic.Field(discriminator='type'),
100
+ ]
@@ -0,0 +1,15 @@
1
+ import datetime
2
+ from uuid import UUID
3
+
4
+ from ..common import BaseModel
5
+
6
+
7
+ class ProjectFile(BaseModel):
8
+ uuid: UUID
9
+ file_name: str
10
+ content_type: str
11
+ file_size: int
12
+ project_uuid: UUID
13
+ tenant_uuid: UUID
14
+ created_by: UUID | None
15
+ created_at: datetime.datetime
@@ -0,0 +1,94 @@
1
+ import datetime
2
+ import typing
3
+ from uuid import UUID
4
+
5
+ import pydantic
6
+
7
+ from ..common import BaseModel
8
+ from .common import UserInfo
9
+
10
+
11
+ class BaseIntegrationReplyType(BaseModel):
12
+ type: str
13
+
14
+
15
+ class PlainIntegrationReplyType(BaseIntegrationReplyType):
16
+ type: typing.Literal['PlainType'] = 'PlainType'
17
+ content: str
18
+
19
+
20
+ class IntegrationLegacyReplyType(BaseIntegrationReplyType):
21
+ type: typing.Literal['LegacyType'] = 'LegacyType'
22
+ id: str | None
23
+ value: str
24
+
25
+
26
+ class IntegrationReplyType(BaseModel):
27
+ type: typing.Literal['IntegrationType'] = 'IntegrationType'
28
+ value: str
29
+ raw: pydantic.Json[dict[str, typing.Any]]
30
+
31
+
32
+ IntegrationReply = typing.Annotated[
33
+ PlainIntegrationReplyType |
34
+ IntegrationLegacyReplyType |
35
+ IntegrationReplyType,
36
+ pydantic.Field(discriminator='type'),
37
+ ]
38
+
39
+
40
+ class BaseReplyValue(BaseModel):
41
+ type: str
42
+
43
+
44
+ class StringReplyValue(BaseReplyValue):
45
+ type: typing.Literal['StringReply'] = 'StringReply'
46
+ value: str
47
+
48
+
49
+ class AnswerReplyValue(BaseReplyValue):
50
+ type: typing.Literal['AnswerReply'] = 'AnswerReply'
51
+ value: UUID
52
+
53
+
54
+ class MultiChoiceReplyValue(BaseReplyValue):
55
+ type: typing.Literal['MultiChoiceReply'] = 'MultiChoiceReply'
56
+ value: list[UUID]
57
+
58
+
59
+ class ItemListReplyValue(BaseReplyValue):
60
+ type: typing.Literal['ItemListReply'] = 'ItemListReply'
61
+ value: list[str]
62
+
63
+
64
+ class IntegrationReplyValue(BaseReplyValue):
65
+ type: typing.Literal['IntegrationReply'] = 'IntegrationReply'
66
+ value: IntegrationReply
67
+
68
+
69
+ class ItemSelectionReplyValue(BaseReplyValue):
70
+ type: typing.Literal['ItemSelectReply'] = 'ItemSelectReply'
71
+ value: UUID
72
+
73
+
74
+ class FileReplyValue(BaseReplyValue):
75
+ type: typing.Literal['FileReply'] = 'FileReply'
76
+ value: UUID
77
+
78
+
79
+ ReplyValue = typing.Annotated[
80
+ StringReplyValue |
81
+ AnswerReplyValue |
82
+ MultiChoiceReplyValue |
83
+ ItemListReplyValue |
84
+ IntegrationReplyValue |
85
+ ItemSelectionReplyValue |
86
+ FileReplyValue,
87
+ pydantic.Field(discriminator='type'),
88
+ ]
89
+
90
+
91
+ class Reply(BaseModel):
92
+ value: ReplyValue
93
+ created_by: UserInfo | None
94
+ created_at: datetime.datetime
File without changes
@@ -0,0 +1,38 @@
1
+ [project]
2
+ name = "dsw-models"
3
+ version = "4.27.0"
4
+ description = "Library with DSW models and basic IO operations"
5
+ readme = "README.md"
6
+ keywords = ["dsw", "config", "yaml", "parser"]
7
+ license = { text = "Apache License 2.0" }
8
+ authors = [
9
+ { name = "Marek Suchánek", email = "marek.suchanek@ds-wizard.org" }
10
+ ]
11
+ classifiers = [
12
+ "Development Status :: 4 - Beta",
13
+ "License :: OSI Approved :: Apache Software License",
14
+ "Programming Language :: Python",
15
+ "Programming Language :: Python :: 3.12",
16
+ "Programming Language :: Python :: 3.13",
17
+ "Programming Language :: Python :: 3.14",
18
+ "Topic :: Text Processing",
19
+ "Topic :: Utilities",
20
+ ]
21
+ requires-python = ">=3.12, <4"
22
+ dependencies = [
23
+ "pydantic",
24
+ ]
25
+
26
+ [project.urls]
27
+ Homepage = "https://ds-wizard.org"
28
+ Repository = "https://github.com/ds-wizard/engine-tools"
29
+ Documentation = "https://guide.ds-wizard.org"
30
+ Issues = "https://github.com/ds-wizard/ds-wizard/issues"
31
+
32
+ [build-system]
33
+ requires = ["uv_build>=0.9.25,<0.10.0"]
34
+ build-backend = "uv_build"
35
+
36
+ [tool.uv.build-backend]
37
+ module-name = "dsw.models"
38
+ module-root = ""
dsw_models-4.26.1/LICENSE DELETED
@@ -1,202 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright 2020 Marek Suchánek
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
@@ -1,43 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: dsw-models
3
- Version: 4.26.1
4
- Summary: Library with DSW models and basic IO operations
5
- Author-email: Marek Suchánek <marek.suchanek@ds-wizard.org>
6
- License: Apache License 2.0
7
- Project-URL: Homepage, https://ds-wizard.org
8
- Project-URL: Repository, https://github.com/ds-wizard/engine-tools
9
- Project-URL: Documentation, https://guide.ds-wizard.org
10
- Keywords: dsw,config,yaml,parser
11
- Classifier: Development Status :: 4 - Beta
12
- Classifier: License :: OSI Approved :: Apache Software License
13
- Classifier: Programming Language :: Python
14
- Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.13
16
- Classifier: Programming Language :: Python :: 3.14
17
- Classifier: Topic :: Text Processing
18
- Classifier: Topic :: Utilities
19
- Requires-Python: <4,>=3.12
20
- Description-Content-Type: text/markdown
21
- License-File: LICENSE
22
- Requires-Dist: pydantic
23
- Dynamic: license-file
24
-
25
- # Data Stewardship Wizard: Models
26
-
27
- [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/ds-wizard/engine-tools)](https://github.com/ds-wizard/engine-tools/releases)
28
- [![PyPI](https://img.shields.io/pypi/v/dsw-config)](https://pypi.org/project/dsw-config/)
29
- [![LICENSE](https://img.shields.io/github/license/ds-wizard/engine-tools)](LICENSE)
30
- [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4975/badge)](https://bestpractices.coreinfrastructure.org/projects/4975)
31
- [![Python Version](https://img.shields.io/badge/Python-%E2%89%A5%203.7-blue)](https://python.org)
32
-
33
- *Library with DSW models and relevant transformations*
34
-
35
- ## Usage
36
-
37
- Currently, this library is intended for internal use of DSW tooling only.
38
- Enhancements for use in custom scripts are planned for future development.
39
-
40
- ## License
41
-
42
- This project is licensed under the Apache License v2.0 - see the
43
- [LICENSE](LICENSE) file for more details.
@@ -1,21 +0,0 @@
1
- LICENSE
2
- README.md
3
- pyproject.toml
4
- setup.py
5
- dsw/models/__init__.py
6
- dsw/models/build_info.py
7
- dsw/models/common.py
8
- dsw/models/document_template/__init__.py
9
- dsw/models/document_template/metadata.py
10
- dsw/models/knowledge_model/__init__.py
11
- dsw/models/knowledge_model/common.py
12
- dsw/models/knowledge_model/events.py
13
- dsw/models/knowledge_model/flat.py
14
- dsw/models/knowledge_model/package.py
15
- dsw/models/knowledge_model/tree.py
16
- dsw_models.egg-info/PKG-INFO
17
- dsw_models.egg-info/SOURCES.txt
18
- dsw_models.egg-info/dependency_links.txt
19
- dsw_models.egg-info/not-zip-safe
20
- dsw_models.egg-info/requires.txt
21
- dsw_models.egg-info/top_level.txt
@@ -1 +0,0 @@
1
- pydantic
@@ -1 +0,0 @@
1
- dsw
@@ -1,42 +0,0 @@
1
- [build-system]
2
- requires = ['setuptools']
3
- build-backend = 'setuptools.build_meta'
4
-
5
- [project]
6
- name = 'dsw-models'
7
- version = "4.26.1"
8
- description = 'Library with DSW models and basic IO operations'
9
- readme = 'README.md'
10
- keywords = ['dsw', 'config', 'yaml', 'parser']
11
- license = { text = 'Apache License 2.0' }
12
- authors = [
13
- { name = 'Marek Suchánek', email = 'marek.suchanek@ds-wizard.org' }
14
- ]
15
- classifiers = [
16
- 'Development Status :: 4 - Beta',
17
- 'License :: OSI Approved :: Apache Software License',
18
- 'Programming Language :: Python',
19
- 'Programming Language :: Python :: 3.12',
20
- 'Programming Language :: Python :: 3.13',
21
- 'Programming Language :: Python :: 3.14',
22
- 'Topic :: Text Processing',
23
- 'Topic :: Utilities',
24
- ]
25
- requires-python = '>=3.12, <4'
26
- dependencies = [
27
- 'pydantic',
28
- ]
29
-
30
- [project.urls]
31
- Homepage = 'https://ds-wizard.org'
32
- Repository = 'https://github.com/ds-wizard/engine-tools'
33
- Documentation = 'https://guide.ds-wizard.org'
34
-
35
- [tool.setuptools]
36
- zip-safe = false
37
-
38
- [tool.setuptools.packages.find]
39
- include = ['dsw*']
40
-
41
- [tool.distutils.bdist_wheel]
42
- universal = true
@@ -1,4 +0,0 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
@@ -1,3 +0,0 @@
1
- import setuptools
2
-
3
- setuptools.setup()
File without changes