gerrytools 2.0.0__tar.gz → 2.0.1__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 (177) hide show
  1. {gerrytools-2.0.0 → gerrytools-2.0.1}/PKG-INFO +1 -1
  2. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/ben/__init__.py +4 -4
  3. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/ben/recorded_chain.py +17 -16
  4. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/mgrp/__init__.py +15 -15
  5. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/mgrp/constraints.py +2 -2
  6. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/mgrp/objectives.py +3 -3
  7. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/mgrp/run_config.py +1 -1
  8. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/mgrp/run_container.py +75 -75
  9. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/mgrp/runners/forest.py +41 -41
  10. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/mgrp/runners/recom.py +110 -110
  11. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/mgrp/runners/smc.py +33 -33
  12. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/__init__.py +2 -2
  13. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/_manifest.py +6 -4
  14. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/evaluator.py +29 -28
  15. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/result.py +80 -31
  16. {gerrytools-2.0.0 → gerrytools-2.0.1}/pyproject.toml +1 -1
  17. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/README.md +7 -47
  18. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/cut_edges.rs +2 -2
  19. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/scoring/stream.rs +3 -3
  20. {gerrytools-2.0.0 → gerrytools-2.0.1}/LICENSE +0 -0
  21. {gerrytools-2.0.0 → gerrytools-2.0.1}/README.md +0 -0
  22. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/__init__.py +0 -0
  23. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/_election_math.py +0 -0
  24. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/_geodataframe.py +0 -0
  25. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/_geometry.py +0 -0
  26. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/_ipython.py +0 -0
  27. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/_partisan_math.py +0 -0
  28. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/_scoring_engine.pyi +0 -0
  29. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/ben/_graph_prep.py +0 -0
  30. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/colors/__init__.py +0 -0
  31. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/colors/_latex_table.py +0 -0
  32. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/colors/_sources.py +0 -0
  33. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/colors/_value.py +0 -0
  34. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/colors/core.py +0 -0
  35. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/colors/districtr.py +0 -0
  36. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/colors/latex.py +0 -0
  37. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/colors/seaborn.py +0 -0
  38. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/colors/utils.py +0 -0
  39. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/data/__init__.py +0 -0
  40. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/data/_geometry_etags.py +0 -0
  41. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/data/geometries.py +0 -0
  42. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/data/uscensus/__init__.py +0 -0
  43. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/data/uscensus/_api.py +0 -0
  44. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/data/uscensus/acs.py +0 -0
  45. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/data/uscensus/block_cvap.py +0 -0
  46. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/data/uscensus/census.py +0 -0
  47. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/data/uscensus/census_tables.py +0 -0
  48. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/data/uscensus/ptable_column_aliases.py +0 -0
  49. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/__init__.py +0 -0
  50. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/_colors.py +0 -0
  51. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/_render.py +0 -0
  52. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/_table_base.py +0 -0
  53. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/_table_layout.py +0 -0
  54. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/_table_options.py +0 -0
  55. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/_table_preamble.py +0 -0
  56. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/_text.py +0 -0
  57. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/_tikz_plot_base.py +0 -0
  58. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/commands.py +0 -0
  59. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/document.py +0 -0
  60. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/formatters.py +0 -0
  61. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/paintball.py +0 -0
  62. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/seatsvotes.py +0 -0
  63. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/table.py +0 -0
  64. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/latex/tikz_table.py +0 -0
  65. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/logging.py +0 -0
  66. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/mgrp/runners/__init__.py +0 -0
  67. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plan_comparison/__init__.py +0 -0
  68. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plan_comparison/overlap.py +0 -0
  69. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plan_comparison/relabel.py +0 -0
  70. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/__init__.py +0 -0
  71. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/_artist_registry.py +0 -0
  72. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/_axes_backed.py +0 -0
  73. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/_axes_state.py +0 -0
  74. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/_figure_io.py +0 -0
  75. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/_legend_mixin.py +0 -0
  76. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/_legend_utils.py +0 -0
  77. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/_rng.py +0 -0
  78. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/__init__.py +0 -0
  79. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/_annotation_api.py +0 -0
  80. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/_annotations.py +0 -0
  81. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/_arrow_renderer.py +0 -0
  82. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/_axis_api.py +0 -0
  83. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/_categorical_distribution_base.py +0 -0
  84. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/_gerryplot_dataclasses.py +0 -0
  85. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/_unit_square_base.py +0 -0
  86. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/barplot.py +0 -0
  87. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/boxplot.py +0 -0
  88. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/gerryplot.py +0 -0
  89. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/histogram.py +0 -0
  90. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/options.py +0 -0
  91. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/paintball.py +0 -0
  92. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/scatterplot.py +0 -0
  93. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/sealevel.py +0 -0
  94. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/seatsvotes.py +0 -0
  95. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/data/violin.py +0 -0
  96. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/geometry/__init__.py +0 -0
  97. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/geometry/_dot_sampling.py +0 -0
  98. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/geometry/_labels.py +0 -0
  99. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/geometry/_layers/__init__.py +0 -0
  100. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/geometry/_layers/_base.py +0 -0
  101. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/geometry/_layers/_categorical.py +0 -0
  102. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/geometry/_layers/_continuous.py +0 -0
  103. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/geometry/_layers/_marker.py +0 -0
  104. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/geometry/dotdensity.py +0 -0
  105. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/geometry/geoplot.py +0 -0
  106. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/geometry/geoplotbase.py +0 -0
  107. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/mpl/__init__.py +0 -0
  108. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/mpl/axis_title_style.py +0 -0
  109. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/mpl/geoplot_options.py +0 -0
  110. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/mpl/label_text_options.py +0 -0
  111. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/mpl/legend_options.py +0 -0
  112. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/mpl/marker_options.py +0 -0
  113. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/mpl/tick_style.py +0 -0
  114. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/other/__init__.py +0 -0
  115. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/other/subway.py +0 -0
  116. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/plan/__init__.py +0 -0
  117. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/plan/drawgraph.py +0 -0
  118. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/plotting/utils.py +0 -0
  119. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/py.typed +0 -0
  120. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/_types.py +0 -0
  121. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/formulas.py +0 -0
  122. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/metrics/__init__.py +0 -0
  123. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/metrics/_base.py +0 -0
  124. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/metrics/_geometry.py +0 -0
  125. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/single_plan/__init__.py +0 -0
  126. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/single_plan/_base.py +0 -0
  127. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/scoring/single_plan/_geometry.py +0 -0
  128. {gerrytools-2.0.0 → gerrytools-2.0.1}/gerrytools/typing.py +0 -0
  129. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/Cargo.lock +0 -0
  130. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/Cargo.toml +0 -0
  131. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/adjacency.rs +0 -0
  132. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/error.rs +0 -0
  133. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/geometry/mod.rs +0 -0
  134. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/geometry/precise_area.rs +0 -0
  135. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/geometry/unit_hulls.rs +0 -0
  136. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/lib.rs +0 -0
  137. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/area_perimeter.rs +0 -0
  138. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/convex_hull_ratio.rs +0 -0
  139. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/formulas.rs +0 -0
  140. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/hull_metric.rs +0 -0
  141. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/mod.rs +0 -0
  142. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/polsby_popper.rs +0 -0
  143. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/population_polygon.rs +0 -0
  144. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/region.rs +0 -0
  145. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/region_parts.rs +0 -0
  146. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/region_tally.rs +0 -0
  147. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/reock.rs +0 -0
  148. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/schwartzberg.rs +0 -0
  149. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/state_clipped_convex_hull_ratio.rs +0 -0
  150. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/metrics/tally.rs +0 -0
  151. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/python.rs +0 -0
  152. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/scoring/delta.rs +0 -0
  153. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/scoring/district.rs +0 -0
  154. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/scoring/input.rs +0 -0
  155. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/scoring/mod.rs +0 -0
  156. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/scoring/output.rs +0 -0
  157. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/scoring/result.rs +0 -0
  158. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/scoring/uniqueness.rs +0 -0
  159. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/convex_hull_ratio.rs +0 -0
  160. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/cut_edges.rs +0 -0
  161. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/district.rs +0 -0
  162. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/formulas.rs +0 -0
  163. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/geometry.rs +0 -0
  164. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/input.rs +0 -0
  165. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/output.rs +0 -0
  166. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/polsby_popper.rs +0 -0
  167. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/population_polygon.rs +0 -0
  168. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/region.rs +0 -0
  169. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/region_tally.rs +0 -0
  170. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/reock.rs +0 -0
  171. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/schwartzberg.rs +0 -0
  172. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/state_clipped_convex_hull_ratio.rs +0 -0
  173. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/stream.rs +0 -0
  174. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/support.rs +0 -0
  175. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/tally.rs +0 -0
  176. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/twodelta.rs +0 -0
  177. {gerrytools-2.0.0 → gerrytools-2.0.1}/rust/src/tests/unit_hulls.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gerrytools
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.11
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -14,12 +14,12 @@ import pandas as pd
14
14
  from binary_ensemble import BendlDecoder, BendlEncoder
