ositah 24.8.dev1__py3-none-any.whl → 24.9.dev2__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.

ositah/apps/analysis.py CHANGED
@@ -596,7 +596,7 @@ def ijclab_export_to_csv(_, team, team_selection_date, source, period_date):
596
596
  columns["hours"],
597
597
  ]
598
598
  ]
599
- exported_data[columns["hours"]] = np.round(exported_data[columns["hours"]]).astype("int")
599
+ exported_data.loc[:, columns["hours"]] = np.round(exported_data[columns["hours"]]).astype("int")
600
600
  column_renames = {}
601
601
  for c in exported_data.columns.tolist():
602
602
  if c in EXPORT_COLUMN_NAMES:
@@ -176,6 +176,7 @@ def build_validation_table(team, team_selection_date, declaration_set: int, peri
176
176
  selected_declarations = declaration_list[~declaration_list["validated"]]
177
177
  else:
178
178
  return general_error_jumbotron(f"Invalid declaration set ID ({declaration_set})")
179
+ selected_declarations.sort_values(by=["fullname"], ignore_index=True, inplace=True)
179
180
 
180
181
  columns = [*data_columns]
181
182
  columns.insert(0, column_names["fullname"])
@@ -5,7 +5,6 @@ Various functions used by Validation sub-application
5
5
  from datetime import datetime
6
6
 
7
7
  import dash_bootstrap_components as dbc
8
- import numpy as np
9
8
  import pandas as pd
10
9
  from dash import html
11
10
 
@@ -341,9 +340,10 @@ def category_declarations(
341
340
  ]
342
341
  category_declarations.drop(columns=columns["hours"], inplace=True)
343
342
  category_declarations.fillna(0, inplace=True)
343
+ category_declarations = category_declarations.infer_objects(copy=False)
344
344
 
345
- agg_functions = {c: np.sum for c in categories}
346
- agg_functions["suspect"] = np.any
345
+ agg_functions = {c: "sum" for c in categories}
346
+ agg_functions["suspect"] = "any"
347
347
  category_declarations_pt = pd.pivot_table(
348
348
  category_declarations,
349
349
  index=[
ositah/utils/agents.py CHANGED
@@ -64,8 +64,9 @@ 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)]
68
- agent_list = agent_list[agent_list.team.notna() & agent_list[columns["team"]].str.match(team)]
67
+ agent_list = agent_list[
68
+ agent_list.team.notna() & agent_list[columns["team"]].str.match(team)
69
+ ]
69
70
  else:
70
71
  # If the agent doesn't belong to a team, set team to an empty string rather than None
71
72
  agent_list.loc[agent_list.team.isna(), "team"] = ""
ositah/utils/projects.py CHANGED
@@ -367,7 +367,7 @@ def get_team_projects(
367
367
  columns["email"],
368
368
  ],
369
369
  values=[columns["hours"], columns["quotite"]],
370
- aggfunc={columns["hours"]: np.sum, columns["quotite"]: np.mean},
370
+ aggfunc={columns["hours"]: "sum", columns["quotite"]: "mean"},
371
371
  )
372
372
  declarations = pd.DataFrame(global_declarations_pt.to_records())
373
373
  declarations[[columns["masterproject"], columns["project"]]] = declarations[
@@ -519,7 +519,7 @@ def build_projects_data(team, team_selection_date, period_date: str, source):
519
519
  columns["category"],
520
520
  ],
521
521
  values=[columns["hours"]],
522
- aggfunc={columns["hours"]: np.sum},
522
+ aggfunc={columns["hours"]: "sum"},
523
523
  )
524
524
  projects_data = pd.DataFrame(projects_data_pt.to_records())
525
525
  projects_data[columns["hours"]] = np.round(projects_data[columns["hours"]]).astype("int")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ositah
3
- Version: 24.8.dev1
3
+ Version: 24.9.dev2
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
@@ -9,18 +9,18 @@ Project-URL: Bug Tracker, https://gitlab.in2p3.fr/hito/ositah/-/issues
9
9
  Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Classifier: Programming Language :: Python :: 3
12
- Requires-Python: >=3.8
12
+ Requires-Python: >=3.9
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
15
  Requires-Dist: blinker
16
- Requires-Dist: dash
16
+ Requires-Dist: dash >=2.17
17
17
  Requires-Dist: dash-bootstrap-components
18
- Requires-Dist: flask ~=2.2
18
+ Requires-Dist: flask
19
19
  Requires-Dist: flask-multipass
20
20
  Requires-Dist: flask-sqlalchemy ~=3.0
21
21
  Requires-Dist: flask-wtf
22
- Requires-Dist: hito-tools >=23.2
23
- Requires-Dist: pandas ==2.*
22
+ Requires-Dist: hito-tools >=24.8
23
+ Requires-Dist: pandas >=2.2
24
24
  Requires-Dist: pymysql
25
25
  Requires-Dist: python-ldap
26
26
  Requires-Dist: pyyaml
