ositah 25.6.dev1__py3-none-any.whl → 25.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.

Files changed (42) hide show
  1. ositah/app.py +17 -17
  2. ositah/apps/analysis.py +785 -785
  3. ositah/apps/configuration/callbacks.py +916 -916
  4. ositah/apps/configuration/main.py +546 -546
  5. ositah/apps/configuration/parameters.py +74 -74
  6. ositah/apps/configuration/tools.py +112 -112
  7. ositah/apps/export.py +1209 -1191
  8. ositah/apps/validation/callbacks.py +240 -240
  9. ositah/apps/validation/main.py +89 -89
  10. ositah/apps/validation/parameters.py +25 -25
  11. ositah/apps/validation/tables.py +646 -646
  12. ositah/apps/validation/tools.py +552 -552
  13. ositah/assets/arrow_down_up.svg +3 -3
  14. ositah/assets/ositah.css +53 -53
  15. ositah/assets/sort_ascending.svg +4 -4
  16. ositah/assets/sort_descending.svg +5 -5
  17. ositah/assets/sorttable.js +499 -499
  18. ositah/main.py +449 -449
  19. ositah/ositah.example.cfg +229 -229
  20. ositah/static/style.css +53 -53
  21. ositah/templates/base.html +22 -22
  22. ositah/templates/bootstrap_login.html +38 -38
  23. ositah/templates/login_form.html +26 -26
  24. ositah/utils/agents.py +124 -124
  25. ositah/utils/authentication.py +287 -287
  26. ositah/utils/cache.py +19 -19
  27. ositah/utils/core.py +13 -13
  28. ositah/utils/exceptions.py +64 -64
  29. ositah/utils/hito_db.py +51 -51
  30. ositah/utils/hito_db_model.py +253 -253
  31. ositah/utils/menus.py +339 -339
  32. ositah/utils/period.py +139 -139
  33. ositah/utils/projects.py +1179 -1178
  34. ositah/utils/teams.py +42 -42
  35. ositah/utils/utils.py +474 -474
  36. {ositah-25.6.dev1.dist-info → ositah-25.9.dev2.dist-info}/METADATA +149 -150
  37. ositah-25.9.dev2.dist-info/RECORD +46 -0
  38. {ositah-25.6.dev1.dist-info → ositah-25.9.dev2.dist-info}/licenses/LICENSE +29 -29
  39. ositah-25.6.dev1.dist-info/RECORD +0 -46
  40. {ositah-25.6.dev1.dist-info → ositah-25.9.dev2.dist-info}/WHEEL +0 -0
  41. {ositah-25.6.dev1.dist-info → ositah-25.9.dev2.dist-info}/entry_points.txt +0 -0
  42. {ositah-25.6.dev1.dist-info → ositah-25.9.dev2.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