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.
Files changed (30) hide show
  1. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/PKG-INFO +1 -1
  2. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/kpi.py +3 -21
  3. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/PKG-INFO +1 -1
  4. perfact_api_pd_fastapi-1.7/src/perfact_api_pd_fastapi.egg-info/scm_version.json +8 -0
  5. perfact_api_pd_fastapi-1.6/src/perfact_api_pd_fastapi.egg-info/scm_version.json +0 -8
  6. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/README.md +0 -0
  7. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/pyproject.toml +0 -0
  8. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/setup.cfg +0 -0
  9. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/__init__.py +0 -0
  10. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/grafana.py +0 -0
  11. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/pdunit.py +0 -0
  12. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/pdunitlch.py +0 -0
  13. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/performancedata.py +0 -0
  14. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact/api/pd_fastapi/py.typed +0 -0
  15. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/SOURCES.txt +0 -0
  16. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/dependency_links.txt +0 -0
  17. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/entry_points.txt +0 -0
  18. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/requires.txt +0 -0
  19. {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
  20. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/src/perfact_api_pd_fastapi.egg-info/top_level.txt +0 -0
  21. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/__init__.py +0 -0
  22. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/conftest.py +0 -0
  23. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/helpers.py +0 -0
  24. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/locustfile.py +0 -0
  25. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/test_init.py +0 -0
  26. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/test_kpi.py +0 -0
  27. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/test_pdunit.py +0 -0
  28. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/test_pdunitlch.py +0 -0
  29. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tests/test_performance.py +0 -0
  30. {perfact_api_pd_fastapi-1.6 → perfact_api_pd_fastapi-1.7}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: perfact-api-pd-fastapi
3
- Version: 1.6
3
+ Version: 1.7
4
4
  Summary: PerFact API - SQLAlchemy+FastAPI pd apis package
5
5
  Author-email: Viktor Dick <viktor.dick@perfact.de>
6
6
  License-Expression: GPL-2.0-or-later
@@ -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
- compute_trend_for_candidates,
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")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: perfact-api-pd-fastapi
3
- Version: 1.6
3
+ Version: 1.7
4
4
  Summary: PerFact API - SQLAlchemy+FastAPI pd apis package
5
5
  Author-email: Viktor Dick <viktor.dick@perfact.de>
6
6
  License-Expression: GPL-2.0-or-later
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "1.7",
3
+ "distance": 0,
4
+ "node": "g4aa2bc0baa5e5d3232ee124539082fc3c08f47a1",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-07-09"
8
+ }
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "1.6",
3
- "distance": 0,
4
- "node": "ga99427348d94eb18ecb59ec9b9318de2b5a77d5b",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-07-03"
8
- }