ositah 24.9.dev2__py3-none-any.whl → 24.9.dev3__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
@@ -301,11 +301,22 @@ def project_agents_time(declarations, project):
301
301
  global_params = GlobalParams()
302
302
  columns = global_params.columns
303
303
 
304
- project_agents = declarations[declarations[columns["activity"]] == project].sort_values(
305
- by="nom"
304
+ project_agents = declarations[declarations[columns["activity"]] == project]
305
+ project_agents.loc[:, columns["hours"]] = np.round(project_agents[columns["hours"]]).astype(
306
+ "int"
307
+ )
308
+ project_agents.loc[:, columns["weeks"]] = np.round(
309
+ project_agents.loc[:, columns["hours"]] / WEEK_HOURS, 1
310
+ )
311
+ if global_params.analysis_params["contributions_sorted_by_name"]:
312
+ sort_by = ["nom", columns["hours"]]
313
+ sort_ascending = True
314
+ else:
315
+ sort_by = [columns["hours"], "nom"]
316
+ sort_ascending = False
317
+ project_agents.sort_values(
318
+ by=sort_by, ascending=sort_ascending, ignore_index=True, inplace=True
306
319
  )
307
- project_agents[columns["hours"]] = np.round(project_agents[columns["hours"]]).astype("int")
308
- project_agents[columns["weeks"]] = np.round(project_agents[columns["hours"]] / WEEK_HOURS, 1)
309
320
  return html.Div(
310
321
  [
311
322
  html.Div(
ositah/ositah.example.cfg CHANGED
@@ -105,6 +105,10 @@ declaration:
105
105
  suspect: 80
106
106
  good: 100
107
107
 
108
+ # Information related to declaration analysis
109
+ analysis:
110
+ contributions_sorted_by_name: False
111
+
108
112
  # Information related to validation
109
113
  validation:
110
114
  override_period:
ositah/utils/utils.py CHANGED
@@ -224,6 +224,7 @@ class OSITAHSessionData:
224
224
  class GlobalParams:
225
225
  def __init__(self):
226
226
  self.agent_query = None
227
+ self.analysis_params = None
227
228
  self.category_patterns = {}
228
229
  self.columns = COLUMN_NAMES
229
230
  self.column_titles = None
@@ -391,6 +392,12 @@ def define_config_params(file):
391
392
  config["declaration"]["default_date"] = datetime.now()
392
393
  global_params.declaration_options = config["declaration"]
393
394
 
395
+ if "analysis" not in config:
396
+ config["analysis"] = {}
397
+ if "contributions_sorted_by_name" not in config["analysis"]:
398
+ config["analysis"]["contributions_sorted_by_name"] = True
399
+ global_params.analysis_params = config["analysis"]
400
+
394
401
  if "validation" not in config:
395
402
  config["validation"] = {}
396
403
  if "override_period" not in config["validation"]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ositah
3
- Version: 24.9.dev2
3
+ Version: 24.9.dev3
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
@@ -1,9 +1,9 @@
1
1
  ositah/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  ositah/app.py,sha256=53ylXmqBSo31omZt-XBPBhOzlkGQBuDenU0Q8m7efCg,428
3
3
  ositah/main.py,sha256=vw8PBYP3ugtWKWUta3UKagh8lbp-ogl8LUNF-KSyo0s,15673
4
- ositah/ositah.example.cfg,sha256=-k6Bytmuml3KHQn_1gGxW2k2bBAc39zPN6Ew5rG14xw,7472
4
+ ositah/ositah.example.cfg,sha256=uLJAcPNziiOBFqjnUGLs7fPEhntpRJ3Pzu5Ab4CSxXQ,7571
5
5
  ositah/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- ositah/apps/analysis.py,sha256=lGcXTOCZuP9mIYpZA3zgKdAPk_s0pvfso2u_Qux0DRo,28266
6
+ ositah/apps/analysis.py,sha256=9EDXcCtXtAiCdyG8kZXJDAQXLuTG7gTZbsnKnL_ehiw,28635
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
@@ -37,10 +37,10 @@ ositah/utils/menus.py,sha256=Xoyo2ySX0MD7phzyO5WjEcR0PCXwsX1TSrzONXnX4yI,12005
37
37
  ositah/utils/period.py,sha256=CxT77mAQasD59BmecXRUwme-_76hOr2kotOwTy6ZKfk,4058
38
38
  ositah/utils/projects.py,sha256=LuyUVtKqTb3qUWbsgwrE-9DqyW1bkV9y-n_n0oRaotQ,43476
39
39
  ositah/utils/teams.py,sha256=K8Z6kqs-kFpNiIg6wgmmZ3_tmfUPaB7wp0OAGmmZPG4,1234
40
- ositah/utils/utils.py,sha256=rUp366CNWLX3GMMHcJsau_y6kp52uCs1Hels2ESatGY,16372
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,,
40
+ ositah/utils/utils.py,sha256=N7Ze4PshzRi8v204mRdDJ6QSmUZvckqH3oHKkI7WaWI,16667
41
+ ositah-24.9.dev3.dist-info/LICENSE,sha256=2C86YWCx1fvz92WySupcb6_t4NhHCVPE_ucy0YMTuoc,1550
42
+ ositah-24.9.dev3.dist-info/METADATA,sha256=jibVKLeSDzkEn_7pljac1KFSwTmoAPDHLUHk9EMGVR8,8104
43
+ ositah-24.9.dev3.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
44
+ ositah-24.9.dev3.dist-info/entry_points.txt,sha256=t9oDDLUO1LwHJewlE862LbJMHpDTEyqbeUAPw_F7Q3I,44
45
+ ositah-24.9.dev3.dist-info/top_level.txt,sha256=3kfj_oK4xoZFt0nsw6KKT_aoqshELBu0ryLXECbcqNI,7
46
+ ositah-24.9.dev3.dist-info/RECORD,,