ositah 24.9.dev1__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.
- ositah/apps/analysis.py +15 -4
- ositah/ositah.example.cfg +4 -0
- ositah/utils/utils.py +7 -0
- {ositah-24.9.dev1.dist-info → ositah-24.9.dev3.dist-info}/METADATA +2 -3
- {ositah-24.9.dev1.dist-info → ositah-24.9.dev3.dist-info}/RECORD +9 -9
- {ositah-24.9.dev1.dist-info → ositah-24.9.dev3.dist-info}/LICENSE +0 -0
- {ositah-24.9.dev1.dist-info → ositah-24.9.dev3.dist-info}/WHEEL +0 -0
- {ositah-24.9.dev1.dist-info → ositah-24.9.dev3.dist-info}/entry_points.txt +0 -0
- {ositah-24.9.dev1.dist-info → ositah-24.9.dev3.dist-info}/top_level.txt +0 -0
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]
|
|
305
|
-
|
|
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
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.
|
|
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
|
|
@@ -9,7 +9,7 @@ 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.
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Requires-Dist: blinker
|
|
@@ -22,7 +22,6 @@ Requires-Dist: flask-wtf
|
|
|
22
22
|
Requires-Dist: hito-tools >=24.8
|
|
23
23
|
Requires-Dist: pandas >=2.2
|
|
24
24
|
Requires-Dist: pymysql
|
|
25
|
-
Requires-Dist: python >=3.9
|
|
26
25
|
Requires-Dist: python-ldap
|
|
27
26
|
Requires-Dist: pyyaml
|
|
28
27
|
Requires-Dist: simplejson
|
|
@@ -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
|
|
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=
|
|
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=
|
|
41
|
-
ositah-24.9.
|
|
42
|
-
ositah-24.9.
|
|
43
|
-
ositah-24.9.
|
|
44
|
-
ositah-24.9.
|
|
45
|
-
ositah-24.9.
|
|
46
|
-
ositah-24.9.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|