ositah 24.12.dev1__tar.gz → 25.9.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.
Potentially problematic release.
This version of ositah might be problematic. Click here for more details.
- {ositah-24.12.dev1/ositah.egg-info → ositah-25.9.dev1}/PKG-INFO +4 -4
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/export.py +33 -14
- {ositah-24.12.dev1 → ositah-25.9.dev1/ositah.egg-info}/PKG-INFO +4 -4
- {ositah-24.12.dev1 → ositah-25.9.dev1}/pyproject.toml +2 -5
- {ositah-24.12.dev1 → ositah-25.9.dev1}/.gitignore +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/.gitlab-ci.yml +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/LICENSE +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/README.md +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/docker/Dockerfile +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/docker/docker-compose.yml +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/docker/pyproject-poetry.toml +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/gunicorn.config/README.md +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/gunicorn.config/gunicorn.ositah +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/gunicorn.config/gunicorn@.service +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/gunicorn.config/ositah.conf.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/noxfile.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/__init__.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/app.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/__init__.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/analysis.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/configuration/__init__.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/configuration/callbacks.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/configuration/main.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/configuration/parameters.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/configuration/tools.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/validation/__init__.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/validation/callbacks.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/validation/main.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/validation/parameters.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/validation/tables.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/apps/validation/tools.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/assets/arrow_down_up.svg +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/assets/ositah.css +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/assets/sort_ascending.svg +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/assets/sort_descending.svg +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/assets/sorttable.js +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/main.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/ositah.example.cfg +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/static/style.css +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/templates/base.html +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/templates/bootstrap_login.html +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/templates/login_form.html +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/__init__.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/agents.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/authentication.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/cache.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/core.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/exceptions.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/hito_db.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/hito_db_model.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/menus.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/period.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/projects.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/teams.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah/utils/utils.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah.egg-info/SOURCES.txt +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah.egg-info/dependency_links.txt +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah.egg-info/entry_points.txt +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah.egg-info/requires.txt +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/ositah.egg-info/top_level.txt +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/setup.cfg +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/setup.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/README.md +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/accordion.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/authentication.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/checkbox.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/checklist.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/file-selector.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/file-upload.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/long_running_callback.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/pandas_split.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/pandas_split_bug_report.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/pattern-matching-callback.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/progess_bar.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/reset_table_checkboxes.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/sortable_table.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/sqlalchemy_test.py +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/templates/base.html +0 -0
- {ositah-24.12.dev1 → ositah-25.9.dev1}/test-dash/templates/login_form.html +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: ositah
|
|
3
|
-
Version:
|
|
3
|
+
Version: 25.9.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
|
-
License: BSD
|
|
6
|
+
License-Expression: BSD-3-Clause
|
|
7
7
|
Project-URL: Homepage, https://gitlab.in2p3.fr/hito/ositah
|
|
8
8
|
Project-URL: Bug Tracker, https://gitlab.in2p3.fr/hito/ositah/-/issues
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
9
|
Classifier: Operating System :: OS Independent
|
|
11
10
|
Classifier: Programming Language :: Python :: 3
|
|
12
11
|
Requires-Python: >=3.9
|
|
@@ -26,6 +25,7 @@ Requires-Dist: python-ldap
|
|
|
26
25
|
Requires-Dist: pyyaml
|
|
27
26
|
Requires-Dist: simplejson
|
|
28
27
|
Requires-Dist: sqlalchemy~=2.0
|
|
28
|
+
Dynamic: license-file
|
|
29
29
|
|
|
30
30
|
# OSITAH : Outil de Suivi de Temps et d'Activités basé sur Hito
|
|
31
31
|
|
|
@@ -54,6 +54,7 @@ NSIP_EXPORT_SELECTION_STATUS_ID = "export-nsip-selection-update-status"
|
|
|
54
54
|
EXPORT_LOAD_INDICATOR_ID = "export-nsip-load-indicator"
|
|
55
55
|
EXPORT_SAVED_LOAD_INDICATOR_ID = "export-nsip-saved-load-indicator"
|
|
56
56
|
EXPORT_LOAD_TRIGGER_INTERVAL_ID = "export-nsip-load-callback-interval"
|
|
57
|
+
EXPORT_MAX_FAILDED_UPDATES = 30
|
|
57
58
|
EXPORT_PROGRESS_BAR_MAX_DURATION = 8 # seconds
|
|
58
59
|
EXPORT_SAVED_ACTIVE_TAB_ID = "export-nsip-saved-active-tab"
|
|
59
60
|
|
|
@@ -287,6 +288,8 @@ def nsip_export_table(team, team_selection_date, period_date: str, declarations_
|
|
|
287
288
|
# Also copy reference.name into project.name if it is a reference.
|
|
288
289
|
if "project.name" not in nsip_declarations:
|
|
289
290
|
nsip_declarations["project.name"] = np.NaN
|
|
291
|
+
if "reference.name" not in nsip_declarations:
|
|
292
|
+
nsip_declarations["reference.name"] = np.NaN
|
|
290
293
|
nsip_declarations.loc[
|
|
291
294
|
nsip_declarations["project.name"].isna(),
|
|
292
295
|
"nsip_project",
|
|
@@ -1015,8 +1018,8 @@ def nsip_export_selected_count(*_):
|
|
|
1015
1018
|
)
|
|
1016
1019
|
def nsip_export_button(n_clicks, sync_indicator, previous_sync_indicator):
|
|
1017
1020
|
"""
|
|
1018
|
-
Push into NSIP declarations
|
|
1019
|
-
are added/updated. This callback is entered twice: the first time it displays a
|
|
1021
|
+
Push into NSIP declarations for all the selected users. All project declarations for the user
|
|
1022
|
+
are added/updated. This callback is entered twice: the first time it displays a progress
|
|
1020
1023
|
bar and start a dcc.Interval, the second time it does the real synchronisation work.
|
|
1021
1024
|
|
|
1022
1025
|
:param n_clicks: checkbox state
|
|
@@ -1033,8 +1036,9 @@ def nsip_export_button(n_clicks, sync_indicator, previous_sync_indicator):
|
|
|
1033
1036
|
declarations = session_data.nsip_declarations
|
|
1034
1037
|
selected_declarations = declarations[declarations.selectable & declarations.selected]
|
|
1035
1038
|
failed_updates = []
|
|
1039
|
+
failed_exports = 0
|
|
1040
|
+
successful_exports = 0
|
|
1036
1041
|
|
|
1037
|
-
updated_declarations = 0
|
|
1038
1042
|
if n_clicks and n_clicks >= 1:
|
|
1039
1043
|
if sync_indicator > previous_sync_indicator:
|
|
1040
1044
|
for row in selected_declarations.itertuples(index=False):
|
|
@@ -1096,6 +1100,7 @@ def nsip_export_button(n_clicks, sync_indicator, previous_sync_indicator):
|
|
|
1096
1100
|
),
|
|
1097
1101
|
flush=True,
|
|
1098
1102
|
)
|
|
1103
|
+
successful_exports += 1
|
|
1099
1104
|
|
|
1100
1105
|
else:
|
|
1101
1106
|
if http_status:
|
|
@@ -1111,12 +1116,17 @@ def nsip_export_button(n_clicks, sync_indicator, previous_sync_indicator):
|
|
|
1111
1116
|
),
|
|
1112
1117
|
flush=True,
|
|
1113
1118
|
)
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1119
|
+
failed_exports += 1
|
|
1120
|
+
# Limit the number of explicit failed update displayed to avoid a too long
|
|
1121
|
+
# message
|
|
1122
|
+
if failed_exports < EXPORT_MAX_FAILDED_UPDATES:
|
|
1123
|
+
failed_updates.append(
|
|
1124
|
+
f"{row.email_auth}/{'projet' if project_type else 'reference'}"
|
|
1125
|
+
f"/{int(activity_id)}"
|
|
1126
|
+
)
|
|
1127
|
+
elif failed_exports == EXPORT_MAX_FAILDED_UPDATES:
|
|
1128
|
+
failed_updates.append("...")
|
|
1118
1129
|
|
|
1119
|
-
updated_declarations += 1
|
|
1120
1130
|
previous_sync_indicator += 1
|
|
1121
1131
|
else:
|
|
1122
1132
|
component = html.Div(
|
|
@@ -1137,17 +1147,26 @@ def nsip_export_button(n_clicks, sync_indicator, previous_sync_indicator):
|
|
|
1137
1147
|
else:
|
|
1138
1148
|
raise PreventUpdate
|
|
1139
1149
|
|
|
1140
|
-
if
|
|
1150
|
+
if failed_exports == 0:
|
|
1141
1151
|
update_status_msg = (
|
|
1142
|
-
f"Toutes les déclarations sélectionnées ({
|
|
1152
|
+
f"Toutes les déclarations sélectionnées ({successful_exports})"
|
|
1143
1153
|
f" ont été enregistrées dans NSIP"
|
|
1144
1154
|
)
|
|
1145
1155
|
color = "success"
|
|
1146
1156
|
else:
|
|
1147
|
-
update_status_msg =
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1157
|
+
update_status_msg = [
|
|
1158
|
+
(
|
|
1159
|
+
f"{failed_exports} export{' a' if failed_exports == 1 else 's ont'} échoué :"
|
|
1160
|
+
f" {', '.join(failed_updates)}"
|
|
1161
|
+
),
|
|
1162
|
+
html.Br(),
|
|
1163
|
+
(
|
|
1164
|
+
f"{successful_exports} déclaration"
|
|
1165
|
+
f"{' a' if successful_exports == 1 else 's ont'}"
|
|
1166
|
+
f" été synchronisée{'' if successful_exports == 1 else 's'}"
|
|
1167
|
+
f" avec succès"
|
|
1168
|
+
),
|
|
1169
|
+
]
|
|
1151
1170
|
color = "warning"
|
|
1152
1171
|
return update_status_msg, True, color, previous_sync_indicator
|
|
1153
1172
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: ositah
|
|
3
|
-
Version:
|
|
3
|
+
Version: 25.9.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
|
-
License: BSD
|
|
6
|
+
License-Expression: BSD-3-Clause
|
|
7
7
|
Project-URL: Homepage, https://gitlab.in2p3.fr/hito/ositah
|
|
8
8
|
Project-URL: Bug Tracker, https://gitlab.in2p3.fr/hito/ositah/-/issues
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
9
|
Classifier: Operating System :: OS Independent
|
|
11
10
|
Classifier: Programming Language :: Python :: 3
|
|
12
11
|
Requires-Python: >=3.9
|
|
@@ -26,6 +25,7 @@ Requires-Dist: python-ldap
|
|
|
26
25
|
Requires-Dist: pyyaml
|
|
27
26
|
Requires-Dist: simplejson
|
|
28
27
|
Requires-Dist: sqlalchemy~=2.0
|
|
28
|
+
Dynamic: license-file
|
|
29
29
|
|
|
30
30
|
# OSITAH : Outil de Suivi de Temps et d'Activités basé sur Hito
|
|
31
31
|
|
|
@@ -4,12 +4,11 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ositah"
|
|
7
|
-
version = "
|
|
7
|
+
version = "25.9.dev1"
|
|
8
8
|
description = "Outils de Suivi d'Activités basé sur Hito"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
classifiers = [
|
|
12
|
-
"License :: OSI Approved :: MIT License",
|
|
13
12
|
"Operating System :: OS Independent",
|
|
14
13
|
"Programming Language :: Python :: 3",
|
|
15
14
|
]
|
|
@@ -30,9 +29,7 @@ dependencies = [
|
|
|
30
29
|
"sqlalchemy~=2.0",
|
|
31
30
|
]
|
|
32
31
|
dynamic = []
|
|
33
|
-
|
|
34
|
-
[project.license]
|
|
35
|
-
text = "BSD 3-Clause License"
|
|
32
|
+
license = "BSD-3-Clause"
|
|
36
33
|
|
|
37
34
|
[[project.authors]]
|
|
38
35
|
name = "Michel Jouvin"
|
|
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
|
|
File without changes
|