Commit Graph
1099 Commits
Author SHA1 Message Date
Andreas b684748c6f feat(pvforecast): add calibrated local Akkudoktor backend
Port local PV modeling and outage calibration from feature commits f976335, 6dc58c3 and faed0fd by Andreas. Keep PVForecastAkkudoktor identity and remote default, adapt to async storage, and migrate legacy provider settings.
2026-09-16 18:27:34 +02:00
Andreas a6d3073787 fix(devices): constrain the physics port and validate export levels
Defer inactive EV deadline fields to the optimizer port, reject nonfinite export rates, and document the hourly Optimize boundary. Verify converter IDs, rates and LCOS, separate GENETIC0 interpolation, physical boundary flows and independent GENETIC repricing.
2026-09-16 18:27:34 +02:00
Andreas a4ebc72f4e fix(cache): distinguish callables in the shared EMS cache
Include the function object in cache keys so methods of one interpolator cannot reuse a probability as a power value. Cover both call orders, keyword arguments, cache hits and separate closures with identical qualified names.
2026-09-16 18:27:34 +02:00
Andreas 2b76a33b57 test(integration): verify algorithm aliases and mapped-device contracts 2026-09-16 18:23:54 +02:00
Andreas 3039c315ab fix: return only completed optimization results per run 2026-09-16 18:23:03 +02:00
Andreas 174e92141b test(integration): verify tariff protection with mapped device physics 2026-09-16 18:17:39 +02:00
05ec3477e4 fix: preserve imported feed-in revenue during parameter preparation
Cancel GENETIC preparation when imported revenue cannot be read or contains invalid values, preserving the chosen provider instead of replacing it with demo tariffs. Keep valid positive, zero and negative amount/Wh series unchanged.

Adapt the revenue-preservation regressions from PRs #1224 and #1304 to the async main API, including real timestamped imports and simulation repricing. The feature-only direct-marketing override remains outside this main fix.

Co-authored-by: Christin <info@bikinibottom.capital>

