dipex 7.2.0__tar.gz → 7.2.2__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.
- {dipex-7.2.0 → dipex-7.2.2}/PKG-INFO +1 -1
- {dipex-7.2.0 → dipex-7.2.2}/exporters/sql_export/gql_lora_cache_async.py +3 -1
- {dipex-7.2.0 → dipex-7.2.2}/exporters/sql_export/main.py +1 -1
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/ad_writer.py +3 -1
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/mo_to_ad_sync.py +1 -1
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/clear_and_import_opus.py +5 -1
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/opus_diff_import.py +1 -1
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/opus_helpers.py +2 -2
- {dipex-7.2.0 → dipex-7.2.2}/pyproject.toml +3 -3
- {dipex-7.2.0 → dipex-7.2.2}/exporters/sql_export/__init__.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/exporters/sql_export/config.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/exporters/sql_export/lc_for_jobs_db.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/exporters/sql_export/lora_cache.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/exporters/sql_export/sql_export.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/exporters/sql_export/sql_table_defs.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/exporters/sql_export/sql_url.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/exporters/sql_export/trigger.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/exporters/utils/priority_by_class.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/__init__.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/__init__.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/ad_common.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/ad_exceptions.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/ad_jinja_filters.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/ad_life_cycle.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/ad_logger.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/ad_reader.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/ad_sync.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/ad_template_engine.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/ad_templates.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/payloads.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/read_ad_conf_settings.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/sync_mo_uuid_to_ad.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/test_connectivity.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/__init__.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/mocks.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/name_simulator.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_ad_common.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_ad_jinja_filters.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_ad_life_cycle.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_ad_logger.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_ad_reader.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_ad_sync.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_ad_writer.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_dot_mapping.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_first_included.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_location_element.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_mo_data_source.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_mo_to_ad_sync.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_morestsource.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_read_ad_conf_settings.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_recursive_dict_update.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_sync_mo_uuid_to_ad.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_usernames.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/tests/test_utils.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/user_names.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/username_rules/method_2.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/ad_integration/utils.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/dawa_helper.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/opus_check_dar_adresses.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/opus_exceptions.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/opus_file_reader.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/opus_reimport_one.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/org_tree_print/main.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/payloads.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/tests/test_opus_diff_import.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/tests/test_opus_file_reader.py +0 -0
- {dipex-7.2.0 → dipex-7.2.2}/integrations/opus/tests/test_opus_helpers.py +0 -0
|
@@ -69,8 +69,10 @@ def convert_dict(
|
|
|
69
69
|
d["from_date"] = str(datetime.datetime(1, 1, 1).date())
|
|
70
70
|
if "to" in validity:
|
|
71
71
|
if validity["to"]:
|
|
72
|
+
# Subtract a day to stay consistent with earlier versions of Graphql.
|
|
72
73
|
d["to_date"] = str(
|
|
73
74
|
datetime.datetime.fromisoformat(validity["to"]).date()
|
|
75
|
+
- datetime.timedelta(days=1)
|
|
74
76
|
)
|
|
75
77
|
else:
|
|
76
78
|
d["to_date"] = "9999-12-31"
|
|
@@ -135,7 +137,7 @@ class GQLLoraCache:
|
|
|
135
137
|
|
|
136
138
|
def make_client(self) -> GraphQLClient:
|
|
137
139
|
return GraphQLClient(
|
|
138
|
-
url=f"{self.settings.mora_base}/graphql/
|
|
140
|
+
url=f"{self.settings.mora_base}/graphql/v30",
|
|
139
141
|
client_id=self.settings.client_id,
|
|
140
142
|
client_secret=self.settings.client_secret, # type: ignore
|
|
141
143
|
auth_realm=self.settings.auth_realm,
|
|
@@ -343,7 +343,7 @@ def create_app(**kwargs) -> FastAPI:
|
|
|
343
343
|
fastramqpi = FastRAMQPI(
|
|
344
344
|
application_name="sql-export",
|
|
345
345
|
settings=settings.fastramqpi,
|
|
346
|
-
graphql_version=
|
|
346
|
+
graphql_version=30,
|
|
347
347
|
graphql_events=graphql_events,
|
|
348
348
|
)
|
|
349
349
|
if settings.eventdriven:
|
|
@@ -678,7 +678,9 @@ class ADWriter(AD):
|
|
|
678
678
|
}
|
|
679
679
|
return addresses
|
|
680
680
|
|
|
681
|
-
def read_ad_information_from_mo(
|
|
681
|
+
def read_ad_information_from_mo(
|
|
682
|
+
self, uuid, read_manager=True, ad_dump=None
|
|
683
|
+
) -> LazyDict | None:
|
|
682
684
|
"""
|
|
683
685
|
Retrive the necessary information from MO to contruct a new AD user.
|
|
684
686
|
The final information object should of this type, notice that end-date
|
|
@@ -167,7 +167,7 @@ def run_preview_command_for_uuid(
|
|
|
167
167
|
# Retrieve AD user data for manager, if available
|
|
168
168
|
(
|
|
169
169
|
reader.read_user(cpr=mo_values["manager_cpr"])
|
|
170
|
-
if mo_values.get("manager_cpr")
|
|
170
|
+
if mo_values is not None and mo_values.get("manager_cpr")
|
|
171
171
|
else {}
|
|
172
172
|
),
|
|
173
173
|
]
|
|
@@ -48,7 +48,9 @@ def prepare_re_import(
|
|
|
48
48
|
raise Exception(
|
|
49
49
|
"There are duplicate classes, remove them with tools/data_fixers/remove_duplicate_classes.py --delete"
|
|
50
50
|
)
|
|
51
|
-
|
|
51
|
+
# FIXME: this is clearly a bug, this function in never awaited, but I'm
|
|
52
|
+
# too scared to touch anything without tests...
|
|
53
|
+
subtreedeleter_helper( # type: ignore
|
|
52
54
|
opus_uuid,
|
|
53
55
|
delete_functions=True,
|
|
54
56
|
keep_functions=["KLE", "Relateret Enhed"],
|
|
@@ -80,6 +82,8 @@ async def import_opus(
|
|
|
80
82
|
all_export_dates = prepend(None, export_dates)
|
|
81
83
|
date_pairs = pairwise(all_export_dates)
|
|
82
84
|
for date1, date2 in date_pairs:
|
|
85
|
+
# only date1 can be None, because date2 starts from the second element
|
|
86
|
+
assert date2 is not None
|
|
83
87
|
await import_one(
|
|
84
88
|
ad_reader,
|
|
85
89
|
date2,
|
|
@@ -173,11 +173,11 @@ def find_changes(
|
|
|
173
173
|
diff = DeepDiff(
|
|
174
174
|
obj,
|
|
175
175
|
old_obj,
|
|
176
|
-
exclude_paths=
|
|
176
|
+
exclude_paths=[
|
|
177
177
|
"root['@lastChanged']",
|
|
178
178
|
"root['numerator']",
|
|
179
179
|
"root['denominator']",
|
|
180
|
-
|
|
180
|
+
],
|
|
181
181
|
)
|
|
182
182
|
# Changed object
|
|
183
183
|
if diff:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "DIPEX"
|
|
3
|
-
version = "7.2.
|
|
3
|
+
version = "7.2.2"
|
|
4
4
|
authors = ["Magenta ApS <info@magenta.dk>"]
|
|
5
5
|
description = "OS2mo-data-import-and-export"
|
|
6
6
|
license = "MPL-2.0"
|
|
@@ -75,8 +75,8 @@ fastramqpi = "^17"
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
[tool.poetry.group.pre-commit.dependencies]
|
|
78
|
-
ruff = "^0.9"
|
|
79
|
-
mypy = "^1"
|
|
78
|
+
ruff = "^0.9.10"
|
|
79
|
+
mypy = "^1.15.0"
|
|
80
80
|
types-python-dateutil = "^2"
|
|
81
81
|
pre-commit = "^3"
|
|
82
82
|
types-requests = "^2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|