ositah 24.9.dev5__tar.gz → 24.9.dev7__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.

Files changed (79) hide show
  1. {ositah-24.9.dev5/ositah.egg-info → ositah-24.9.dev7}/PKG-INFO +1 -1
  2. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/analysis.py +1 -1
  3. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/configuration/callbacks.py +1 -2
  4. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/configuration/main.py +19 -19
  5. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/export.py +1 -1
  6. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/validation/main.py +1 -1
  7. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/main.py +5 -5
  8. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/agents.py +7 -5
  9. {ositah-24.9.dev5 → ositah-24.9.dev7/ositah.egg-info}/PKG-INFO +1 -1
  10. {ositah-24.9.dev5 → ositah-24.9.dev7}/pyproject.toml +1 -1
  11. {ositah-24.9.dev5 → ositah-24.9.dev7}/.gitignore +0 -0
  12. {ositah-24.9.dev5 → ositah-24.9.dev7}/.gitlab-ci.yml +0 -0
  13. {ositah-24.9.dev5 → ositah-24.9.dev7}/LICENSE +0 -0
  14. {ositah-24.9.dev5 → ositah-24.9.dev7}/README.md +0 -0
  15. {ositah-24.9.dev5 → ositah-24.9.dev7}/docker/Dockerfile +0 -0
  16. {ositah-24.9.dev5 → ositah-24.9.dev7}/docker/docker-compose.yml +0 -0
  17. {ositah-24.9.dev5 → ositah-24.9.dev7}/docker/pyproject-poetry.toml +0 -0
  18. {ositah-24.9.dev5 → ositah-24.9.dev7}/gunicorn.config/README.md +0 -0
  19. {ositah-24.9.dev5 → ositah-24.9.dev7}/gunicorn.config/gunicorn.ositah +0 -0
  20. {ositah-24.9.dev5 → ositah-24.9.dev7}/gunicorn.config/gunicorn@.service +0 -0
  21. {ositah-24.9.dev5 → ositah-24.9.dev7}/gunicorn.config/ositah.conf.py +0 -0
  22. {ositah-24.9.dev5 → ositah-24.9.dev7}/noxfile.py +0 -0
  23. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/__init__.py +0 -0
  24. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/app.py +0 -0
  25. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/__init__.py +0 -0
  26. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/configuration/__init__.py +0 -0
  27. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/configuration/parameters.py +0 -0
  28. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/configuration/tools.py +0 -0
  29. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/validation/__init__.py +0 -0
  30. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/validation/callbacks.py +0 -0
  31. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/validation/parameters.py +0 -0
  32. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/validation/tables.py +0 -0
  33. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/apps/validation/tools.py +0 -0
  34. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/assets/arrow_down_up.svg +0 -0
  35. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/assets/ositah.css +0 -0
  36. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/assets/sort_ascending.svg +0 -0
  37. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/assets/sort_descending.svg +0 -0
  38. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/assets/sorttable.js +0 -0
  39. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/ositah.example.cfg +0 -0
  40. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/static/style.css +0 -0
  41. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/templates/base.html +0 -0
  42. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/templates/bootstrap_login.html +0 -0
  43. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/templates/login_form.html +0 -0
  44. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/__init__.py +0 -0
  45. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/authentication.py +0 -0
  46. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/cache.py +0 -0
  47. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/core.py +0 -0
  48. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/exceptions.py +0 -0
  49. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/hito_db.py +0 -0
  50. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/hito_db_model.py +0 -0
  51. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/menus.py +0 -0
  52. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/period.py +0 -0
  53. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/projects.py +0 -0
  54. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/teams.py +0 -0
  55. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah/utils/utils.py +0 -0
  56. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah.egg-info/SOURCES.txt +0 -0
  57. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah.egg-info/dependency_links.txt +0 -0
  58. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah.egg-info/entry_points.txt +0 -0
  59. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah.egg-info/requires.txt +0 -0
  60. {ositah-24.9.dev5 → ositah-24.9.dev7}/ositah.egg-info/top_level.txt +0 -0
  61. {ositah-24.9.dev5 → ositah-24.9.dev7}/setup.cfg +0 -0
  62. {ositah-24.9.dev5 → ositah-24.9.dev7}/setup.py +0 -0
  63. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/README.md +0 -0
  64. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/accordion.py +0 -0
  65. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/authentication.py +0 -0
  66. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/checkbox.py +0 -0
  67. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/checklist.py +0 -0
  68. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/file-selector.py +0 -0
  69. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/file-upload.py +0 -0
  70. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/long_running_callback.py +0 -0
  71. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/pandas_split.py +0 -0
  72. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/pandas_split_bug_report.py +0 -0
  73. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/pattern-matching-callback.py +0 -0
  74. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/progess_bar.py +0 -0
  75. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/reset_table_checkboxes.py +0 -0
  76. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/sortable_table.py +0 -0
  77. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/sqlalchemy_test.py +0 -0
  78. {ositah-24.9.dev5 → ositah-24.9.dev7}/test-dash/templates/base.html +0 -0
  79. {ositah-24.9.dev5 → ositah-24.9.dev7}/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.dev5
