microgrid 0.1.0__tar.gz → 0.1.2__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 (136) hide show
  1. {microgrid-0.1.0 → microgrid-0.1.2}/CHANGELOG.md +16 -0
  2. {microgrid-0.1.0 → microgrid-0.1.2}/PKG-INFO +7 -9
  3. {microgrid-0.1.0 → microgrid-0.1.2}/README.md +5 -7
  4. {microgrid-0.1.0 → microgrid-0.1.2}/pyproject.toml +2 -2
  5. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/__init__.py +2 -3
  6. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/__init__.py +1 -3
  7. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/plant/__init__.py +2 -2
  8. {microgrid-0.1.0 → microgrid-0.1.2}/.gitignore +0 -0
  9. {microgrid-0.1.0 → microgrid-0.1.2}/LICENSE +0 -0
  10. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/engine.toml +0 -0
  11. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/expected/ledger-2026-10-21.txt +0 -0
  12. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/expected/live-2026-10-25.txt +0 -0
  13. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/expected/replay-2026-10-22.txt +0 -0
  14. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/expected/value-2026-10-22T13-03.txt +0 -0
  15. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/expected/value-2026-10-25T02-30.txt +0 -0
  16. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/forecasts/load_forecast.json +0 -0
  17. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/forecasts/prices.json +0 -0
  18. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/forecasts/pv_forecast.json +0 -0
  19. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/manifest.json +0 -0
  20. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/plant.toml +0 -0
  21. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/series/battery.json +0 -0
  22. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/series/battery_first.json +0 -0
  23. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/series/export_price.json +0 -0
  24. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/series/grid.json +0 -0
  25. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/series/heartbeat.json +0 -0
  26. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/series/house.json +0 -0
  27. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/series/import_price.json +0 -0
  28. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/series/inverter.json +0 -0
  29. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/series/pv.json +0 -0
  30. {microgrid-0.1.0 → microgrid-0.1.2}/examples/dataset/series/soc.json +0 -0
  31. {microgrid-0.1.0 → microgrid-0.1.2}/scripts/ci_local.sh +0 -0
  32. {microgrid-0.1.0 → microgrid-0.1.2}/scripts/griffe_microgrid.py +0 -0
  33. {microgrid-0.1.0 → microgrid-0.1.2}/scripts/install-hooks.sh +0 -0
  34. {microgrid-0.1.0 → microgrid-0.1.2}/scripts/make_example_dataset.py +0 -0
  35. {microgrid-0.1.0 → microgrid-0.1.2}/scripts/make_expected_outputs.py +0 -0
  36. {microgrid-0.1.0 → microgrid-0.1.2}/scripts/mkdocs_hooks.py +0 -0
  37. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/_checks.py +0 -0
  38. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/__init__.py +0 -0
  39. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/check_plant.py +0 -0
  40. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/dataset.py +0 -0
  41. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/evaluation.py +0 -0
  42. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/fit_battery.py +0 -0
  43. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/history.py +0 -0
  44. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/inputs.py +0 -0
  45. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/main.py +0 -0
  46. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/offline.py +0 -0
  47. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/replay.py +0 -0
  48. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/sources/__init__.py +0 -0
  49. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/sources/config.py +0 -0
  50. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/sources/emhass.py +0 -0
  51. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/sources/entity.py +0 -0
  52. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/sources/fetch.py +0 -0
  53. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/sources/home_assistant.py +0 -0
  54. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/sources/predbat.py +0 -0
  55. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/sources/read.py +0 -0
  56. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/sources/solcast.py +0 -0
  57. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/sources/tariffkit.py +0 -0
  58. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/cli/toml_text.py +0 -0
  59. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/_api.py +0 -0
  60. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/_assess.py +0 -0
  61. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/_engine_config.py +0 -0
  62. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/_inputs.py +0 -0
  63. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/_live.py +0 -0
  64. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/_stored.py +0 -0
  65. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/_supply.py +0 -0
  66. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/_surplus.py +0 -0
  67. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/_timeline.py +0 -0
  68. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/_value.py +0 -0
  69. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/analysis/__init__.py +0 -0
  70. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/analysis/ground_truth.py +0 -0
  71. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/analysis/scoring.py +0 -0
  72. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/extend.py +0 -0
  73. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/ledger.py +0 -0
  74. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/py.typed +0 -0
  75. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/schemas/valuation-2.schema.json +0 -0
  76. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/series.py +0 -0
  77. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/testing.py +0 -0
  78. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/engine/units.py +0 -0
  79. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/plant/_battery.py +0 -0
  80. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/plant/_config.py +0 -0
  81. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/plant/_meters.py +0 -0
  82. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/plant/_paths.py +0 -0
  83. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/plant/_plant.py +0 -0
  84. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/plant/examples.py +0 -0
  85. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/plant/flows.py +0 -0
  86. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/plant/port.py +0 -0
  87. {microgrid-0.1.0 → microgrid-0.1.2}/src/microgrid/py.typed +0 -0
  88. {microgrid-0.1.0 → microgrid-0.1.2}/tests/architecture.py +0 -0
  89. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/makeup/engine.toml +0 -0
  90. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/makeup/live-2026-10-25.txt +0 -0
  91. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/makeup/replay-2026-10-22.txt +0 -0
  92. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/makeup/value-2026-10-22T13-03.txt +0 -0
  93. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/makeup/value-2026-10-25T02-30.txt +0 -0
  94. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/test_dataset.py +0 -0
  95. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/test_end_to_end.py +0 -0
  96. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/test_evaluation_properties.py +0 -0
  97. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/test_fit_battery.py +0 -0
  98. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/test_history.py +0 -0
  99. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/test_main.py +0 -0
  100. {microgrid-0.1.0 → microgrid-0.1.2}/tests/cli/test_sources.py +0 -0
  101. {microgrid-0.1.0 → microgrid-0.1.2}/tests/engine_fixtures.py +0 -0
  102. {microgrid-0.1.0 → microgrid-0.1.2}/tests/legacy_dispatch.py +0 -0
  103. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_api.py +0 -0
  104. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_architecture.py +0 -0
  105. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_assess.py +0 -0
  106. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_by_source.py +0 -0
  107. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_config.py +0 -0
  108. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_dc_loads.py +0 -0
  109. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_dispatch_parts.py +0 -0
  110. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_engine_config.py +0 -0
  111. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_examples.py +0 -0
  112. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_ground_truth.py +0 -0
  113. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_inputs.py +0 -0
  114. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_internals.py +0 -0
  115. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_ledger.py +0 -0
  116. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_ledger_properties.py +0 -0
  117. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_limits.py +0 -0
  118. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_live_core.py +0 -0
  119. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_meters.py +0 -0
  120. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_models.py +0 -0
  121. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_outputs.py +0 -0
  122. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_paths.py +0 -0
  123. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_plant.py +0 -0
  124. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_plant_properties.py +0 -0
  125. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_port.py +0 -0
  126. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_projection.py +0 -0
  127. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_pv_per_array.py +0 -0
  128. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_rule_on_port.py +0 -0
  129. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_scoring.py +0 -0
  130. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_series.py +0 -0
  131. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_stored_cost.py +0 -0
  132. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_supply_properties.py +0 -0
  133. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_timeline_properties.py +0 -0
  134. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_units.py +0 -0
  135. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_value.py +0 -0
  136. {microgrid-0.1.0 → microgrid-0.1.2}/tests/test_without_battery_or_pv.py +0 -0
