ositah 24.9.dev8__tar.gz → 24.12__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.
Potentially problematic release.
This version of ositah might be problematic. Click here for more details.
- {ositah-24.9.dev8/ositah.egg-info → ositah-24.12}/PKG-INFO +1 -1
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/export.py +12 -8
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/projects.py +3 -0
- {ositah-24.9.dev8 → ositah-24.12/ositah.egg-info}/PKG-INFO +1 -1
- {ositah-24.9.dev8 → ositah-24.12}/pyproject.toml +1 -1
- {ositah-24.9.dev8 → ositah-24.12}/.gitignore +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/.gitlab-ci.yml +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/LICENSE +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/README.md +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/docker/Dockerfile +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/docker/docker-compose.yml +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/docker/pyproject-poetry.toml +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/gunicorn.config/README.md +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/gunicorn.config/gunicorn.ositah +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/gunicorn.config/gunicorn@.service +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/gunicorn.config/ositah.conf.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/noxfile.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/__init__.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/app.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/__init__.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/analysis.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/configuration/__init__.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/configuration/callbacks.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/configuration/main.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/configuration/parameters.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/configuration/tools.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/validation/__init__.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/validation/callbacks.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/validation/main.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/validation/parameters.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/validation/tables.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/apps/validation/tools.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/assets/arrow_down_up.svg +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/assets/ositah.css +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/assets/sort_ascending.svg +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/assets/sort_descending.svg +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/assets/sorttable.js +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/main.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/ositah.example.cfg +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/static/style.css +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/templates/base.html +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/templates/bootstrap_login.html +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/templates/login_form.html +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/__init__.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/agents.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/authentication.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/cache.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/core.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/exceptions.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/hito_db.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/hito_db_model.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/menus.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/period.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/teams.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah/utils/utils.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah.egg-info/SOURCES.txt +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah.egg-info/dependency_links.txt +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah.egg-info/entry_points.txt +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah.egg-info/requires.txt +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/ositah.egg-info/top_level.txt +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/setup.cfg +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/setup.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/README.md +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/accordion.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/authentication.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/checkbox.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/checklist.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/file-selector.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/file-upload.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/long_running_callback.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/pandas_split.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/pandas_split_bug_report.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/pattern-matching-callback.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/progess_bar.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/reset_table_checkboxes.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/sortable_table.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/sqlalchemy_test.py +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/templates/base.html +0 -0
- {ositah-24.9.dev8 → ositah-24.12}/test-dash/templates/login_form.html +0 -0
|
@@ -261,7 +261,7 @@ def nsip_export_table(team, team_selection_date, period_date: str, declarations_
|
|
|
261
261
|
declaration_list.drop(columns="_merge", inplace=True)
|
|
262
262
|
|
|
263
263
|
nsip_declarations = get_nsip_declarations(start_date, team)
|
|
264
|
-
if nsip_declarations
|
|
264
|
+
if nsip_declarations.empty:
|
|
265
265
|
# nsip_missing is True if the OSITAH declaration has no matching declaration in NSIP
|
|
266
266
|
declaration_list["nsip_missing"] = True
|
|
267
267
|
# time_unit_mismatch is True only if there is a matching declaration in NSIP and time
|
|
@@ -282,6 +282,16 @@ def nsip_export_table(team, team_selection_date, period_date: str, declarations_
|
|
|
282
282
|
declaration_list["nsip_reference_id"] = declaration_list["nsip_reference_id"].astype(
|
|
283
283
|
int
|
|
284
284
|
)
|
|
285
|
+
# In case nsip_declarations contains only references (no project), create the
|
|
286
|
+
# project.name column required later as it is used both for references and projects.
|
|
287
|
+
# Also copy reference.name into project.name if it is a reference.
|
|
288
|
+
if "project.name" not in nsip_declarations:
|
|
289
|
+
nsip_declarations["project.name"] = np.NaN
|
|
290
|
+
nsip_declarations.loc[
|
|
291
|
+
nsip_declarations["project.name"].isna(),
|
|
292
|
+
"nsip_project",
|
|
293
|
+
] = nsip_declarations["reference.name"]
|
|
294
|
+
# Merge OSITAH declarations with those possibly present in NSIP
|
|
285
295
|
declaration_list = declaration_list.merge(
|
|
286
296
|
nsip_declarations,
|
|
287
297
|
how="outer",
|
|
@@ -353,7 +363,7 @@ def nsip_export_table(team, team_selection_date, period_date: str, declarations_
|
|
|
353
363
|
)
|
|
354
364
|
# nsip_missing is True if the OSITAH declaration has no matching declaration in NSIP
|
|
355
365
|
declaration_list["nsip_missing"] = declaration_list["_merge"] == "left_only"
|
|
356
|
-
# ositah_missing is True if a
|
|
366
|
+
# ositah_missing is True if a declaration is found in NSIP without a matching
|
|
357
367
|
# declaration in OSITAH
|
|
358
368
|
declaration_list["ositah_missing"] = declaration_list["_merge"] == "right_only"
|
|
359
369
|
for ositah_column, nsip_column in {
|
|
@@ -368,12 +378,6 @@ def nsip_export_table(team, team_selection_date, period_date: str, declarations_
|
|
|
368
378
|
declaration_list.loc[declaration_list["ositah_missing"], ositah_column] = (
|
|
369
379
|
declaration_list[nsip_column]
|
|
370
380
|
)
|
|
371
|
-
# Fix nsip_project if it was set to the project name when the activity is a reference
|
|
372
|
-
declaration_list.loc[
|
|
373
|
-
declaration_list["nsip_project"].isna()
|
|
374
|
-
& (declaration_list["nsip_reference_id"] != 0),
|
|
375
|
-
"nsip_project",
|
|
376
|
-
] = declaration_list["reference.name"]
|
|
377
381
|
declaration_list.loc[
|
|
378
382
|
declaration_list["nsip_agent_missing"].isna(), "nsip_agent_missing"
|
|
379
383
|
] = False
|
|
@@ -734,6 +734,9 @@ def get_nsip_declarations(period_date: str, team: str):
|
|
|
734
734
|
|
|
735
735
|
if global_params.nsip:
|
|
736
736
|
declarations = pd.json_normalize(global_params.nsip.get_declarations(period_date))
|
|
737
|
+
if declarations.empty:
|
|
738
|
+
return declarations
|
|
739
|
+
|
|
737
740
|
declarations.rename(columns={"id": "id_declaration"}, inplace=True)
|
|
738
741
|
# Set NaN to 0 in reference as np.NaN is a float and prevent casting to int. As it will
|
|
739
742
|
# be used in a merge better to have a 0 than a NaN.
|
|
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
|
|
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
|