3
+ Version: 24.9.dev7
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
@@ -416,7 +416,7 @@ def analysis_layout():
416
416
  # The following dcc.Store is used to ensure that the the ijclab_export input exists
417
417
  # before the export page is created
418
418
  dcc.Store(id=DATA_SELECTED_SOURCE_ID, data=DATA_SOURCE_HITO),
419
- html.Div(analysis_submenus(), id="analysis-submenus", style={"margin-top": "3em"}),
419
+ html.Div(analysis_submenus(), id="analysis-submenus", style={"marginTop": "3em"}),
420
420
  dcc.Store(id=ANALYSIS_LOAD_INDICATOR_ID, data=0),
421
421
  dcc.Store(id=ANALYSIS_SAVED_INDICATOR_ID, data=0),
422
422
  dcc.Store(id=ANALYSIS_SAVED_ACTIVE_TAB_ID, data=""),
@@ -6,7 +6,6 @@ from datetime import datetime
6
6
  from typing import Any, List
7
7
 
8
8
  import dash_bootstrap_components as dbc
9
- import numpy as np
10
9
  from dash import callback_context, html
11
10
  from dash.dependencies import Input, Output, State
12
11
  from dash.exceptions import PreventUpdate
@@ -66,7 +65,7 @@ def check_activity_changes(project_activity: bool):
66
65
  indicator=True,
67
66
  suffixes=[None, "_nsip"],
68
67
  )
69
- activity_changes["status"] = np.NaN
68
+ activity_changes["status"] = None
70
69
  activity_changes.loc[activity_changes._merge == "left_only", "status"] = PROJECT_CHANGE_REMOVED
71
70
  activity_changes.loc[activity_changes._merge == "right_only", "status"] = PROJECT_CHANGE_ADDED
72
71
  activity_changes.loc[
@@ -27,7 +27,7 @@ def configuration_layout():
27
27
  html.Div(
28
28
  configuration_submenus(),
29
29
  id="configuration-submenus",
30
- style={"margin-top": "3em"},
30
+ style={"marginTop": "3em"},
31
31
  ),
32
32
  # The following dcc.Store coupled with tables must be created in the layout for
33
33
  # the callback to work
@@ -70,7 +70,7 @@ def declaration_periods_layout():
70
70
  dbc.Label(
71
71
  "Date de début",
72
72
  html_for=DECLARATION_PERIOD_START_DATE_ID,
73
- style={"font-weight": "bold"},
73
+ style={"fontWeight": "bold"},
74
74
  width="5",
75
75
  ),
76
76
  dbc.Col(
@@ -83,14 +83,14 @@ def declaration_periods_layout():
83
83
  class_name="me-3",
84
84
  ),
85
85
  ],
86
- style={"margin-bottom": "10px"},
86
+ style={"marginBottom": "10px"},
87
87
  ),
88
88
  dbc.Row(
89
89
  [
90
90
  dbc.Label(
91
91
  "Date de validation",
92
92
  html_for=DECLARATION_PERIOD_VALIDATION_DATE_ID,
93
- style={"font-weight": "bold"},
93
+ style={"fontWeight": "bold"},
94
94
  width="5",
95
95
  ),
96
96
  dbc.Col(
@@ -103,14 +103,14 @@ def declaration_periods_layout():
103
103
  class_name="me-3",
104
104
  ),
105
105
  ],
106
- style={"margin-bottom": "10px"},
106
+ style={"marginBottom": "10px"},
107
107
  ),