@@ -3,7 +3,7 @@ ositah/app.py,sha256=53ylXmqBSo31omZt-XBPBhOzlkGQBuDenU0Q8m7efCg,428
3
3
  ositah/main.py,sha256=vw8PBYP3ugtWKWUta3UKagh8lbp-ogl8LUNF-KSyo0s,15673
4
4
  ositah/ositah.example.cfg,sha256=-k6Bytmuml3KHQn_1gGxW2k2bBAc39zPN6Ew5rG14xw,7472
5
5
  ositah/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- ositah/apps/analysis.py,sha256=8bmP5m4nmfMODu1_YpzqCiFR2U2TMOOxAHbujY8od8g,28259
6
+ ositah/apps/analysis.py,sha256=lGcXTOCZuP9mIYpZA3zgKdAPk_s0pvfso2u_Qux0DRo,28266
7
7
  ositah/apps/export.py,sha256=4h9_nk9uKopwfxgzqKyFk5u4qVQ9mtgGvk3zmxbhTV0,47532
8
8
  ositah/apps/configuration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  ositah/apps/configuration/callbacks.py,sha256=J1bWwxQF2JRX6vvkTF22XXr4R2HEEXyK3ht75hbFgAM,33477
@@ -14,8 +14,8 @@ 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=4pqWUtbIkyv40CE6VgzPu71i0hv_BWGGj3dDaQtS7sc,24283
18
- ositah/apps/validation/tools.py,sha256=omz6M10cCI5A8aTWllpkqFDEcIQFEhjzxOCiJKhHuDc,18046
17
+ ositah/apps/validation/tables.py,sha256=avzGAX2qRiuLCg0BLLt0a4cf6ZRD1bNBp5cHQVrShNI,24372
18
+ ositah/apps/validation/tools.py,sha256=jyKQtVMylYkurVLTmRLtuICpjwN5LM4YMB4PPS4GMaA,18105
19
19
  ositah/assets/arrow_down_up.svg,sha256=jH7QOmbLkYnNENa2PlBktOYHKDGN5KbrrFcV6UpgkCY,503
20
20
  ositah/assets/ositah.css,sha256=_T3mwonAYMPoDJoHYgJ5XgdFllHMcE28vnMMDd_hdOQ,1094
21
21
  ositah/assets/sort_ascending.svg,sha256=Rg4wPgEBEBU9hDPgNnenFYkFLC18qKw0flaBk_8Y-uM,593
@@ -26,7 +26,7 @@ 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=k8LPE2j9X4UhOQUB4r4XYrDdQMn8aVJ-UqTdHZQTPLM,4741
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
@@ -35,12 +35,12 @@ ositah/utils/hito_db.py,sha256=awVGrd1DAyj6BaEkLjTVN1l9A5SjZUJ1-fQ5PAik7bI,1510
35
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
- ositah/utils/projects.py,sha256=xLQ0RpJzMmCpx9Xdy8sHPQ-tijeWvSFPVSgOl5D6aSk,43479
38
+ ositah/utils/projects.py,sha256=LuyUVtKqTb3qUWbsgwrE-9DqyW1bkV9y-n_n0oRaotQ,43476
39
39
  ositah/utils/teams.py,sha256=K8Z6kqs-kFpNiIg6wgmmZ3_tmfUPaB7wp0OAGmmZPG4,1234
40
40
  ositah/utils/utils.py,sha256=rUp366CNWLX3GMMHcJsau_y6kp52uCs1Hels2ESatGY,16372
41
- ositah-24.8.dev1.dist-info/LICENSE,sha256=2C86YWCx1fvz92WySupcb6_t4NhHCVPE_ucy0YMTuoc,1550
42
- ositah-24.8.dev1.dist-info/METADATA,sha256=lYwhqbAWbrl0bz5YALdNg9-4zVxrZ_bupDLoGfOLbnU,8103
43
- ositah-24.8.dev1.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
44
- ositah-24.8.dev1.dist-info/entry_points.txt,sha256=t9oDDLUO1LwHJewlE862LbJMHpDTEyqbeUAPw_F7Q3I,44
45
- ositah-24.8.dev1.dist-info/top_level.txt,sha256=3kfj_oK4xoZFt0nsw6KKT_aoqshELBu0ryLXECbcqNI,7
46
- ositah-24.8.dev1.dist-info/RECORD,,
41
+ ositah-24.9.dev2.dist-info/LICENSE,sha256=2C86YWCx1fvz92WySupcb6_t4NhHCVPE_ucy0YMTuoc,1550
42
+ ositah-24.9.dev2.dist-info/METADATA,sha256=ryiLBIDLx3lxFT0_dH30Gu2Y3nd88C6wtIorHmaeri0,8104
43
+ ositah-24.9.dev2.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
44
+ ositah-24.9.dev2.dist-info/entry_points.txt,sha256=t9oDDLUO1LwHJewlE862LbJMHpDTEyqbeUAPw_F7Q3I,44
45
+ ositah-24.9.dev2.dist-info/top_level.txt,sha256=3kfj_oK4xoZFt0nsw6KKT_aoqshELBu0ryLXECbcqNI,7
46
+ ositah-24.9.dev2.dist-info/RECORD,,