ositah 24.9.dev4__tar.gz → 24.9.dev5__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.
Potentially problematic release.
This version of ositah might be problematic. Click here for more details.
- {ositah-24.9.dev4/ositah.egg-info → ositah-24.9.dev5}/PKG-INFO +1 -1
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/ositah.example.cfg +3 -1
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/period.py +6 -2
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/utils.py +6 -2
- {ositah-24.9.dev4 → ositah-24.9.dev5/ositah.egg-info}/PKG-INFO +1 -1
- {ositah-24.9.dev4 → ositah-24.9.dev5}/pyproject.toml +1 -1
- {ositah-24.9.dev4 → ositah-24.9.dev5}/.gitignore +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/.gitlab-ci.yml +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/LICENSE +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/README.md +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/docker/Dockerfile +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/docker/docker-compose.yml +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/docker/pyproject-poetry.toml +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/gunicorn.config/README.md +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/gunicorn.config/gunicorn.ositah +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/gunicorn.config/gunicorn@.service +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/gunicorn.config/ositah.conf.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/noxfile.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/__init__.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/app.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/__init__.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/analysis.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/configuration/__init__.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/configuration/callbacks.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/configuration/main.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/configuration/parameters.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/configuration/tools.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/export.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/validation/__init__.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/validation/callbacks.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/validation/main.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/validation/parameters.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/validation/tables.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/apps/validation/tools.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/assets/arrow_down_up.svg +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/assets/ositah.css +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/assets/sort_ascending.svg +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/assets/sort_descending.svg +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/assets/sorttable.js +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/main.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/static/style.css +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/templates/base.html +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/templates/bootstrap_login.html +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/templates/login_form.html +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/__init__.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/agents.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/authentication.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/cache.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/core.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/exceptions.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/hito_db.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/hito_db_model.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/menus.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/projects.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah/utils/teams.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah.egg-info/SOURCES.txt +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah.egg-info/dependency_links.txt +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah.egg-info/entry_points.txt +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah.egg-info/requires.txt +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/ositah.egg-info/top_level.txt +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/setup.cfg +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/setup.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/README.md +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/accordion.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/authentication.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/checkbox.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/checklist.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/file-selector.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/file-upload.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/long_running_callback.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/pandas_split.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/pandas_split_bug_report.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/pattern-matching-callback.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/progess_bar.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/reset_table_checkboxes.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/sortable_table.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/sqlalchemy_test.py +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/templates/base.html +0 -0
- {ositah-24.9.dev4 → ositah-24.9.dev5}/test-dash/templates/login_form.html +0 -0
|
@@ -84,8 +84,10 @@ server:
|
|
|
84
84
|
|
|
85
85
|
# Options related to declarations
|
|
86
86
|
declaration:
|
|
87
|
-
# Default date must be a date included into the selected validation period. It is a default, if no other explicitly
|
|
87
|
+
# Default date must be a date included into the selected validation period. It is a default, if no other explicitly selection
|
|
88
88
|
#default_date: 2021-07-01
|
|
89
|
+
# Delay (in days) before setting the default period to the next one, after the end of the period. Ignored if default_date is defined
|
|
90
|
+
period_change_delay: 60
|
|
89
91
|
# max_hours specifies the upper valid value for activities declared in hours
|
|
90
92
|
max_hours: 400
|
|
91
93
|
# Agent statut whose declaration is not mandatory
|
|
@@ -119,7 +119,8 @@ def get_declaration_periods(descending: bool = True) -> List[OSITAHDeclarationPe
|
|
|
119
119
|
def get_default_period_date(periods: List[OSITAHDeclarationPeriod], date: datetime.date):
|
|
120
120
|
"""
|
|
121
121
|
Return the start date of the default period. The default period is selected by passing a date
|
|
122
|
-
that must be between period start and end dates (included).
|
|
122
|
+
that must be between period start and end dates (included). If none matches, select the last
|
|
123
|
+
period.
|
|
123
124
|
|
|
124
125
|
:param periods: period list
|
|
125
126
|
:param date: date that must be inside the period (string)
|
|
@@ -127,9 +128,12 @@ def get_default_period_date(periods: List[OSITAHDeclarationPeriod], date: dateti
|
|
|
127
128
|
"""
|
|
128
129
|
|
|
129
130
|
period_date = date.isoformat()
|
|
131
|
+
last_start_date = None
|
|
130
132
|
|
|
131
133
|
for p in periods:
|
|
132
134
|
if period_date >= p.start_date and period_date <= p.end_date:
|
|
133
135
|
return p.start_date
|
|
136
|
+
if last_start_date is None or p.start_date > last_start_date:
|
|
137
|
+
last_start_date = p.start_date
|
|
134
138
|
|
|
135
|
-
return
|
|
139
|
+
return last_start_date
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Convenience objects for OSITAH application
|
|
2
2
|
|
|
3
|
-
from datetime import datetime
|
|
3
|
+
from datetime import datetime, timedelta
|
|
4
4
|
from typing import List
|
|
5
5
|
|
|
6
6
|
import dash_bootstrap_components as dbc
|
|
@@ -394,7 +394,11 @@ def define_config_params(file):
|
|
|
394
394
|
raise ConfigMissingParam(", ".join(missing_params), file)
|
|
395
395
|
# Default declaration period date defaults to current day if not explicitly defined
|
|
396
396
|
if "default_date" not in config["declaration"]:
|
|
397
|
-
config["declaration"]
|
|
397
|
+
if "period_change_delay" in config["declaration"]:
|
|
398
|
+
change_delay = config["declaration"]["period_change_delay"]
|
|
399
|
+
else:
|
|
400
|
+
change_delay = 0
|
|
401
|
+
config["declaration"]["default_date"] = datetime.now() - timedelta(days=change_delay)
|
|
398
402
|
global_params.declaration_options = config["declaration"]
|
|
399
403
|
|
|
400
404
|
if "analysis" not in config:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|