108
108
  dbc.Row(
109
109
  [
110
110
  dbc.Label(
111
111
  "Date de fin",
112
112
  html_for=DECLARATION_PERIOD_END_DATE_ID,
113
- style={"font-weight": "bold"},
113
+ style={"fontWeight": "bold"},
114
114
  width="5",
115
115
  ),
116
116
  dbc.Col(
@@ -123,14 +123,14 @@ def declaration_periods_layout():
123
123
  class_name="me-3",
124
124
  ),
125
125
  ],
126
- style={"margin-bottom": "10px"},
126
+ style={"marginBottom": "10px"},
127
127
  ),
128
128
  dbc.Row(
129
129
  [
130
130
  dbc.Label(
131
131
  "Nom",
132
132
  html_for=DECLARATION_PERIOD_NAME_ID,
133
- style={"font-weight": "bold"},
133
+ style={"fontWeight": "bold"},
134
134
  width="5",
135
135
  ),
136
136
  dbc.Col(
@@ -168,8 +168,8 @@ def declaration_periods_layout():
168
168
  id=DECLARATION_PERIOD_PARAMS_ID,
169
169
  style={
170
170
  "border": "1px solid",
171
- "border-radius": "4px",
172
- "border-sizing": "border-box",
171
+ "borderRadius": "4px",
172
+ "borderSizing": "border-box",
173
173
  "padding": "10px 10px",
174
174
  "visibility": "hidden",
175
175
  },
@@ -211,7 +211,7 @@ def declaration_periods_layout():
211
211
  ),
212
212
  ],
213
213
  justify="evenly",
214
- style={"margin-top": "3em"},
214
+ style={"marginTop": "3em"},
215
215
  ),
216
216
  dcc.Store(id=DECLARATION_PERIODS_CREATE_CLICK_ID, data=0),
217
217
  # The 2 following Stores are used to control if the status must be displayed or not.
@@ -352,19 +352,19 @@ def project_teams_layout():
352
352
  html.I(className="bi bi-chevron-double-right"),
353
353
  id=ACTIVITY_TEAMS_BUTTON_ADD_ID,
354
354
  disabled=True,
355
- style={"margin-top": "1em"},
355
+ style={"marginTop": "1em"},
356
356
  ),
357
357
  dbc.Button(
358
358
  html.I(className="bi bi-chevron-double-left"),
359
359
  id=ACTIVITY_TEAMS_BUTTON_REMOVE_ID,
360
360
  disabled=True,
361
- style={"margin-top": "2em"},
361
+ style={"marginTop": "2em"},
362
362
  ),
363
363
  ],
364
364
  vertical=True,
365
365
  ),
366
366
  ],
367
- style={"display": "flex", "justify-content": "center"},
367
+ style={"display": "flex", "justifyContent": "center"},
368
368
  ),
369
369
  width=ACTIVITY_TEAMS_LIST_BOX_INTERVAL,
370
370
  align="center",
@@ -382,7 +382,7 @@ def project_teams_layout():
382
382
  ),
383
383
  ],
384
384
  justify="start",
385
- style={"margin-top": "5em"},
385
+ style={"marginTop": "5em"},
386
386
  ),
387
387
  dbc.Row(
388
388
  [
@@ -404,7 +404,7 @@ def project_teams_layout():
404
404
  ),
405
405
  ],
406
406
  justify="evenly",
407
- style={"margin-top": "3em"},
407
+ style={"marginTop": "3em"},
408
408
  ),
409
409
  dcc.Store(id=ACTIVITY_TEAMS_PROJECT_ACTIVITY_ID, data=True),
410
410
  dcc.Store(id=ACTIVITY_TEAMS_ADDED_TEAMS_ID, data=[]),
@@ -449,7 +449,7 @@ def project_mgt_layout():
449
449
  ),
450
450
  ],
451
451
  justify="center",
452
- style={"margin-top": "1em"},
452
+ style={"marginTop": "1em"},
453
453
  ),
454
454
  dbc.Row(
455
455
  [
@@ -478,7 +478,7 @@ def project_mgt_layout():
478
478
  xxl={"size": PROJECT_MGT_LIST_BOX_WIDTH_XXL, "offset": 0},
479
479
  ),
480
480
  ],
481
- style={"margin-top": "1em"},
481
+ style={"marginTop": "1em"},
482
482
  ),
483
483
  dbc.Row(
484
484
  dbc.Col(
@@ -489,7 +489,7 @@ def project_mgt_layout():
489
489
  style={"visibility": "hidden"},
490
490
  ),
491
491
  ),
