ositah 24.1.dev1__tar.gz → 24.4.dev1__tar.gz

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.
Files changed (76) hide show
  1. {ositah-24.1.dev1/ositah.egg-info → ositah-24.4.dev1}/PKG-INFO +1 -1
  2. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/main.py +2 -4
  3. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/ositah.example.cfg +1 -1
  4. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/exceptions.py +2 -1
  5. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/projects.py +1 -1
  6. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/utils.py +2 -1
  7. {ositah-24.1.dev1 → ositah-24.4.dev1/ositah.egg-info}/PKG-INFO +1 -1
  8. {ositah-24.1.dev1 → ositah-24.4.dev1}/pyproject.toml +1 -1
  9. {ositah-24.1.dev1 → ositah-24.4.dev1}/.gitignore +0 -0
  10. {ositah-24.1.dev1 → ositah-24.4.dev1}/.gitlab-ci.yml +0 -0
  11. {ositah-24.1.dev1 → ositah-24.4.dev1}/LICENSE +0 -0
  12. {ositah-24.1.dev1 → ositah-24.4.dev1}/README.md +0 -0
  13. {ositah-24.1.dev1 → ositah-24.4.dev1}/gunicorn.config/README.md +0 -0
  14. {ositah-24.1.dev1 → ositah-24.4.dev1}/gunicorn.config/gunicorn.ositah +0 -0
  15. {ositah-24.1.dev1 → ositah-24.4.dev1}/gunicorn.config/gunicorn@.service +0 -0
  16. {ositah-24.1.dev1 → ositah-24.4.dev1}/gunicorn.config/ositah.conf.py +0 -0
  17. {ositah-24.1.dev1 → ositah-24.4.dev1}/noxfile.py +0 -0
  18. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/__init__.py +0 -0
  19. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/app.py +0 -0
  20. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/__init__.py +0 -0
  21. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/analysis.py +0 -0
  22. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/configuration/__init__.py +0 -0
  23. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/configuration/callbacks.py +0 -0
  24. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/configuration/main.py +0 -0
  25. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/configuration/parameters.py +0 -0
  26. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/configuration/tools.py +0 -0
  27. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/export.py +0 -0
  28. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/__init__.py +0 -0
  29. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/callbacks.py +0 -0
  30. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/main.py +0 -0
  31. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/parameters.py +0 -0
  32. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/tables.py +0 -0
  33. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/tools.py +0 -0
  34. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/assets/arrow_down_up.svg +0 -0
  35. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/assets/ositah.css +0 -0
  36. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/assets/sort_ascending.svg +0 -0
  37. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/assets/sort_descending.svg +0 -0
  38. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/assets/sorttable.js +0 -0
  39. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/static/style.css +0 -0
  40. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/templates/base.html +0 -0
  41. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/templates/bootstrap_login.html +0 -0
  42. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/templates/login_form.html +0 -0
  43. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/__init__.py +0 -0
  44. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/agents.py +0 -0
  45. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/authentication.py +0 -0
  46. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/cache.py +0 -0
  47. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/core.py +0 -0
  48. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/hito_db.py +0 -0
  49. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/hito_db_model.py +0 -0
  50. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/menus.py +0 -0
  51. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/period.py +0 -0
  52. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/teams.py +0 -0
  53. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah.egg-info/SOURCES.txt +0 -0
  54. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah.egg-info/dependency_links.txt +0 -0
  55. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah.egg-info/entry_points.txt +0 -0
  56. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah.egg-info/requires.txt +0 -0
  57. {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah.egg-info/top_level.txt +0 -0
  58. {ositah-24.1.dev1 → ositah-24.4.dev1}/setup.cfg +0 -0
  59. {ositah-24.1.dev1 → ositah-24.4.dev1}/setup.py +0 -0
  60. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/README.md +0 -0
  61. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/accordion.py +0 -0
  62. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/authentication.py +0 -0
  63. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/checkbox.py +0 -0
  64. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/checklist.py +0 -0
  65. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/file-selector.py +0 -0
  66. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/file-upload.py +0 -0
  67. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/long_running_callback.py +0 -0
  68. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/pandas_split.py +0 -0
  69. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/pandas_split_bug_report.py +0 -0
  70. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/pattern-matching-callback.py +0 -0
  71. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/progess_bar.py +0 -0
  72. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/reset_table_checkboxes.py +0 -0
  73. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/sortable_table.py +0 -0
  74. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/sqlalchemy_test.py +0 -0
  75. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/templates/base.html +0 -0
  76. {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/templates/login_form.html +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ositah
3
- Version: 24.1.dev1
3
+ Version: 24.4.dev1
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
@@ -117,7 +117,7 @@ def url_not_found(path):
117
117
  # valid role missing jumbotron
118
118
  def valid_role_missing(msg):
119
119
  return ositah_jumbotron(
120
- "You don't havea valid Hito role to OSITAH",
120
+ "You don't have a valid Hito role to OSITAH",
121
121
  msg,
122
122
  title_class="text-warning",
123
123
  )
@@ -204,9 +204,7 @@ def render_page_content(pathname, login_menu):
204
204
  if not user_session_data.agent_teams:
205
205
  if role == HITO_ROLE_TEAM_MGR:
206
206
  # For a team manager, show only the teams he/she is a manager
207
- teams = Team.query.filter(
208
- Team.managers.any(email_auth=session["user_email"])
209
- ).all()
207
+ teams = Team.query.filter(Team.managers.any(email=session["user_email"])).all()
210
208
  if len(teams) == 0:
211
209
  # A user with role ROLE_RESP but is not the manager of any team is degraded
212
210
  # to ROLE_AGENT
@@ -85,7 +85,7 @@ server:
85
85
  # Options related to declarations
86
86
  declaration:
87
87
  # Default date must be a date included into the selected validation period. It is a default, if no other explicitly select
88
- default_date: 2021-07-01
88
+ #default_date: 2021-07-01
89
89
  # max_hours specifies the upper valid value for activities declared in hours
90
90
  max_hours: 400
91
91
  # Agent statut whose declaration is not mandatory
@@ -24,7 +24,8 @@ class InvalidDataSource(Exception):
24
24
  class InvalidHitoProjectName(Exception):
25
25
  def __init__(self, projects):
26
26
  self.msg = (
27
- f"The following Hito projects have an invalid name format (name empty): {projects}"
27
+ f"The following Hito project names don't match the format 'masterproject / project' :"
28
+ f" {', '.join(projects)}"
28
29
  )
29
30
  self.status = EXIT_STATUS_GENERAL_ERROR
30
31
 
@@ -425,7 +425,7 @@ def get_team_projects(
425
425
  invalid_hito_projects = declarations.loc[declarations[columns["project"]].isnull()]
426
426
  if not invalid_hito_projects.empty:
427
427
  raise InvalidHitoProjectName(
428
- pd.Series(invalid_hito_projects[columns["masterproject"]]).values
428
+ pd.Series(invalid_hito_projects[columns["masterproject"]]).unique()
429
429
  )
430
430
 
431
431
  else:
@@ -5,6 +5,7 @@ from typing import List
5
5
 
6
6
  import dash_bootstrap_components as dbc
7
7
  from dash import html
8
+ from dateutil.relativedelta import relativedelta
8
9
  from flask import session
9
10
  from flask_sqlalchemy import SQLAlchemy
10
11
  from hito_tools.exceptions import ConfigFileEmpty, ConfigMissingParam
@@ -388,7 +389,7 @@ def define_config_params(file):
388
389
  config["declaration"]["thresholds"] = {"low": 50, "suspect": 75, "good": 100}
389
390
  # Default declaration period date defaults to current day if not explicitly defined
390
391
  if "default_date" not in config["declaration"]:
391
- config["declaration"]["default_date"] = datetime.now()
392
+ config["declaration"]["default_date"] = datetime.now() - relativedelta(months=10)
392
393
  global_params.declaration_options = config["declaration"]
393
394
 
394
395
  if "validation" not in config:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ositah
3
- Version: 24.1.dev1
3
+ Version: 24.4.dev1
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ositah"
7
- version = "24.1.dev1"
7
+ version = "24.4.dev1"
8
8
  description = "Outils de Suivi d'Activités basé sur Hito"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes