perfact-api-pd-fastapi 1.6__tar.gz → 1.7__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.
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/PKG-INFO +1 -1
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/kpi.py +3 -21
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/PKG-INFO +1 -1
- perfact_api_pd_fastapi-1.7/src/perfact_api_pd_fastapi.egg-info/scm_version.json +8 -0
- perfact_api_pd_fastapi-1.6/src/perfact_api_pd_fastapi.egg-info/scm_version.json +0 -8
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/README.md +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/pyproject.toml +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/setup.cfg +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/__init__.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/grafana.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/pdunit.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/pdunitlch.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/performancedata.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/py.typed +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/SOURCES.txt +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/dependency_links.txt +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/entry_points.txt +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/requires.txt +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/scm_file_list.json +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/top_level.txt +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/__init__.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/conftest.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/helpers.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/locustfile.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/test_init.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/test_kpi.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/test_pdunit.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/test_pdunitlch.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/test_performance.py +0 -0
- {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tox.ini +0 -0
|
@@ -16,8 +16,7 @@ from perfact.api.pd.services.oee.prod_records import get_prod_records
|
|
|
16
16
|
from perfact.api.pd.services.oee.state_spans import get_state_spans
|
|
17
17
|
from perfact.api.pd.services.oee.summary import oee_workcenter_time_computation
|
|
18
18
|
from perfact.api.pd.services.oee.trend import (
|
|
19
|
-
|
|
20
|
-
compute_trend_for_collections,
|
|
19
|
+
compute_trend,
|
|
21
20
|
get_oee_trend_candidate_days,
|
|
22
21
|
)
|
|
23
22
|
from pydantic import BaseModel, BeforeValidator
|
|
@@ -191,28 +190,11 @@ def oee_trend_aggregation(
|
|
|
191
190
|
) -> dict:
|
|
192
191
|
"""
|
|
193
192
|
Calculate and persist daily OEE values into dgval for eligible pdunit/day pairs.
|
|
193
|
+
Commits day by day so an execution cut short by a timeout keeps its progress.
|
|
194
194
|
"""
|
|
195
195
|
|
|
196
196
|
candidates = get_oee_trend_candidate_days(session, lookback_months)
|
|
197
|
-
|
|
198
|
-
# compute trend for candidate days
|
|
199
|
-
c, u, s, impacted_days = compute_trend_for_candidates(session, candidates)
|
|
200
|
-
|
|
201
|
-
# create or update pdunitgroups and pdplants
|
|
202
|
-
# if possible for each of the impacted days
|
|
203
|
-
pdgrp_c, pdgrp_u, pdplt_c, pdplt_u = compute_trend_for_collections(
|
|
204
|
-
session, impacted_days
|
|
205
|
-
)
|
|
206
|
-
|
|
207
|
-
return {
|
|
208
|
-
"created": c,
|
|
209
|
-
"updated": u,
|
|
210
|
-
"skipped": s,
|
|
211
|
-
"pdunitgroup_created": pdgrp_c,
|
|
212
|
-
"pdunitgroup_updated": pdgrp_u,
|
|
213
|
-
"pdplant_created": pdplt_c,
|
|
214
|
-
"pdplant_updated": pdplt_u,
|
|
215
|
-
}
|
|
197
|
+
return compute_trend(session, candidates)
|
|
216
198
|
|
|
217
199
|
|
|
218
200
|
@routes.get("/kpi/downtime", tags=["pd"], summary="PdUnit downtime")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/__init__.py
RENAMED
|
File without changes
|
{perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/grafana.py
RENAMED
|
File without changes
|
{perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/pdunit.py
RENAMED
|
File without changes
|
{perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/pdunitlch.py
RENAMED
|
File without changes
|
|
File without changes
|
{perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/py.typed
RENAMED
|
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
|