ramodels 36.27.6__tar.gz → 47.6.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 (34) hide show
  1. {ramodels-36.27.6 → ramodels-47.6.0}/PKG-INFO +1 -1
  2. {ramodels-36.27.6 → ramodels-47.6.0}/pyproject.toml +1 -1
  3. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/lora/__init__.py +0 -1
  4. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/_shared.py +1 -1
  5. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/class_.py +0 -1
  6. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/__init__.py +0 -1
  7. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/organisation_unit.py +7 -3
  8. {ramodels-36.27.6 → ramodels-47.6.0}/setup.py +1 -1
  9. {ramodels-36.27.6 → ramodels-47.6.0}/README.md +0 -0
  10. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/__init__.py +0 -0
  11. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/base.py +0 -0
  12. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/exceptions.py +0 -0
  13. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/lora/_shared.py +0 -0
  14. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/lora/facet.py +0 -0
  15. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/lora/itsystem.py +1 -1
  16. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/lora/klasse.py +0 -0
  17. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/lora/organisation.py +0 -0
  18. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/__init__.py +0 -0
  19. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/detail.py +0 -0
  20. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/_shared.py +0 -0
  21. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/address.py +0 -0
  22. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/association.py +0 -0
  23. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/engagement.py +0 -0
  24. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/it_system.py +0 -0
  25. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/kle.py +0 -0
  26. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/leave.py +0 -0
  27. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/manager.py +0 -0
  28. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/owner.py +0 -0
  29. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/related_unit.py +0 -0
  30. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/details/role.py +0 -0
  31. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/employee.py +3 -3
  32. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/facet.py +0 -0
  33. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/mo/organisation.py +0 -0
  34. {ramodels-36.27.6 → ramodels-47.6.0}/ramodels/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ramodels
3
- Version: 36.27.6
3
+ Version: 47.6.0
4
4
  Summary: Pydantic data models for OS2mo
5
5
  Home-page: https://magenta.dk/
6
6
  License: MPL-2.0
@@ -2,7 +2,7 @@
2
2
  # SPDX-License-Identifier: MPL-2.0
3
3
  [tool.poetry]
4
4
  name = "ramodels"
5
- version = "36.27.6"
5
+ version = "47.6.0"
6
6
  description = "Pydantic data models for OS2mo"
7
7
  authors = ["Magenta <info@magenta.dk>"]
8
8
  license = "MPL-2.0"
@@ -9,7 +9,6 @@ from .klasse import KlasseRead
9
9
  from .organisation import Organisation
10
10
  from .organisation import OrganisationRead
11
11
 