492
- style={"margin-top": "3em"},
492
+ style={"marginTop": "3em"},
493
493
  ),
494
494
  dcc.Store(id=PROJECT_MGT_PROJECT_ACTIVITY_ID, data=True),
495
495
  ],
@@ -108,7 +108,7 @@ def export_layout():
108
108
  # The following dcc.Store is used to ensure that the the ijclab_export input exists
109
109
  # before the export page is created
110
110
  dcc.Store(id=DATA_SELECTED_SOURCE_ID, data=DATA_SOURCE_OSITAH),
111
- html.Div(export_submenus(), id="export-submenus", style={"margin-top": "3em"}),
111
+ html.Div(export_submenus(), id="export-submenus", style={"marginTop": "3em"}),
112
112
  dcc.Store(id=EXPORT_LOAD_INDICATOR_ID, data=0),
113
113
  dcc.Store(id=EXPORT_SAVED_LOAD_INDICATOR_ID, data=0),
114
114
  dcc.Store(id=EXPORT_SAVED_ACTIVE_TAB_ID, data=""),
@@ -65,7 +65,7 @@ def validation_layout():
65
65
  html.Div(
66
66
  validation_submenus(),
67
67
  id="validation-submenus",
68
- style={"margin-top": "3em"},
68
+ style={"marginTop": "3em"},
69
69
  ),
70
70
  dcc.Store(id=VALIDATION_LOAD_INDICATOR_ID, data=0),
71
71
  dcc.Store(id=VALIDATION_SAVED_INDICATOR_ID, data=0),
@@ -83,14 +83,14 @@ SIDEBAR_STYLE = {
83
83
  "bottom": 0,
84
84
  "width": f"{SIDEBAR_WIDTH}rem",
85
85
  "padding": "2rem 1rem",
86
- "background-color": "#f8f9fa",
86
+ "backgroundColor": "#f8f9fa",
87
87
  }
88
88
 
89
89
  # the styles for the main content position it to the right of the sidebar and
90
90
  # add some padding.
91
91
  CONTENT_STYLE = {
92
- "margin-left": f"{SIDEBAR_WIDTH+2}rem",
93
- "margin-right": "2rem",
92
+ "marginLeft": f"{SIDEBAR_WIDTH+2}rem",
93
+ "marginRight": "2rem",
94
94
  "padding": "2rem 1rem",
95
95
  }
96
96
 
@@ -192,7 +192,7 @@ def render_page_content(pathname, login_menu):
192
192
 
193
193
  if user_authenticated:
194
194
  user_session_data = global_params.session_data
195
- user = get_agent_by_email(session["user_email"])
195
+ user = get_agent_by_email()
196
196
  role_ok = False
197
197
  user_roles = user.roles
198
198
  for role in AUTHORIZED_ROLES:
@@ -216,7 +216,7 @@ def render_page_content(pathname, login_menu):
216
216
  else:
217
217
  teams.extend(
218
218
  Team.query.filter(
219
- Team.children_managers.any(email_auth=session["user_email"])
219
+ Team.children_managers.any(email=session["user_email"])
220
220
  ).all()
221
221
  )
222
222
  team_list = sorted([t.nom for t in teams])
@@ -12,18 +12,20 @@ NSIP_AGENT_COLUMNS = {
12
12
  }
13
13
 
14
14
 
15
- def get_agent_by_email(connexion_email: str) -> str:
15
+ def get_agent_by_email(agent_email: str = None) -> str:
16
16
  """
17
- Retrieve an agent from Hito using the connexion email. If the connexion email is not
18
- defined for the agent, try to use the contact email.
17
+ Retrieve an agent from Hito using his email. If the agent email argument
18
+ is not present, use the session user_email attribute.
19
19
 
20
- :param connexion_email: agent's email
20
+ :param: agent_email: agent's email
21
21
  :return: agent entry (row)
22
22
  """
23
23
 
24
24
  from ositah.utils.hito_db_model import Agent
25
25
 
26
- user = Agent.query.filter_by(email_auth=session["user_email"]).first()
26
+ if agent_email is None:
27
+ agent_email = session["user_email"]
28
+ user = Agent.query.filter_by(email_auth=agent_email).first()
27
29
  if user is None:
28
30
  user = Agent.query.filter_by(email=session["user_email"]).first()
29
31
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ositah
3
- Version: 24.9.dev5
3
+ Version: 24.9.dev7
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.dev5"
7
+ version = "24.9.dev7"
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