flexibility 0.6.0__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.
- flexibility-0.6.0/CHANGELOG.md +143 -0
- flexibility-0.6.0/Cargo.lock +1229 -0
- flexibility-0.6.0/Cargo.toml +91 -0
- flexibility-0.6.0/LICENSE-APACHE +201 -0
- flexibility-0.6.0/LICENSE-MIT +21 -0
- flexibility-0.6.0/PKG-INFO +171 -0
- flexibility-0.6.0/README.md +201 -0
- flexibility-0.6.0/examples/charge_by_seven.rs +80 -0
- flexibility-0.6.0/examples/check_a_settlement.rs +99 -0
- flexibility-0.6.0/examples/control_box.rs +97 -0
- flexibility-0.6.0/examples/curtail_pv.rs +55 -0
- flexibility-0.6.0/examples/evening_cap.rs +74 -0
- flexibility-0.6.0/examples/offer_from_a_pool.rs +108 -0
- flexibility-0.6.0/examples/settle_an_order.rs +74 -0
- flexibility-0.6.0/examples/verify_a_receipt.rs +59 -0
- flexibility-0.6.0/flexibility/__init__.py +104 -0
- flexibility-0.6.0/flexibility/_frames.py +65 -0
- flexibility-0.6.0/flexibility/_native.pyi +936 -0
- flexibility-0.6.0/flexibility/accuracy.py +5 -0
- flexibility-0.6.0/flexibility/baseline.py +33 -0
- flexibility-0.6.0/flexibility/openadr.py +11 -0
- flexibility-0.6.0/flexibility/pool.py +5 -0
- flexibility-0.6.0/flexibility/py.typed +0 -0
- flexibility-0.6.0/flexibility/s2.py +12 -0
- flexibility-0.6.0/flexibility/uftp.py +20 -0
- flexibility-0.6.0/licenses/LICENSE-APACHE +201 -0
- flexibility-0.6.0/licenses/LICENSE-MIT +21 -0
- flexibility-0.6.0/pyproject.toml +77 -0
- flexibility-0.6.0/python/Cargo.toml +34 -0
- flexibility-0.6.0/python/README.md +139 -0
- flexibility-0.6.0/python/licenses/LICENSE-APACHE +201 -0
- flexibility-0.6.0/python/licenses/LICENSE-MIT +21 -0
- flexibility-0.6.0/python/src/baseline.rs +394 -0
- flexibility-0.6.0/python/src/convert.rs +242 -0
- flexibility-0.6.0/python/src/grid.rs +804 -0
- flexibility-0.6.0/python/src/lib.rs +241 -0
- flexibility-0.6.0/python/src/settle.rs +729 -0
- flexibility-0.6.0/python/src/shape.rs +1070 -0
- flexibility-0.6.0/python/src/storage.rs +506 -0
- flexibility-0.6.0/python/src/uftp.rs +243 -0
- flexibility-0.6.0/python/src/values.rs +519 -0
- flexibility-0.6.0/python/tests/conftest.py +24 -0
- flexibility-0.6.0/python/tests/fixtures/uftp/flex_offer.xml +1 -0
- flexibility-0.6.0/python/tests/fixtures/uftp/flex_order.xml +1 -0
- flexibility-0.6.0/python/tests/fixtures/uftp/flex_request.xml +1 -0
- flexibility-0.6.0/python/tests/fixtures/uftp/flex_settlement.xml +1 -0
- flexibility-0.6.0/python/tests/fixtures/uftp/flex_settlement_wrong.xml +1 -0
- flexibility-0.6.0/python/tests/test_converters.py +191 -0
- flexibility-0.6.0/python/tests/test_distribution.py +59 -0
- flexibility-0.6.0/python/tests/test_pools.py +136 -0
- flexibility-0.6.0/python/tests/test_security.py +286 -0
- flexibility-0.6.0/python/tests/test_settlement.py +253 -0
- flexibility-0.6.0/python/tests/test_shapes.py +170 -0
- flexibility-0.6.0/python/tests/test_uftp.py +112 -0
- flexibility-0.6.0/python/tests/test_values.py +133 -0
- flexibility-0.6.0/python/tests/typed_consumer.py +69 -0
- flexibility-0.6.0/scripts/digest.sh +15 -0
- flexibility-0.6.0/src/accuracy.rs +99 -0
- flexibility-0.6.0/src/baseline.rs +814 -0
- flexibility-0.6.0/src/canon.rs +557 -0
- flexibility-0.6.0/src/cls.rs +187 -0
- flexibility-0.6.0/src/csip.rs +170 -0
- flexibility-0.6.0/src/eebus.rs +206 -0
- flexibility-0.6.0/src/error.rs +444 -0
- flexibility-0.6.0/src/grid.rs +511 -0
- flexibility-0.6.0/src/iec104.rs +358 -0
- flexibility-0.6.0/src/lib.rs +276 -0
- flexibility-0.6.0/src/metering.rs +150 -0
- flexibility-0.6.0/src/openadr.rs +491 -0
- flexibility-0.6.0/src/pool.rs +222 -0
- flexibility-0.6.0/src/power.rs +697 -0
- flexibility-0.6.0/src/rebound.rs +282 -0
- flexibility-0.6.0/src/relative.rs +267 -0
- flexibility-0.6.0/src/s2.rs +383 -0
- flexibility-0.6.0/src/series.rs +162 -0
- flexibility-0.6.0/src/settle.rs +688 -0
- flexibility-0.6.0/src/shape.rs +881 -0
- flexibility-0.6.0/src/storage.rs +521 -0
- flexibility-0.6.0/src/uftp.rs +532 -0
- flexibility-0.6.0/tests/accuracy.rs +51 -0
- flexibility-0.6.0/tests/baseline.rs +273 -0
- flexibility-0.6.0/tests/cls.rs +122 -0
- flexibility-0.6.0/tests/common/mod.rs +46 -0
- flexibility-0.6.0/tests/csip.rs +218 -0
- flexibility-0.6.0/tests/eebus.rs +406 -0
- flexibility-0.6.0/tests/grid.rs +229 -0
- flexibility-0.6.0/tests/iec104.rs +165 -0
- flexibility-0.6.0/tests/metering.rs +223 -0
- flexibility-0.6.0/tests/openadr.proptest-regressions +7 -0
- flexibility-0.6.0/tests/openadr.rs +696 -0
- flexibility-0.6.0/tests/pool.rs +324 -0
- flexibility-0.6.0/tests/power.rs +58 -0
- flexibility-0.6.0/tests/properties.proptest-regressions +8 -0
- flexibility-0.6.0/tests/properties.rs +512 -0
- flexibility-0.6.0/tests/rebound.rs +231 -0
- flexibility-0.6.0/tests/receipt.rs +158 -0
- flexibility-0.6.0/tests/regressions.rs +597 -0
- flexibility-0.6.0/tests/relative.rs +161 -0
- flexibility-0.6.0/tests/s2.rs +370 -0
- flexibility-0.6.0/tests/security.rs +2704 -0
- flexibility-0.6.0/tests/settle.rs +209 -0
- flexibility-0.6.0/tests/shapes.rs +334 -0
- flexibility-0.6.0/tests/snapshots/dprognosis@1.json +1 -0
- flexibility-0.6.0/tests/snapshots/mbma@1.json +1 -0
- flexibility-0.6.0/tests/snapshots/schedule@1.json +1 -0
- flexibility-0.6.0/tests/snapshots/settlement-mbma@1.json +1 -0
- flexibility-0.6.0/tests/snapshots/xofy@1.json +1 -0
- flexibility-0.6.0/tests/snapshots.rs +99 -0
- flexibility-0.6.0/tests/storage.rs +157 -0
- flexibility-0.6.0/tests/uftp.rs +543 -0
- flexibility-0.6.0/tests/units.rs +127 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes are recorded here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the crate follows
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.6.0] - 2026-12-05
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **The Python package** [`flexibility`](https://pypi.org/project/flexibility/): the crate,
|
|
14
|
+
typed, immutable and free-threaded, with numpy, pandas and Polars frames out, and OpenADR 3,
|
|
15
|
+
S2 and UFTP 3.1 messages in (`flexibility.openadr`, `.s2`, `.uftp`). Every parameter that
|
|
16
|
+
changes a result is required, as in the crate. Wheels for Linux, macOS and Windows on x86-64
|
|
17
|
+
and ARM, CPython 3.11+ and 3.14t, published with attestations. See the
|
|
18
|
+
[Python guide](https://hupe1980.github.io/flexibility/docs/python/).
|
|
19
|
+
- `just python` and `just python-dist`.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- **Breaking:** `openadr` 0.14 (re-exported as `openadr::wire`). A programme in 3.0 form
|
|
24
|
+
(`payloadDescriptors`) is refused when read, naming the 1.1.0 keys; it used to read with no
|
|
25
|
+
descriptors, which `openadr::limits` then refused for want of a unit. A `Timestamp` with a
|
|
26
|
+
fraction of a second no longer serializes; `openadr::event` still refuses such a start first,
|
|
27
|
+
naming the field.
|
|
28
|
+
- **Breaking:** `uftp` 0.4 (re-exported as `uftp::wire`).
|
|
29
|
+
- The repository root is a Cargo workspace (`python` is a member, not published to
|
|
30
|
+
crates.io); the crate and the Python package share `[workspace.package] version`.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- A `ParsePower`, `ParseDigest` or `ParseMethod` error quoted control characters of the text
|
|
35
|
+
it refused as they came; they are escaped, as in every other message that quotes received
|
|
36
|
+
text.
|
|
37
|
+
|
|
38
|
+
## [0.5.0] - 2026-12-03
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **Breaking:** `openadr` 0.13, OpenADR 3 **1.1.0** (re-exported as `openadr::wire`). A
|
|
43
|
+
programme's defaults are its `eventPayloadDescriptors`; a 3.0 `payloadDescriptors` gives none.
|
|
44
|
+
- `openadr::limits` and `openadr::usage` read labelled payloads (`payloadLabel`) as their
|
|
45
|
+
descriptor's type and units; a labelled cap was skipped. Two caps of one type in an interval
|
|
46
|
+
are refused, naming both.
|
|
47
|
+
- `openadr::limits` holds a cap with `randomizeStart` *r* from its start − *r*, as a VEN may
|
|
48
|
+
shift either way; it held only until its end + *r*.
|
|
49
|
+
- `openadr::event` refuses a cap that starts off a whole second; the wire would publish it
|
|
50
|
+
early.
|
|
51
|
+
|
|
52
|
+
## [0.4.0] - 2026-12-01
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- `eebus::write_open`: an LPC or LPP write without a duration, which the device holds until it
|
|
57
|
+
is released or replaced.
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
|
|
61
|
+
- **Breaking:** `eebus::limit` and `eebus::failsafe` take a `Rounding`. `TowardZero` reads an
|
|
62
|
+
acknowledged 4 200.5 W as a 4 200 W cap; `Exact` refuses it, as before.
|
|
63
|
+
- **Breaking:** `s2-kit` 0.8 (re-exported as `s2::wire`) and `cls-eedi` 0.3 (as `cls::wire`).
|
|
64
|
+
|
|
65
|
+
## [0.3.0] - 2026-11-30
|
|
66
|
+
|
|
67
|
+
### Added
|
|
68
|
+
|
|
69
|
+
- `EnergyEnvelope::steady_headroom(&plan, window)`: the range of one constant deviation over a
|
|
70
|
+
window that keeps a plan inside its power and level bounds, level bounds after the window
|
|
71
|
+
included. A pool deviation split in proportion to it fits every device.
|
|
72
|
+
- `MisfitKind`: `Outside`, `Unrequested` and `NotOffered`, for an ISP an offer leaves out where
|
|
73
|
+
the band excludes 0 W (UFTP 3.1 § 3.8.3 allows partial offers).
|
|
74
|
+
- `examples/offer_from_a_pool.rs`.
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
|
|
78
|
+
- **Breaking:** `Misfit` is `{ label, kind, source }`. `DeviationEnvelope::check` takes a
|
|
79
|
+
`Series<Deviation>` or a `Series<Option<Deviation>>`.
|
|
80
|
+
- **Breaking:** `uftp::profile` returns `Series<Option<Deviation>>`, `None` in an ISP between
|
|
81
|
+
named ones; it read as 0 W offered before. `uftp::ordered` is unchanged (0 W there).
|
|
82
|
+
- **Breaking:** `iec60870` 0.3 (re-exported as `iec104::wire`).
|
|
83
|
+
- `Aggregate::Exact` documents that stored energy is checked only as level bounds.
|
|
84
|
+
|
|
85
|
+
## [0.2.0] - 2026-11-29
|
|
86
|
+
|
|
87
|
+
### Changed
|
|
88
|
+
|
|
89
|
+
- **Breaking:** `openadr` 0.11 (re-exported as `openadr::wire`). Decimals on the wire are exact or
|
|
90
|
+
refused, and durations are written as `PT1H`, not `PT3600S`.
|
|
91
|
+
|
|
92
|
+
## [0.1.2] - 2026-11-29
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
|
|
96
|
+
- `openadr::event`: consumption and feed-in caps as the OpenADR 3 event a VTN publishes, in exact
|
|
97
|
+
kW, which `openadr::limits` reads back unchanged, through JSON too.
|
|
98
|
+
|
|
99
|
+
## [0.1.1] - 2026-11-29
|
|
100
|
+
|
|
101
|
+
### Changed
|
|
102
|
+
|
|
103
|
+
- The `canon` module docs and `scripts/digest.sh` describe the digest on its own terms, without
|
|
104
|
+
pointing to an outside specification.
|
|
105
|
+
|
|
106
|
+
## [0.1.0] - 2026-11-29
|
|
107
|
+
|
|
108
|
+
The first release.
|
|
109
|
+
|
|
110
|
+
### Added
|
|
111
|
+
|
|
112
|
+
- **Units.** `Power` (whole watts, consumption positive), `Deviation` and `Energy`
|
|
113
|
+
(watt-seconds), with exact literals (`kw!`, `w!`, `mw!`, `kwh!`, …), text that round-trips, and
|
|
114
|
+
`Rounding` (`Exact`, `HalfAwayFromZero`, `TowardZero`) wherever a division can leave a
|
|
115
|
+
remainder.
|
|
116
|
+
- **Time.** `Grid` of ISPs in a time zone (92, 96 or 100 quarter hours on a Central European day),
|
|
117
|
+
`Window` from local times that refuses skipped and repeated ones, `IspLabel`, `Series`.
|
|
118
|
+
- **Shapes.** `Limit` (caps, floors and bands), `Envelope` with per-bound provenance, `explain` and
|
|
119
|
+
`headroom`, `Guarantee` (the § 14a EnWG minimum), `Schedule`, `DeviationEnvelope` for
|
|
120
|
+
flexibility requests, `EnergyEnvelope` and `Level` for storage, and `pool` to aggregate devices
|
|
121
|
+
and check a split.
|
|
122
|
+
- **Baselines.** `dprognosis@1`, `schedule@1`, `mbma@1` and `xofy@1` (with additive or ratio
|
|
123
|
+
adjustment), each with required parameters and a method card; `accuracy` scores a method.
|
|
124
|
+
- **Settlement.** `settle`, exactly as UFTP 3.1 § 2.6, at a recorded `MeasurementPoint`; a
|
|
125
|
+
canonical text (RFC 8785) and `sha256:` digest; `Settlement::from_canonical` and `diff` to
|
|
126
|
+
compare with the other party; `Settlement::rebound`; `scripts/digest.sh` to recompute a digest
|
|
127
|
+
outside Rust.
|
|
128
|
+
- **Converters**, each a feature: `uftp` (UFTP 3.1), `eebus` (LPC and LPP), `metering` (the § 14a
|
|
129
|
+
minimum and Lastgang energy), `s2` (PEBC and PPBC), `openadr` (OpenADR 3 capacity limits and
|
|
130
|
+
usage), `csip` (CSIP-AUS operating envelopes), `iec104` (IEC 60870-5-104 set points) and `cls`
|
|
131
|
+
(CLS.EEDI control boxes).
|
|
132
|
+
- `Error` with a `hint()` for every refusal. No clock, I/O or floating-point arithmetic. MSRV 1.88
|
|
133
|
+
for every feature.
|
|
134
|
+
|
|
135
|
+
[Unreleased]: https://github.com/hupe1980/flexibility/compare/v0.6.0...HEAD
|
|
136
|
+
[0.6.0]: https://github.com/hupe1980/flexibility/compare/v0.5.0...v0.6.0
|
|
137
|
+
[0.5.0]: https://github.com/hupe1980/flexibility/compare/v0.4.0...v0.5.0
|
|
138
|
+
[0.4.0]: https://github.com/hupe1980/flexibility/compare/v0.3.0...v0.4.0
|
|
139
|
+
[0.3.0]: https://github.com/hupe1980/flexibility/compare/v0.2.0...v0.3.0
|
|
140
|
+
[0.2.0]: https://github.com/hupe1980/flexibility/compare/v0.1.2...v0.2.0
|
|
141
|
+
[0.1.2]: https://github.com/hupe1980/flexibility/compare/v0.1.1...v0.1.2
|
|
142
|
+
[0.1.1]: https://github.com/hupe1980/flexibility/compare/v0.1.0...v0.1.1
|
|
143
|
+
[0.1.0]: https://github.com/hupe1980/flexibility/releases/tag/v0.1.0
|