12
-
13
12
  __all__ = [
14
13
  "LoraBase",
15
14
  "Facet",
@@ -237,7 +237,7 @@ class Validity(OpenValidity):
237
237
  class TerminateValidity(OpenValidity):
238
238
  to_date: datetime = Field(
239
239
  alias="to",
240
- description="When the validity should end " "- required when terminating",
240
+ description="When the validity should end - required when terminating",
241
241
  )
242
242
 
243
243
 
@@ -31,7 +31,6 @@ class ClassRead(ClassBase):
31
31
 
32
32
 
33
33
  class ClassWrite(ClassBase):
34
-
35
34
  """A MO Class write object."""
36
35
 
37
36
  name: str = Field(description="Mo-class name.")
@@ -44,7 +44,6 @@ from .role import RoleDetail
44
44
  from .role import RoleRead
45
45
  from .role import RoleWrite
46
46
 
47
-
48
47
  Details = (
49
48
  AssociationDetail
50
49
  | EngagementDetail
@@ -86,7 +86,7 @@ class OrganisationUnit(MOBase):
86
86
  org_unit_type: OrgUnitType = Field(
87
87
  description="Reference to the organisation unit type."
88
88
  )
89
- org_unit_level: OrgUnitLevel = Field(
89
+ org_unit_level: OrgUnitLevel | None = Field(
90
90
  description="Reference to the organisation unit level type."
91
91
  )
92
92
  details: list[OrgUnitDetails] | None = Field(
@@ -103,10 +103,10 @@ class OrganisationUnit(MOBase):
103
103
  user_key: str,
104
104
  name: str,
105
105
  org_unit_type_uuid: UUID,
106
- org_unit_level_uuid: UUID,
107
106
  from_date: str,
108
107
  uuid: UUID | None = None,
109
108
  parent_uuid: UUID | None = None,
109
+ org_unit_level_uuid: UUID | None = None,
110
110
  org_unit_hierarchy_uuid: UUID | None = None,
111
111
  to_date: str | None = None,
112
112
  ) -> "OrganisationUnit":
@@ -117,6 +117,10 @@ class OrganisationUnit(MOBase):
117
117
  if org_unit_hierarchy_uuid
118
118
  else None
119
119
  )
120
+ org_unit_level = (
121
+ OrgUnitLevel(uuid=org_unit_level_uuid) if org_unit_level_uuid else None
122
+ )
123
+
120
124
  validity = Validity(from_date=from_date, to_date=to_date)
121
125
 
122
126
  return cls(
@@ -127,7 +131,7 @@ class OrganisationUnit(MOBase):
127
131
  parent=parent,
128
132
  org_unit_hierarchy=org_unit_hierarchy,
129
133
  org_unit_type=OrgUnitType(uuid=org_unit_type_uuid),
130
- org_unit_level=OrgUnitLevel(uuid=org_unit_level_uuid),
134
+ org_unit_level=org_unit_level,
131
135
  )
132
136
 
133
137
 
@@ -18,7 +18,7 @@ entry_points = \
18
18
 
19
19
  setup_kwargs = {
20
20
  'name': 'ramodels',
21
- 'version': '36.27.6',
21
+ 'version': '47.6.0',
22
22
  'description': 'Pydantic data models for OS2mo',
23
23
  'long_description': '<!--\nSPDX-FileCopyrightText: Magenta ApS <https://magenta.dk>\nSPDX-License-Identifier: MPL-2.0\n-->\n\n\n# MoLoRa Data Models\n\nRAModels - MoLoRa data validation models powered by [pydantic](https://github.com/samuelcolvin/pydantic/#pydantic).\n\n## Versioning\nThis project uses [Semantic Versioning](https://semver.org/) with the following strategy:\n- MAJOR: Incompatible changes to existing data models\n- MINOR: Backwards compatible updates to existing data models OR new models added\n- PATCH: Backwards compatible bug fixes\n\n\n## Authors\n\nMagenta ApS <https://magenta.dk>\n\n## License\n- This project: [MPL-2.0](MPL-2.0.txt)\n- Dependencies:\n - pydantic: [MIT](MIT.txt)\n\nThis project uses [REUSE](https://reuse.software) for licensing. All licenses can be found in the [LICENSES folder](LICENSES/) of the project.\n\n## Development\n### Prerequisites\n\n- [Poetry](https://github.com/python-poetry/poetry)\n- [Pre-commit](https://github.com/pre-commit/pre-commit)\n\n\n### Getting Started\n\n1. Clone the repository:\n`git clone git@git.magenta.dk:rammearkitektur/ra-data-models.git`\n\n2. Install all dependencies:\n`poetry install`\n\n3. Set up pre-commit:\n`pre-commit install`\n\n\n### Running the tests\n\nYou use `poetry` and `pytest` to run the tests:\n\n`poetry run pytest`\n\n\nYou can also run specific files\n\n`poetry run pytest tests/<test_folder>/<test_file.py>`\n\nand even use filtering with `-k`\n\n`poetry run pytest -k "Manager"`\n\n\nYou can use the flags `-vx` where `v` prints the test & `x` makes the test stop if any tests fails (Verbose, X-fail)\n\n### Pre-commit usage\nPre-commit must either be used via your virtual environment or globally.\nIf you want to pre-commit globally, the following extra dependencies are needed:\n`pip install mypy pydantic`\n\n\n### Models\n\n## LoRa\n`LoRa` implements the OIO standard version 1.1. The [standard](https://digitaliser.dk/resource/1569113) with\n[specification](https://www.digitaliser.dk/resource/1569113/artefact/Specifikationafserviceinterfacefororganisation-OIO-Godkendt%5bvs.1.1%5d.pdf?artefact=true&PID=1569586)\n',
24
24
  'author': 'Magenta',
File without changes
File without changes
@@ -5,13 +5,13 @@ from uuid import UUID
5
5
  from pydantic import Field
6
6
 
7
7
  from ._shared import EffectiveTime
8
- from ._shared import get_relations
9
8
  from ._shared import ITSystemAttributes
10
9
  from ._shared import ITSystemProperties
11
10
  from ._shared import ITSystemRelations
12
11
  from ._shared import ITSystemStates
13
12
  from ._shared import ITSystemValidState
14
13
  from ._shared import LoraBase
14
+ from ._shared import get_relations
15
15
 
16
16
 
17
17
  class ITSystem(LoraBase):
@@ -9,15 +9,15 @@ from pydantic import Field
9
9
  from pydantic import root_validator
10
10
  from pydantic import validator
11
11
 
12
+ from ramodels.base import RABase
13
+ from ramodels.base import tz_isodate
14
+
12
15
  from ._shared import MOBase
13
16
  from ._shared import OpenValidity
14
17
  from ._shared import OrganisationRef
15
18
  from ._shared import validate_cpr
16
19
  from ._shared import validate_names
17
20
  from .details import EmployeeDetails
18
- from ramodels.base import RABase
19
- from ramodels.base import tz_isodate
20
-
21
21
 
22
22
  # Type aliases
23
23
  DictStrAny = dict[str, Any]
File without changes