@@ -4,6 +4,22 @@ Each user-visible change, under the release it ships in.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.1.2] - 2026-10-18
8
+
9
+ ### Fixed (documentation)
10
+
11
+ - The documentation's home page: *What makes it different* is *How it prices*; the
12
+ parts name `microgrid.plant`, the plant model, apart from `microgrid.engine`; the
13
+ line saying to install from the git repository is gone (it is on PyPI).
14
+
15
+ ## [0.1.1] - 2026-10-18
16
+
17
+ ### Changed (documentation)
18
+
19
+ - The README, the documentation's home page and the package's summary say what the
20
+ library takes and returns, without the "data in, data out" slogan; why it does no I/O
21
+ is in *Scope* (`docs/methodology/scope.md`).
22
+
7
23
  ## [0.1.0] - 2026-10-18
8
24
 
9
25
  The first version, under the MIT license.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: microgrid
3
- Version: 0.1.0
4
- Summary: A plant model and marginal energy prices for a solar + battery microgrid: data in, data out
3
+ Version: 0.1.2
4
+ Summary: A plant model and marginal energy prices for a solar + battery microgrid
5
5
  Project-URL: Homepage, https://github.com/eman/microgrid
6
6
  Project-URL: Documentation, https://eman.github.io/microgrid/
7
7
  Project-URL: Source, https://github.com/eman/microgrid
@@ -33,12 +33,10 @@ produces **marginal energy prices** from it (`microgrid.engine`): what one more
33
33
  costs, slot by slot over a horizon, and the value of energy by source. The plant model
34
34
  also stands alone, without the price code.
35
35
 
36
- - **Data in, data out.** No I/O: a client hands in the plant's configuration
37
- (`plant/2`) and its inputs as time series (prices, PV and load forecasts, the
38
- meters), and gets prices, regimes, certainties and surplus back.
39
- - **The plant model** takes its topology as configuration: PV of either coupling,
40
- a battery on its own inverter or on a hybrid's DC bus, loads on either bus, the
41
- grid's limits and charge windows.
36
+ You describe the plant (`plant/2`: PV of either coupling, a battery on its own inverter
37
+ or on a hybrid's DC bus, loads on either bus, the grid's limits and charge windows) and
38
+ give it its inputs as time series (prices, PV and load forecasts, the meters); it returns
39
+ prices, regimes, certainties and surplus for each slot.
42
40
 
