ositah 25.6.dev1__py3-none-any.whl → 25.9.dev1__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/app.py +17 -17
- ositah/apps/analysis.py +785 -785
- ositah/apps/configuration/callbacks.py +916 -916
- ositah/apps/configuration/main.py +546 -546
- ositah/apps/configuration/parameters.py +74 -74
- ositah/apps/configuration/tools.py +112 -112
- ositah/apps/export.py +1208 -1191
- ositah/apps/validation/callbacks.py +240 -240
- ositah/apps/validation/main.py +89 -89
- ositah/apps/validation/parameters.py +25 -25
- ositah/apps/validation/tables.py +646 -646
- ositah/apps/validation/tools.py +552 -552
- ositah/assets/arrow_down_up.svg +3 -3
- ositah/assets/ositah.css +53 -53
- ositah/assets/sort_ascending.svg +4 -4
- ositah/assets/sort_descending.svg +5 -5
- ositah/assets/sorttable.js +499 -499
- ositah/main.py +449 -449
- ositah/ositah.example.cfg +229 -229
- ositah/static/style.css +53 -53
- ositah/templates/base.html +22 -22
- ositah/templates/bootstrap_login.html +38 -38
- ositah/templates/login_form.html +26 -26
- ositah/utils/agents.py +124 -124
- ositah/utils/authentication.py +287 -287
- ositah/utils/cache.py +19 -19
- ositah/utils/core.py +13 -13
- ositah/utils/exceptions.py +64 -64
- ositah/utils/hito_db.py +51 -51
- ositah/utils/hito_db_model.py +253 -253
- ositah/utils/menus.py +339 -339
- ositah/utils/period.py +139 -139
- ositah/utils/projects.py +1178 -1178
- ositah/utils/teams.py +42 -42
- ositah/utils/utils.py +474 -474
- {ositah-25.6.dev1.dist-info → ositah-25.9.dev1.dist-info}/METADATA +149 -150
- ositah-25.9.dev1.dist-info/RECORD +46 -0
- {ositah-25.6.dev1.dist-info → ositah-25.9.dev1.dist-info}/licenses/LICENSE +29 -29
- ositah-25.6.dev1.dist-info/RECORD +0 -46
- {ositah-25.6.dev1.dist-info → ositah-25.9.dev1.dist-info}/WHEEL +0 -0
- {ositah-25.6.dev1.dist-info → ositah-25.9.dev1.dist-info}/entry_points.txt +0 -0
- {ositah-25.6.dev1.dist-info → ositah-25.9.dev1.dist-info}/top_level.txt +0 -0
ositah/utils/teams.py
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import re
|
|
2
|
-
from typing import Dict, List
|
|
3
|
-
|
|
4
|
-
import pandas as pd
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def get_hito_teams():
|
|
8
|
-
"""
|
|
9
|
-
Return Hito teams as a Dataframe
|
|
10
|
-
|
|
11
|
-
:return: Hito teams
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
from .hito_db_model import Team, db
|
|
15
|
-
|
|
16
|
-
team_query = Team.query
|
|
17
|
-
|
|
18
|
-
teams = pd.read_sql(team_query.statement, con=db.session.bind)
|
|
19
|
-
|
|
20
|
-
return teams
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def get_project_team_ids(team_config: Dict[str, str], project: str) -> List[str]:
|
|
24
|
-
"""
|
|
25
|
-
Return the list of team ID associated with the project based on the configuration passed.
|
|
26
|
-
The configuration is a dict where the key is a pattern applied to the project name and
|
|
27
|
-
the value is the list of team names.
|
|
28
|
-
|
|
29
|
-
:param team_config: dict describing the teams associated with a project
|
|
30
|
-
:param project: project name
|
|
31
|
-
:return: list of team ids or None if no match is found
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
for pattern, team_list in team_config.items():
|
|
35
|
-
if re.match(pattern, project):
|
|
36
|
-
hito_teams = get_hito_teams()
|
|
37
|
-
hito_teams["selected"] = False
|
|
38
|
-
for team_pattern in team_list:
|
|
39
|
-
hito_teams.loc[hito_teams.nom.str.match(f"{team_pattern}$"), "selected"] = True
|
|
40
|
-
return hito_teams["id"].to_list()
|
|
41
|
-
|
|
42
|
-
return None
|
|
1
|
+
import re
|
|
2
|
+
from typing import Dict, List
|
|
3
|
+
|
|
4
|
+
import pandas as pd
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def get_hito_teams():
|
|
8
|
+
"""
|
|
9
|
+
Return Hito teams as a Dataframe
|
|
10
|
+
|
|
11
|
+
:return: Hito teams
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from .hito_db_model import Team, db
|
|
15
|
+
|
|
16
|
+
team_query = Team.query
|
|
17
|
+
|
|
18
|
+
teams = pd.read_sql(team_query.statement, con=db.session.bind)
|
|
19
|
+
|
|
20
|
+
return teams
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def get_project_team_ids(team_config: Dict[str, str], project: str) -> List[str]:
|
|
24
|
+
"""
|
|
25
|
+
Return the list of team ID associated with the project based on the configuration passed.
|
|
26
|
+
The configuration is a dict where the key is a pattern applied to the project name and
|
|
27
|
+
the value is the list of team names.
|
|
28
|
+
|
|
29
|
+
:param team_config: dict describing the teams associated with a project
|
|
30
|
+
:param project: project name
|
|
31
|
+
:return: list of team ids or None if no match is found
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
for pattern, team_list in team_config.items():
|
|
35
|
+
if re.match(pattern, project):
|
|
36
|
+
hito_teams = get_hito_teams()
|
|
37
|
+
hito_teams["selected"] = False
|
|
38
|
+
for team_pattern in team_list:
|
|
39
|
+
hito_teams.loc[hito_teams.nom.str.match(f"{team_pattern}$"), "selected"] = True
|
|
40
|
+
return hito_teams["id"].to_list()
|
|
41
|
+
|
|
42
|
+
return None
|