ositah 24.7.dev3__py3-none-any.whl → 24.8__py3-none-any.whl

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.

@@ -298,7 +298,7 @@ def build_validation_table(team, team_selection_date, declaration_set: int, peri
298
298
  html.Em(
299
299
  (
300
300
  f"Temps déclarés de l'équipe / total ="
301
- f" {round(selected_declarations['percent_global'].mean(),1)}%"
301
+ f" {round(selected_declarations['percent_global'].mean(), 1)}%"
302
302
  f" (100%={SEMESTER_WEEKS} semaines)"
303
303
  )
304
304
  )
@@ -341,12 +341,7 @@ def build_missing_agents_table(team, team_selection_date, period_date: str):
341
341
  title_class="text-danger",
342
342
  )
343
343
 
344
- agents = get_agents(period_date)
345
-
346
- if team == TEAM_LIST_ALL_AGENTS:
347
- agent_list = agents
348
- else:
349
- agent_list = agents[agents.team.notna() & agents[column_names["team"]].str.match(team)]
344
+ agent_list = get_agents(period_date, team)
350
345
 
351
346
  if declarations is None:
352
347
  missing_agents = agent_list
@@ -459,13 +454,7 @@ def build_statistics_table(team, team_selection_date, period_date: str):
459
454
  title_class="text-danger",
460
455
  )
461
456
 
462
- agents = get_agents(period_date)
463
- if team == TEAM_LIST_ALL_AGENTS:
464
- agent_list = agents
465
- # If the agent doesn't belong to a team, set team to an empty string rather than None
466
- agent_list.loc[agent_list.team.isna(), "team"] = ""
467
- else:
468
- agent_list = agents[agents.team.notna() & agents[column_names["team"]].str.match(team)]
457
+ agent_list = get_agents(period_date, team)
469
458
 
470
459
  add_no_team_row = False
471
460
  if declarations is None:
ositah/utils/agents.py CHANGED
@@ -64,7 +64,12 @@ def get_agents(period_date: str, team: str = None) -> pd.DataFrame:
64
64
  # agent_list = agent_list.loc[(agent_list.archive == 0) |
65
65
  # (agent_list.date_fin >= start_date.date().isoformat())]
66
66
  if team and team != TEAM_LIST_ALL_AGENTS:
67
- agent_list = agent_list[agent_list["team"].str.match(team, case=False, na=False)]
67
+ agent_list = agent_list[
68
+ agent_list.team.notna() & agent_list[columns["team"]].str.match(team)
69
+ ]
70
+ else:
71
+ # If the agent doesn't belong to a team, set team to an empty string rather than None
72
+ agent_list.loc[agent_list.team.isna(), "team"] = ""
68
73
  agent_list[columns["fullname"]] = agent_list[
69
74
  [columns["lastname"], columns["firstname"]]
70
75
  ].agg(" ".join, axis=1)
@@ -199,7 +199,7 @@ class ActiviteDetail(db.Model):
199
199
 
200
200
 
201
201
  class OSITAHSession(db.Model):
202
- __table_args__ = {'mysql_charset':'utf8mb4','mysql_collate':'utf8mb4_unicode_ci'}
202
+ __table_args__ = {"mysql_charset": "utf8mb4", "mysql_collate": "utf8mb4_unicode_ci"}
203
203
 
204
204
  id = db.Column(db.String(36), primary_key=True)
205
205
  email = db.Column(db.String(255), nullable=False)
@@ -207,7 +207,7 @@ class OSITAHSession(db.Model):
207
207
 
208
208
 
209
209
  class OSITAHValidation(db.Model):
210
- __table_args__ = {'mysql_charset':'utf8mb4','mysql_collate':'utf8mb4_unicode_ci'}
210
+ __table_args__ = {"mysql_charset": "utf8mb4", "mysql_collate": "utf8mb4_unicode_ci"}
211
211
 
212
212
  id = db.Column(db.String(36), primary_key=True, default=new_uuid)
213
213
  validated = db.Column(db.Boolean, nullable=False)
@@ -225,7 +225,7 @@ class OSITAHValidation(db.Model):
225
225
 
226
226
 
227
227
  class OSITAHValidationPeriod(db.Model):
228
- __table_args__ = {'mysql_charset':'utf8mb4','mysql_collate':'utf8mb4_unicode_ci'}
228
+ __table_args__ = {"mysql_charset": "utf8mb4", "mysql_collate": "utf8mb4_unicode_ci"}
229
229
 
230
230
  id = db.Column(db.String(36), primary_key=True, default=new_uuid)
231
231
  name = db.Column(db.String(255), unique=True, nullable=False)
@@ -235,7 +235,7 @@ class OSITAHValidationPeriod(db.Model):
235
235
 
236
236
 
237
237
  class OSITAHProjectDeclaration(db.Model):
238
- __table_args__ = {'mysql_charset':'utf8mb4','mysql_collate':'utf8mb4_unicode_ci'}
238
+ __table_args__ = {"mysql_charset": "utf8mb4", "mysql_collate": "utf8mb4_unicode_ci"}
239
239
 
240
240
  id = db.Column(db.String(36), primary_key=True, default=new_uuid)