15
15
 
16
16
  from .recorded_chain import (
17
+ EncodingVariant,
17
18
  GraphOrder,
18
19
  GraphOrderName,
19
20
  RecordedChain,
21
+ RecordedChainIterator,
20
22
  RecordedRun,
21
- RunIterator,
22
- Variant,
23
23
  )
24
24
 
25
25
 
@@ -63,12 +63,12 @@ def read_geoparquet_asset(
63
63
  __all__ = [
64
64
  "BendlDecoder",
65
65
  "BendlEncoder",
66
+ "EncodingVariant",
66
67
  "GraphOrder",
67
68
  "GraphOrderName",
68
69
  "RecordedChain",
70
+ "RecordedChainIterator",
69
71
  "RecordedRun",
70
- "RunIterator",
71
72
  "read_geoparquet_asset",
72
73
  "read_parquet_asset",
73
- "Variant",
74
74
  ]
@@ -37,7 +37,7 @@ from ._graph_prep import (
37
37
  _source_graph,
38
38
  )
39
39
 
40
- Variant = Literal["standard", "mkv_chain", "twodelta"]
40
+ EncodingVariant = Literal["standard", "mkv_chain", "twodelta"]
41
41
 
42
42
  # Filesystems without hard-link support (exFAT, some network mounts) surface one of these.
43
43
  _HARD_LINK_UNSUPPORTED_ERRNOS = frozenset(
@@ -45,7 +45,7 @@ _HARD_LINK_UNSUPPORTED_ERRNOS = frozenset(
45
45
  )
46
46
 
47
47
 
48
- class RunIterator(Iterator[Partition], Protocol):
48
+ class RecordedChainIterator(Iterator[Partition], Protocol):
49
49
  """Run iterator that, like a generator, can also be closed early."""
50
50
 
51
51
  def close(self) -> None:
@@ -84,7 +84,7 @@ class _BendlTransaction:
84
84
  graph_order: GraphOrder,
85
85
  graph_order_key: str | None,
86
86
  metadata: dict[str, Any] | list[Any] | None,
87
- variant: Variant,
87
+ variant: EncodingVariant,
88
88
  ) -> None:
89
89
  self._output_path = output_path
90
90
  self._source_graph = source_graph
@@ -92,7 +92,7 @@ class _BendlTransaction:
92
92
  self._graph_order: GraphOrder = graph_order
93
93
  self._graph_order_key = graph_order_key
94
94
  self._metadata = metadata
95
- self._variant: Variant = variant
95
+ self._variant: EncodingVariant = variant
96
96
  self.temporary_directory = Path(
97
97
  tempfile.mkdtemp(prefix=f".{output_path.name}.", dir=output_path.parent)
98
98
  )
@@ -616,7 +616,7 @@ class RecordedChain(MarkovChain):
616
616
  "_variant",
617
617
  )