Co-authored-by: Normann <github@koldrack.com>
2026-09-16 18:16:15 +02:00
Andreas e92feb5fc0 docs(integration): define parallel packages and Optimize compatibility gates 2026-09-16 18:14:41 +02:00
Andreas 20b66789f9 docs(integration): refresh API version after prerequisite alignment 2026-09-16 18:13:25 +02:00
Andreas b17c7b6f00 merge: align integration with latest main and runtime configuration PR 2026-09-16 18:11:27 +02:00
Andreas c968e4ccd1 merge: refresh runtime configuration PR 1305 2026-09-16 18:10:39 +02:00
Andreas a1c587e419 merge: refresh configuration base with current main dependencies 2026-09-16 18:10:38 +02:00
Andreas 93f3c24fdd docs(development): record corrected PR head and CI progress 2026-09-16 18:10:37 +02:00
Andreas 3d12240569 test(measurement): assert restored timestamps before timezone conversion 2026-09-16 17:57:58 +02:00
Andreas 5e416bf50f docs(development): record publication and verification of PR 1322 2026-09-16 17:56:50 +02:00
r0b2g1t 60b77f6da2 ruff format fix 2026-09-16 16:55:54 +02:00
NormannandGitHub 4a3724424f build(deps): combine Dependabot updates and refresh uv lock (#1321) 2026-09-16 15:44:36 +02:00
Andreas bb8dff8abe docs(integration): record PR readiness verification results 2026-09-16 13:32:02 +02:00
Andreas bacf00ec15 docs(integration): refresh API version after measurement reconciliation 2026-09-16 13:27:54 +02:00
Andreas cc7fd3541f merge: record matching measurement fixture isolation 2026-09-16 13:27:20 +02:00
Andreas 786f02f5c0 docs(development): define isolated PR packages and remaining porting gates 2026-09-16 13:26:16 +02:00
Andreas ea3383e9a4 test(measurement): isolate capacity database state between tests 2026-09-16 13:25:29 +02:00
Andreas d91820009f merge: reconcile isolated measurement PR package with integration
# Conflicts:
#	docs/_generated/openapi.md
#	openapi.json
#	src/akkudoktoreos/measurement/measurement.py
#	tests/test_battery_capacity.py
2026-09-16 13:23:14 +02:00
Andreas a829711a50 docs(measurement): regenerate configuration and API contracts 2026-09-16 13:22:44 +02:00
Andreas 2340129511 docs(measurement): describe household settings and consolidate regression coverage 2026-09-16 13:21:44 +02:00
Andreas 0f032c5771 merge: include independently reviewed JSON restore fix
# Conflicts:
#	src/akkudoktoreos/measurement/measurement.py
2026-09-16 13:20:34 +02:00
Andreas c1884907ed feat(measurement): integrate typed energy quality and capacity APIs
Port the locally backed-up measurement extensions to main async storage and PR #1256 device maps. Preserve runtime capacity estimates across #1305 bulk updates. Confirm JSON singleton restore defect on unchanged main and add regression. No production configuration or measurements included.

Co-authored-by: Andreas <drbacke@gmx.de>
2026-09-16 13:20:00 +02:00
Andreas d546f084de fix(devices): preserve charge-rate typing and public import compatibility 2026-09-16 13:19:52 +02:00
Andreas e162e68d70 merge: refresh configuration foundation with current main 2026-09-16 13:19:51 +02:00
Andreas dba0c9cdfa fix(measurement): restore JSON records into the existing singleton 2026-09-16 13:19:18 +02:00
Andreas 4fe1455a21 merge: refresh integration with official main 7ebe6d7 2026-09-16 13:12:44 +02:00
Andreas 0bb6b81cbf docs(integration): record tested checkpoint and remaining consolidation work 2026-09-16 12:34:16 +02:00
Andreas 876756b82d test(integration): validate optimizer economics and document measurement settings 2026-09-16 12:30:03 +02:00
Andreas 7338baff56 feat(measurement): integrate typed energy quality and capacity APIs
Port the locally backed-up measurement extensions to main async storage and PR #1256 device maps. Preserve runtime capacity estimates across #1305 bulk updates. Confirm JSON singleton restore defect on unchanged main and add regression. No production configuration or measurements included.

Co-authored-by: Andreas <drbacke@gmx.de>
2026-09-16 12:24:48 +02:00
dr-dimitriandGitHub 7ebe6d714b fix: detect recent Energy-Charts source cadence (#1315)
Infer interval coverage from consistent recent original price spacings while preserving history and forecasting resolution policies. Reuse source data until a successful refresh and cover cadence transitions, fallback, and history repair.

Fixes #1279
2026-09-16 12:22:39 +02:00
Andreas d9c434f5d4 fix(devices): preserve charge-rate typing and public import compatibility 2026-09-16 12:19:25 +02:00
AndreasandChristin f70a786d7c feat(optimization): port tested terminal and tail value primitives
Source d2e2d58237. 22 primitive tests pass; integration with the optimizer, forecast horizon and API is still pending.

Co-authored-by: Andreas <drbacke@gmx.de>

Co-authored-by: Christin <info@bikinibottom.capital>
2026-09-16 12:17:26 +02:00
AndreasandChristin c0796e1b8f feat(devices): port slot-aware battery export and direct-use physics
Port scoped device changes from d2e2d58237. Keep PR #1256 parameter conversion structure and separate GENETIC0 devices. Validate physical flows and reprice changed simulation results.

Co-authored-by: Andreas <drbacke@gmx.de>

Co-authored-by: Christin <info@bikinibottom.capital>
2026-09-16 12:16:46 +02:00
Andreas e3987b264e fix(config): preserve device identities and storage costs during migration 2026-09-16 12:09:32 +02:00
Andreas b43c8dfb4d merge: preserve runtime configuration updates from PR #1305 2026-09-16 12:07:08 +02:00
Andreas d3f96c4902 merge: integrate device configuration PR #1256 onto pinned main 2026-09-16 12:06:11 +02:00
NormannandGitHub afb7bcb8bc build(deps): consolidate Dependabot updates (#1311)
Consolidates seven compatible Dependabot updates into one reviewable change:
Runtime dependencies

    platformdirs 4.11.7 → 4.11.8 (build(deps): bump platformdirs from 4.11.7 to 4.11.8 #1307)
    rich-toolkit 0.20.4 → 0.20.5 (build(deps): bump rich-toolkit from 0.20.4 to 0.20.5 #1313)

Development, documentation, and CI dependencies

    types-requests 2.33.0.20260712 → 2.33.0.20260906 (build(deps-dev): bump types-requests from 2.33.0.20260712 to 2.33.0.20260906 #1306)
    pypdf 6.17.0 → 6.18.0 (build(deps-dev): bump pypdf from 6.17.0 to 6.18.0 #1308)
    types-PyYaml 6.0.12.20260815 → 6.0.12.20260906 (build(deps-dev): bump types-pyyaml from 6.0.12.20260815 to 6.0.12.20260906 #1309)
    sphinxcontrib-mermaid 2.1.0 → 2.1.1 (build(deps-dev): bump sphinxcontrib-mermaid from 2.1.0 to 2.1.1 #1310)
    GitPython 3.1.61 → 3.1.62 (build(deps-dev): bump gitpython from 3.1.61 to 3.1.62 #1312)

The committed uv.lock file is regenerated for all seven updates. The pre-commit mypy hook already executes the locked project development environment, so the type-stub pins have a single source of truth in pyproject.toml and uv.lock.
2026-09-14 08:26:16 +02:00
dr-dimitriandGitHub 446ea3da9d fix: preserve local time when parsing naive datetime strings (#1294)
to_datetime() previously interpreted naive strings differently depending on their precision. For example, 2026-01-15 23:45 in Europe/Berlin became 2026-01-16 00:45+01:00, while the equivalent string with seconds kept the intended date and time. Minutes, seconds, and fractional seconds now consistently represent 2026-01-15 23:45+01:00.

Pass the resolved target/local timezone to Pendulum's fallback parser. Explicit Z and numeric offsets continue to determine the input instant, and Unix timestamps retain their UTC semantics. Update the affected docstring examples to distinguish local wall time from UTC conversion.

Regression coverage includes space and T separators, explicit and default Europe/Berlin timezones, winter/summer dates near midnight, fractional-second precision, explicit offsets, and Unix timestamps. The Open-Meteo integration test now independently checks the timestamps and all three irradiance series for all 72 fixture hours, with both UTC and Europe/Berlin as the host timezone. This replaces an expectation that incorrectly associated the 08:00 values with 09:00. The previous parser misplaces all 72 source hours; the corrected parser maps all 72 correctly.
2026-09-14 08:24:55 +02:00
r0b2g1t 6fb84765c4 docs: changelog for config priority fixes 2026-09-13 13:53:00 +02:00
r0b2g1t e534878df5 fix: env vars ignored on first config build
ConfigEOS.__init__ passed self as first positional argument to _setup,
which forwards it to pydantic_settings.BaseSettings.__init__. Its first
positional parameter is _case_sensitive, so the environment source
matched the upper case variable names against the lower case field names
and returned nothing. Environment settings only took effect after the
next configuration setup.
2026-09-13 13:53:00 +02:00
r0b2g1t f882f62164 fix: runtime config update ignored by config file
Runtime settings were handed back to pydantic-settings as init settings,
which rank below the config file and the environment. Any key already
present in EOS.config.json or in the environment silently discarded the
update, so a bulk PUT /v1/config returned 200 without applying anything,
while the granular PUT /v1/config/{path} endpoint kept working.

Add a dedicated runtime settings source ranked directly below the command
line arguments and record granular updates there as well, so both
endpoints share one store that survives re-evaluation of the settings
sources. Environment variables keep precedence over the config file for
all keys that were not set at runtime.

Also repairs revert_settings() and update(), which passed their data
through the same init settings.

Closes #1303
2026-09-13 13:42:21 +02:00
dr-dimitriandGitHub 3b9eecc52b fix: handle denied inspection in test server cleanup (#1301)
Track owned test processes and restrict fallback cleanup to verified EOS servers using the test configuration. Add regression coverage for denied inspection and cleanup failures.

Fixes #1297
2026-09-13 00:22:32 +02:00
dr-dimitriandGitHub 5469ba836c fix: check port availability without system-wide process inspection (#1300)
* fix: check port availability without process inspection

Probe local TCP addresses and use process inspection only for optional diagnostics. Preserve occupied-port detection, bounded waits, and port reuse after closed connections.

Fixes #1298

* fix: preserve IPv6 scope IDs in port availability probes
2026-09-11 22:07:25 +02:00
NormannandGitHub fe7f0fd821 docs: correct mypy regression test filename (#1293)
The mypy regression-test command in CONTRIBUTING.md points to the nonexistent tests/test_typingmypytoolchain.py, causing copied commands to fail.

Change the path to tests/test_typingmypytooling.py, the existing integration test.
2026-09-11 07:50:54 +02:00
1abdd345c4 fix: unify mypy environments for local checks and CI (#1291)
The isolated pre-commit mypy hook previously omitted runtime type information that
make mypy used, hiding errors involving dependencies such as Pydantic and Pendulum.
Makefile, pre-commit and CI now run the same full-project typing policy in the
development environment defined by uv.lock.

- Use uv run --locked --exact --extra dev and the same mypy arguments for Makefile
  and the local hook. Check all of src and tests, including on configuration-only
  changes.
- Pin Python 3.13 for local development and the pre-commit CI job, and install the
  locked pre-commit version in CI.
- Disable incremental analysis because existing Pendulum cache state changes mypy 2.3.1
  diagnostics. Document the policy, the performance tradeoff and the existing typing debt.
- Add a regression test that exercises Makefile, the hook and the CI command in a
  temporary project, accepting valid dependency types and detecting deliberate
  Pydantic/Pendulum assignment errors.

Resolve the newly detected mypy diagnostics.

- Enable the numpydantic and Pydantic mypy plugins, retaining strict Pydantic
  constructor typing with init_typed = true. Validate raw/coercible payloads through model_validate.
- Propagate concrete record, provider and time-window types through generic collections,
  factories and lookup methods. Preserve runtime field inspection and generated time-window
  documentation.
- Align Pendulum annotations with actual factory/arithmetic results while retaining Pydantic
  validation adapters at runtime. Correct optional values, array boundaries, REST handlers
  and plotting interfaces.
- Add pinned scipy-stubs and types-psutil, update uv.lock, and supply the plugins' dependencies.
- Add runtime regression coverage for validated path defaults, normalized time-series metadata,
  generic field inspection, invalid timestamps and unsupported provider imports.

Runtime and compatibility details:

- Validate path defaults as Path objects while retaining raw string defaults needed by
  migration serialization with exclude_defaults.
- Normalize feed-in tariff lists and default charge rates to NumPy arrays; reject missing
  timestamps/uninitialized values explicitly. Importing into a provider without import support
  returns HTTP 400.
- Public JSON schemas and OpenAPI structure match main (excluding the generated version).

Signed-off-by: dr-dimitry

Signed-off-by: dr-dimitry
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Co-authored-by: dr-dimitri <87113560+dr-dimitri@users.noreply.github.com>
Co-authored-by: Normann <github@koldrack.com>
2026-09-10 23:20:35 +02:00