241
241
  projet = db.Column(db.String(255), nullable=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ositah
3
- Version: 24.7.dev3
3
+ Version: 24.8
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
@@ -14,7 +14,7 @@ ositah/apps/validation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
14
14
  ositah/apps/validation/callbacks.py,sha256=N9j0HLe8Xp1zZUrVgx0woeDBwVtJLQZ_BPVNaJ9UIZo,9557
15
15
  ositah/apps/validation/main.py,sha256=en9D6c65DUosbU31dxLR6BhLCU3yj7uxyoS3MYzvw30,2896
16
16
  ositah/apps/validation/parameters.py,sha256=tDHqDnoWv1QhcTad2yhqLT9_wCpj8sTYxKWsi1UF-uk,1003
17
- ositah/apps/validation/tables.py,sha256=Zz-yJw6Bw2fQOa87PW4EmW3nQZmmZF1kqr11NfWvQOI,24770
17
+ ositah/apps/validation/tables.py,sha256=4pqWUtbIkyv40CE6VgzPu71i0hv_BWGGj3dDaQtS7sc,24283
18
18
  ositah/apps/validation/tools.py,sha256=omz6M10cCI5A8aTWllpkqFDEcIQFEhjzxOCiJKhHuDc,18046
19
19
  ositah/assets/arrow_down_up.svg,sha256=jH7QOmbLkYnNENa2PlBktOYHKDGN5KbrrFcV6UpgkCY,503
20
20
  ositah/assets/ositah.css,sha256=_T3mwonAYMPoDJoHYgJ5XgdFllHMcE28vnMMDd_hdOQ,1094
@@ -26,21 +26,21 @@ ositah/templates/base.html,sha256=qKZLLrIOn2eZ_mIoSZEN8ZP6qyeSg1butPEVuv5lYDs,71
26
26
  ositah/templates/bootstrap_login.html,sha256=Gp3FTx1uWMHeVvnYcLehdYE8vfZ1RBzIjrxD6IGKPA4,1608
27
27
  ositah/templates/login_form.html,sha256=BjcnWd5svC0xy039-MToODcDswehe1YVQnTnctD9kdU,1033
28
28
  ositah/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
- ositah/utils/agents.py,sha256=Cxe2BUCP_wT63Ewduk1JUIyFVOfHJSD9BJX2QjDy7n4,4453
29
+ ositah/utils/agents.py,sha256=wZ9xpWgQD4D6anuAnp9erHnkuM8y49y3yQWNn4PGMoU,4677
30
30
  ositah/utils/authentication.py,sha256=VfT3MrIPX6U4HAma0O0UScB86-EukBdfEg26NP5ndpk,9149
31
31
  ositah/utils/cache.py,sha256=mM1iKDzQbVJZvTOgfPnvbxSBWi-OVGly6MncQ09CtEY,504
32
32
  ositah/utils/core.py,sha256=OFML9h5JNmXXeMo7n90FSBDHtivWOY7ff2SJcG4uYEM,295
33
33
  ositah/utils/exceptions.py,sha256=ZVngkr28pBxO-kZAeKW9FWAFyhzuWL98-S92mieHMSk,1911
34
34
  ositah/utils/hito_db.py,sha256=awVGrd1DAyj6BaEkLjTVN1l9A5SjZUJ1-fQ5PAik7bI,1510
35
- ositah/utils/hito_db_model.py,sha256=0-JpCqgG9nLpVT00SYbFxfq4hASEDcdJvEamxGkHP-g,9344
35
+ ositah/utils/hito_db_model.py,sha256=GvCHp5u-mPQinbZPvF6ONJAWIc2no1KN_VNJv6NCaPk,9356
36
36
  ositah/utils/menus.py,sha256=Xoyo2ySX0MD7phzyO5WjEcR0PCXwsX1TSrzONXnX4yI,12005
37
37
  ositah/utils/period.py,sha256=CxT77mAQasD59BmecXRUwme-_76hOr2kotOwTy6ZKfk,4058
38
38
  ositah/utils/projects.py,sha256=xLQ0RpJzMmCpx9Xdy8sHPQ-tijeWvSFPVSgOl5D6aSk,43479
39
39
  ositah/utils/teams.py,sha256=K8Z6kqs-kFpNiIg6wgmmZ3_tmfUPaB7wp0OAGmmZPG4,1234
40
40
  ositah/utils/utils.py,sha256=rUp366CNWLX3GMMHcJsau_y6kp52uCs1Hels2ESatGY,16372
41
- ositah-24.7.dev3.dist-info/LICENSE,sha256=2C86YWCx1fvz92WySupcb6_t4NhHCVPE_ucy0YMTuoc,1550
42
- ositah-24.7.dev3.dist-info/METADATA,sha256=q4h3R_VpVBTY0js1F6OOCC-0IIEnVc6VS4ULoI9y2Eo,8103
43
- ositah-24.7.dev3.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
44
- ositah-24.7.dev3.dist-info/entry_points.txt,sha256=t9oDDLUO1LwHJewlE862LbJMHpDTEyqbeUAPw_F7Q3I,44
45
- ositah-24.7.dev3.dist-info/top_level.txt,sha256=3kfj_oK4xoZFt0nsw6KKT_aoqshELBu0ryLXECbcqNI,7
46
- ositah-24.7.dev3.dist-info/RECORD,,
41
+ ositah-24.8.dist-info/LICENSE,sha256=2C86YWCx1fvz92WySupcb6_t4NhHCVPE_ucy0YMTuoc,1550
42
+ ositah-24.8.dist-info/METADATA,sha256=-73nhv2fdX4u70EyJ64Hd2jLlYQHrPYGNqzEc8T4HDc,8098
43
+ ositah-24.8.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
44
+ ositah-24.8.dist-info/entry_points.txt,sha256=t9oDDLUO1LwHJewlE862LbJMHpDTEyqbeUAPw_F7Q3I,44
45
+ ositah-24.8.dist-info/top_level.txt,sha256=3kfj_oK4xoZFt0nsw6KKT_aoqshELBu0ryLXECbcqNI,7
46
+ ositah-24.8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.2.0)
2
+ Generator: setuptools (73.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5