618
618
  _graph_order: GraphOrder
619
- _variant: Variant
619
+ _variant: EncodingVariant
620
620
 
621
621
  def __init__(
622
622
  self,
@@ -625,10 +625,10 @@ class RecordedChain(MarkovChain):
625
625
  output_path: str | os.PathLike[str],
626
626
  total_steps: int | None = None,
627
627
  rng: Any = None,
628
- graph_order: GraphOrder = "mlc",
628
+ graph_order: GraphOrder = None,
629
629
  graph_order_key: str | None = None,
630
630
  metadata: dict[str, Any] | list[Any] | None = None,
631
- variant: Variant = "twodelta",
631
+ variant: EncodingVariant = "twodelta",
632
632
  ) -> None:
633
633
  """Initialize a RecordedChain.
634
634
 
@@ -646,12 +646,12 @@ class RecordedChain(MarkovChain):
646
646
  graph_order (GraphOrder): Node reordering applied before encoding: ``"mlc"`` (the
647
647
  default), ``"rcm"``, ``"key"`` (sort by the ``graph_order_key`` node attribute),
648
648
  or ``None`` to keep the input order. Reordering improves compression; the
649
- permutation back to the source order is stored in the file.
649
+ permutation back to the source order is stored in the file. Defaults to None.
650
650
  graph_order_key (str | None): Node attribute to sort by; required exactly when
651
651
  ``graph_order="key"``.
652
652
  metadata (dict[str, Any] | list[Any] | None, optional): JSON-serializable metadata
653
653
  embedded in the bundle. Defaults to None.
654
- variant (Variant): Assignment-stream encoding: ``"twodelta"`` (the default),
654
+ variant (EncodingVariant): Assignment-stream encoding: ``"twodelta"`` (the default),
655
655
  ``"mkv_chain"``, or ``"standard"``.
656
656
 
657
657
  Raises:
@@ -664,7 +664,7 @@ class RecordedChain(MarkovChain):
664
664
  raise ValueError("graph_order must be 'mlc', 'rcm', 'key', or None")
665
665
  if (graph_order == "key") != (graph_order_key is not None):
666
666
  raise ValueError("graph_order_key is required only when graph_order='key'")
667
- if variant not in get_args(Variant):
667
+ if variant not in get_args(EncodingVariant):
668
668
  raise ValueError("variant must be 'standard', 'mkv_chain', or 'twodelta'")
669
669
  if metadata is not None and not isinstance(metadata, (dict, list)):
670
670
  raise TypeError("metadata must be a dict, list, or None")
@@ -718,7 +718,7 @@ class RecordedChain(MarkovChain):
718
718
  return copy.deepcopy(self._metadata)
719
719
 
720
720
  @property
721
- def variant(self) -> Variant:
721
+ def variant(self) -> EncodingVariant:
722
722
  """Assignment-stream encoding variant written by runs."""
723
723
  return self._variant
724
724
 
@@ -742,20 +742,21 @@ class RecordedChain(MarkovChain):
742
742
  raise RuntimeError("recording is unavailable before a successful recording")
743
743
  return self._recording
744
744
 
745
- def __iter__(self) -> RunIterator:
745
+ def __iter__(self) -> RecordedChainIterator:
746
746
  """Return the single-use run iterator; the destination file must not already exist."""
747
- return cast(RunIterator, self._record(overwrite=False))
747
+ return cast(RecordedChainIterator, self._record(overwrite=False))
748
748
 
749
- def allow_overwrite(self) -> RunIterator:
749
+ def allow_overwrite(self) -> RecordedChainIterator:
750
750
  """Return one run iterator authorized to replace the destination file.
