ositah 24.9.dev8__tar.gz → 24.12.dev1__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 (79) hide show
  1. {ositah-24.9.dev8/ositah.egg-info → ositah-24.12.dev1}/PKG-INFO +1 -1
  2. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/export.py +12 -8
  3. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/projects.py +3 -0
  4. {ositah-24.9.dev8 → ositah-24.12.dev1/ositah.egg-info}/PKG-INFO +1 -1
  5. {ositah-24.9.dev8 → ositah-24.12.dev1}/pyproject.toml +1 -1
  6. {ositah-24.9.dev8 → ositah-24.12.dev1}/.gitignore +0 -0
  7. {ositah-24.9.dev8 → ositah-24.12.dev1}/.gitlab-ci.yml +0 -0
  8. {ositah-24.9.dev8 → ositah-24.12.dev1}/LICENSE +0 -0
  9. {ositah-24.9.dev8 → ositah-24.12.dev1}/README.md +0 -0
  10. {ositah-24.9.dev8 → ositah-24.12.dev1}/docker/Dockerfile +0 -0
  11. {ositah-24.9.dev8 → ositah-24.12.dev1}/docker/docker-compose.yml +0 -0
  12. {ositah-24.9.dev8 → ositah-24.12.dev1}/docker/pyproject-poetry.toml +0 -0
  13. {ositah-24.9.dev8 → ositah-24.12.dev1}/gunicorn.config/README.md +0 -0
  14. {ositah-24.9.dev8 → ositah-24.12.dev1}/gunicorn.config/gunicorn.ositah +0 -0
  15. {ositah-24.9.dev8 → ositah-24.12.dev1}/gunicorn.config/gunicorn@.service +0 -0
  16. {ositah-24.9.dev8 → ositah-24.12.dev1}/gunicorn.config/ositah.conf.py +0 -0
  17. {ositah-24.9.dev8 → ositah-24.12.dev1}/noxfile.py +0 -0
  18. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/__init__.py +0 -0
  19. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/app.py +0 -0
  20. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/__init__.py +0 -0
  21. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/analysis.py +0 -0
  22. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/configuration/__init__.py +0 -0
  23. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/configuration/callbacks.py +0 -0
  24. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/configuration/main.py +0 -0
  25. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/configuration/parameters.py +0 -0
  26. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/configuration/tools.py +0 -0
  27. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/validation/__init__.py +0 -0
  28. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/validation/callbacks.py +0 -0
  29. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/validation/main.py +0 -0
  30. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/validation/parameters.py +0 -0
  31. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/validation/tables.py +0 -0
  32. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/apps/validation/tools.py +0 -0
  33. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/assets/arrow_down_up.svg +0 -0
  34. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/assets/ositah.css +0 -0
  35. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/assets/sort_ascending.svg +0 -0
  36. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/assets/sort_descending.svg +0 -0
  37. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/assets/sorttable.js +0 -0
  38. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/main.py +0 -0
  39. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/ositah.example.cfg +0 -0
  40. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/static/style.css +0 -0
  41. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/templates/base.html +0 -0
  42. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/templates/bootstrap_login.html +0 -0
  43. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/templates/login_form.html +0 -0
  44. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/__init__.py +0 -0
  45. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/agents.py +0 -0
  46. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/authentication.py +0 -0
  47. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/cache.py +0 -0
  48. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/core.py +0 -0
  49. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/exceptions.py +0 -0
  50. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/hito_db.py +0 -0
  51. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/hito_db_model.py +0 -0
  52. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/menus.py +0 -0
  53. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/period.py +0 -0
  54. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/teams.py +0 -0
  55. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah/utils/utils.py +0 -0
  56. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah.egg-info/SOURCES.txt +0 -0
  57. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah.egg-info/dependency_links.txt +0 -0
  58. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah.egg-info/entry_points.txt +0 -0
  59. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah.egg-info/requires.txt +0 -0
  60. {ositah-24.9.dev8 → ositah-24.12.dev1}/ositah.egg-info/top_level.txt +0 -0
  61. {ositah-24.9.dev8 → ositah-24.12.dev1}/setup.cfg +0 -0
  62. {ositah-24.9.dev8 → ositah-24.12.dev1}/setup.py +0 -0
  63. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/README.md +0 -0
  64. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/accordion.py +0 -0
  65. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/authentication.py +0 -0
  66. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/checkbox.py +0 -0
  67. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/checklist.py +0 -0
  68. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/file-selector.py +0 -0
  69. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/file-upload.py +0 -0
  70. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/long_running_callback.py +0 -0
  71. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/pandas_split.py +0 -0
  72. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/pandas_split_bug_report.py +0 -0
  73. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/pattern-matching-callback.py +0 -0
  74. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/progess_bar.py +0 -0
  75. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/reset_table_checkboxes.py +0 -0
  76. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/sortable_table.py +0 -0
  77. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/sqlalchemy_test.py +0 -0
  78. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/templates/base.html +0 -0
  79. {ositah-24.9.dev8 → ositah-24.12.dev1}/test-dash/templates/login_form.html +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ositah
3
- Version: 24.9.dev8
3
+ Version: 24.12.dev1
4
4
  Summary: Outils de Suivi d'Activités basé sur Hito
5
5
  Author-email: Michel Jouvin <michel.jouvin@ijclab.in2p3.fr>
6
6
  License: BSD 3-Clause License
@@ -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 is None or len(nsip_declarations) == 0:
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 declaratipn is found in NSIP without a matching
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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ositah
3
- Version: 24.9.dev8
3
+ Version: 24.12.dev1
4
4
  Summary: Outils de Suivi d'Activités basé sur Hito
5
5
  Author-email: Michel Jouvin <michel.jouvin@ijclab.in2p3.fr>
6
6
  License: BSD 3-Clause License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ositah"
7
- version = "24.9.dev8"
7
+ version = "24.12.dev1"
8
8
  description = "Outils de Suivi d'Activités basé sur Hito"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
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