43
41
  The documentation is in [`docs/`](https://github.com/eman/microgrid/blob/main/docs/index.md),
44
42
  published with each release at `https://eman.github.io/microgrid/`:
@@ -59,7 +57,7 @@ model: pin the minor release you tested with (`microgrid ~= 0.1.0`,
59
57
 
60
58
  `microgrid` (`microgrid.cli`, installed with the library) runs it on a dataset
61
59
  (`dataset/1`: a directory of series and the plant's and engine's files), so it needs no
62
- plant at hand. `microgrid.cli` reads the files; the engine still does no I/O. The example
60
+ plant at hand. The example
63
61
  dataset (`examples/dataset`) is one synthetic week of the library's example plant in
64
62
  Europe/Berlin, the DST change on 2026-10-25 inside it:
65
63
 
@@ -5,12 +5,10 @@ produces **marginal energy prices** from it (`microgrid.engine`): what one more
5
5
  costs, slot by slot over a horizon, and the value of energy by source. The plant model
6
6
  also stands alone, without the price code.
7
7
 
8
- - **Data in, data out.** No I/O: a client hands in the plant's configuration
9
- (`plant/2`) and its inputs as time series (prices, PV and load forecasts, the
10
- meters), and gets prices, regimes, certainties and surplus back.
11
- - **The plant model** takes its topology as configuration: PV of either coupling,
12
- a battery on its own inverter or on a hybrid's DC bus, loads on either bus, the
13
- grid's limits and charge windows.
8
+ You describe the plant (`plant/2`: PV of either coupling, a battery on its own inverter
9
+ or on a hybrid's DC bus, loads on either bus, the grid's limits and charge windows) and
10
+ give it its inputs as time series (prices, PV and load forecasts, the meters); it returns
11
+ prices, regimes, certainties and surplus for each slot.
14
12
 
15
13
  The documentation is in [`docs/`](https://github.com/eman/microgrid/blob/main/docs/index.md),
16
14
  published with each release at `https://eman.github.io/microgrid/`:
@@ -31,7 +29,7 @@ model: pin the minor release you tested with (`microgrid ~= 0.1.0`,
31
29
 
32
30
  `microgrid` (`microgrid.cli`, installed with the library) runs it on a dataset
33
31
  (`dataset/1`: a directory of series and the plant's and engine's files), so it needs no
34
- plant at hand. `microgrid.cli` reads the files; the engine still does no I/O. The example
32
+ plant at hand. The example
35
33
  dataset (`examples/dataset`) is one synthetic week of the library's example plant in
36
34
  Europe/Berlin, the DST change on 2026-10-25 inside it:
37
35
 
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "microgrid"
7
- version = "0.1.0"
8
- description = "A plant model and marginal energy prices for a solar + battery microgrid: data in, data out"
7
+ version = "0.1.2"
8
+ description = "A plant model and marginal energy prices for a solar + battery microgrid"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.14"
11
11
  license = "MIT"
@@ -1,9 +1,8 @@
1
1
  """microgrid: a solar + battery plant modelled, and its marginal energy prices.
2
2
 
3
3
  - :mod:`microgrid.plant`: the plant model and its simulator, on their own: a plant
4
- described as data (``plant/2``), projected slot by slot. No I/O.
5
- - :mod:`microgrid.engine`: the marginal prices, a client of the plant model. Data in,
6
- data out: no I/O.
4
+ described as data (``plant/2``), projected slot by slot.
5
+ - :mod:`microgrid.engine`: the marginal prices, a client of the plant model.
7
6
  - :mod:`microgrid.cli`: the ``microgrid`` command, the library run on a dataset's files
8
7
  (``dataset/1``) or on a site's live sources (``sources/1``, the ``sources`` extra). A
9
8
  client of the public names, as any other.
@@ -1,8 +1,6 @@
1
1
  """The microgrid engine: the model that values energy by time and source.
2
2
 
3
- Pure: no I/O, no network, no wire format. Clients (the CLI, a
4
- service, scripts) hand it data and get data back; it has
5
- no dependencies. The contract is what this module
3
+ It has no dependencies. The contract is what this module
6
4
  exports; every other module (``_value``, ``plant._paths``, ...) is private.
7
5
 
8
6
  engine = Engine(EngineConfig(plant=plant.Plant(plant.PlantConfig(tz=..., pv=..., ...))))
@@ -1,7 +1,7 @@
1
1
  """The plant model and its simulator, on their own (``microgrid.plant``).
2
2
 
3
- A plant is described by a :class:`PlantConfig` (``plant/2``), given as data: the model
4
- does no I/O to receive it. :class:`Plant` is that plant behind the port
3
+ A plant is described by a :class:`PlantConfig` (``plant/2``), given as data.
4
+ :class:`Plant` is that plant behind the port
5
5
  (:class:`~microgrid.plant.port.PlantModel`): one configurable model, not one class per
6
6
  topology, running every configuration through one dispatch. ``Plant.project`` projects
7
7
  the slots it is given from a state of charge, PV and load, and returns their flows
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