751
751
 
752
752
  The replacement is atomic: the new recording is finalized in a temporary location and
753
753
  moved over ``output_path`` only on clean completion.
754
754
 
755
755
  Returns:
756
- RunIterator: Single-use iterator that records the run and may replace the output file.
756
+ RecordedChainIterator: Single-use iterator that records the run and may replace the
757
+ output file.
757
758
  """
758
- return cast(RunIterator, self._record(overwrite=True))
759
+ return cast(RecordedChainIterator, self._record(overwrite=True))
759
760
 
760
761
  def _publish_run(
761
762
  self,
@@ -1,5 +1,5 @@
1
1
  try:
2
- from .run_container import RunContainer, RunInfo, RunnerConfig, SupportsUpdaters
2
+ from .run_container import RunnerConfig, RunnerSession, RunSpec, SupportsUpdaters
3
3
  except ModuleNotFoundError as e:
4
4
  if e.name and e.name.split(".")[0] == "docker":
5
5
  raise ModuleNotFoundError(
@@ -9,30 +9,30 @@ except ModuleNotFoundError as e:
9
9
  raise
10
10
  from .constraints import Constraints
11
11
  from .objectives import Objective
12
- from .runners.forest import ForestRunInfo, ForestRunnerConfig
12
+ from .runners.forest import ForestRunnerConfig, ForestRunSpec
13
13
  from .runners.recom import (
14
- OptimizerRunInfoBase,
15
- RecomRunInfo,
14
+ OptimizerRunSpecBase,
16
15
  RecomRunnerConfig,
17
- ShortBurstsRunInfo,
18
- TiltedRunInfo,
16
+ RecomRunSpec,
17
+ ShortBurstsRunSpec,
18
+ TiltedRunSpec,
19
19
  )
20
- from .runners.smc import SMCRunInfo, SMCRunnerConfig
20
+ from .runners.smc import SMCRunnerConfig, SMCRunSpec
21
21
 
22
22
  __all__ = [
23
23
  "Constraints",
24
24
  "Objective",
25
25
  "RecomRunnerConfig",
26
- "RecomRunInfo",
27
- "OptimizerRunInfoBase",
28
- "ShortBurstsRunInfo",
29
- "TiltedRunInfo",
26
+ "RecomRunSpec",
27
+ "OptimizerRunSpecBase",
28
+ "ShortBurstsRunSpec",
29
+ "TiltedRunSpec",
30
30
  "ForestRunnerConfig",
31
- "ForestRunInfo",
31
+ "ForestRunSpec",
32
32
  "SMCRunnerConfig",
33
- "SMCRunInfo",
34
- "RunContainer",
33
+ "SMCRunSpec",
34
+ "RunnerSession",
35
35
  "RunnerConfig",
36
- "RunInfo",
36
+ "RunSpec",
37
37
  "SupportsUpdaters",
38
38
  ]
@@ -306,7 +306,7 @@ class Constraints:
306
306
  strength (float): Coefficient multiplying the penalty statistic.
307
307
  group_pop_col (str): Map column containing the focal-group population.
308
308
  total_pop_col (str | None, optional): Denominator population column. If ``None``,
309
- ``redist`` uses the population column supplied through ``SMCRunInfo.pop_col``.
309
+ ``redist`` uses the population column supplied through ``SMCRunSpec.pop_col``.
310
310
  Defaults to None.
311
311
  targets (Sequence[float], optional): Nonempty target-share sequence. Values should be
312
312
  finite and in ``[0, 1]``. Defaults to ``(0.55,)``.
@@ -674,7 +674,7 @@ def validate_constraint_spec(value: object) -> ConstraintSpec:
674
674
  return cast(ConstraintSpec, spec)
675
675
 
676
676
 
677
- # Accepted constraint input forms for each RunInfo dataclass.
677
+ # Accepted constraint input forms for each RunSpec dataclass.
678
678
  ConstraintsLike = Constraints | Sequence[ConstraintSpec] | ConstraintSpec | None
679
679
 
680
680
 
@@ -7,16 +7,16 @@ constructed without memorizing the JSON schema; each builder returns a plain dic
7
7
  spec dicts remain interchangeable with builder output.
8
8
 
9
9
  Every run needs exactly one objective, passed as the ``objective`` argument of
10
- :class:`~gerrytools.mgrp.ShortBurstsRunInfo` or :class:`~gerrytools.mgrp.TiltedRunInfo`. Whether
10
+ :class:`~gerrytools.mgrp.ShortBurstsRunSpec` or :class:`~gerrytools.mgrp.TiltedRunSpec`. Whether
11
11
  the optimizer drives the score up or down is controlled by the run's ``maximize`` flag, not by the
12
12
  objective itself: for example, ``by_district_abs_deviation`` measures a distance and is normally
13
13
  *minimized*, while ``gingles_partial`` counts districts and is normally *maximized*.
14
14
 
15
15
  Example::
16
16
 
17
- from gerrytools.mgrp import Objective, ShortBurstsRunInfo
17
+ from gerrytools.mgrp import Objective, ShortBurstsRunSpec
18
18
 
19
- run_info = ShortBurstsRunInfo(
19
+ run_spec = ShortBurstsRunSpec(
20
20
  pop_col="TOTPOP",
21
21
  assignment_col="CD",
22
22
  objective=Objective.gingles_partial(
@@ -155,7 +155,7 @@ class EngineRunConfig(TypedDict):
155
155
 
156
156
 
157
157
  NOT_ENGINE_CONFIG = {"engine_config": False}
158
- """Field metadata excluding a run-info field from the config's ``run`` section, either because
158
+ """Field metadata excluding a run-spec field from the config's ``run`` section, either because
159
159
  it is Python-side only (updaters, output naming) or because it is marshaled into another
160
160
  section (``io``, ``map``, ``constraints``)."""
161
161