pysuto 0.1.0rc1__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.
- pysuto-0.1.0rc1/.git_archival.txt +4 -0
- pysuto-0.1.0rc1/.gitattributes +1 -0
- pysuto-0.1.0rc1/.githooks/commit-msg +20 -0
- pysuto-0.1.0rc1/.githooks/pre-commit +20 -0
- pysuto-0.1.0rc1/.gitignore +49 -0
- pysuto-0.1.0rc1/CITATION.cff +23 -0
- pysuto-0.1.0rc1/GLOSSARY.md +1435 -0
- pysuto-0.1.0rc1/LICENSE +21 -0
- pysuto-0.1.0rc1/LICENSE-DATA +21 -0
- pysuto-0.1.0rc1/PKG-INFO +74 -0
- pysuto-0.1.0rc1/README.md +1492 -0
- pysuto-0.1.0rc1/README_PYPI.md +26 -0
- pysuto-0.1.0rc1/config/config.yaml +2 -0
- pysuto-0.1.0rc1/docs/adr/0001-replace-coherence-sum-eq-with-bilateral-anchoring.md +19 -0
- pysuto-0.1.0rc1/docs/adr/0002-single-endpoint-rows-fan-out-not-replicate.md +112 -0
- pysuto-0.1.0rc1/docs/adr/0003-row-geographic-pedigree-penalty.md +20 -0
- pysuto-0.1.0rc1/docs/adr/0004-process-recipe-traversal-imputer.md +113 -0
- pysuto-0.1.0rc1/docs/adr/0005-pool-scrap-into-eff-constraint-and-stripping-ratio.md +88 -0
- pysuto-0.1.0rc1/docs/adr/0006-scale-total-supersedes-external-control-total.md +61 -0
- pysuto-0.1.0rc1/docs/adr/0007-downstream-psut-piot-follows-piolab-suh-no-external-io-lib.md +42 -0
- pysuto-0.1.0rc1/docs/adr/0008-unweighted-fans-are-not-distributed.md +65 -0
- pysuto-0.1.0rc1/docs/adr/0009-warm-start-prior-chain.md +54 -0
- pysuto-0.1.0rc1/docs/adr/0010-trade-first-seeding-of-bilateral-flow-process-inputs.md +177 -0
- pysuto-0.1.0rc1/docs/adr/0011-one-edge-relation-shared-across-imputation-and-constraints.md +94 -0
- pysuto-0.1.0rc1/docs/adr/0012-scrap-one-mixed-grade-commodity.md +64 -0
- pysuto-0.1.0rc1/docs/adr/0013-no-data-flat-prior-anchor.md +115 -0
- pysuto-0.1.0rc1/docs/adr/0014-bilateral-feeds-scoped-to-cross-region-edges.md +121 -0
- pysuto-0.1.0rc1/docs/adr/0015-in-situ-ore-grades-on-allocated-ore-basis.md +103 -0
- pysuto-0.1.0rc1/docs/adr/0016-provenance-aware-sigma-on-scale-totals.md +54 -0
- pysuto-0.1.0rc1/docs/adr/0017-size-damped-sigma-on-bilateral-trade-legs.md +88 -0
- pysuto-0.1.0rc1/docs/adr/0018-import-free-fans-distribute-domestically.md +111 -0
- pysuto-0.1.0rc1/docs/adr/0019-contradicted-flow-nodes-lose-anchor-authority.md +133 -0
- pysuto-0.1.0rc1/docs/adr/0020-withhold-restored-totals-that-contradict-their-own-chain.md +76 -0
- pysuto-0.1.0rc1/docs/adr/0021-icsg-refined-production-anchors-anode-into-er.md +195 -0
- pysuto-0.1.0rc1/docs/adr/0022-er-pools-its-anode-input-over-all-source-regions.md +101 -0
- pysuto-0.1.0rc1/docs/adr/0023-ore-grade-carried-past-the-crude-ore-feed.md +140 -0
- pysuto-0.1.0rc1/docs/adr/0024-fan-domestic-leg-bounded-by-own-production.md +277 -0
- pysuto-0.1.0rc1/docs/adr/0025-scale-totals-carry-the-feeds-reporting-resolution-as-a-sigma-floor.md +136 -0
- pysuto-0.1.0rc1/docs/adr/0026-bilateral-trade-legs-are-not-time-interpolated.md +111 -0
- pysuto-0.1.0rc1/docs/adr/0027-re-exports-are-re-attributed-at-feed-time.md +297 -0
- pysuto-0.1.0rc1/docs/adr/0028-grade-sigma-is-stated-not-derived-from-the-band.md +128 -0
- pysuto-0.1.0rc1/docs/adr/0029-the-concentrate-grade-stays-global.md +146 -0
- pysuto-0.1.0rc1/docs/adr/0030-secondary-smelter-copper-enters-the-chain-once.md +244 -0
- pysuto-0.1.0rc1/docs/adr/0031-icsg-scrap-series-anchor-their-level-not-only-their-share.md +198 -0
- pysuto-0.1.0rc1/docs/adr/0032-one-territory-one-label.md +236 -0
- pysuto-0.1.0rc1/docs/adr/0033-baci-quantity-contradicts-its-own-value.md +293 -0
- pysuto-0.1.0rc1/docs/adr/0034-roles-are-the-frameworks-labels-are-the-cases.md +31 -0
- pysuto-0.1.0rc1/docs/adr/0035-the-yearbooks-label-is-not-on-the-row-it-owns.md +140 -0
- pysuto-0.1.0rc1/docs/adr/0036-a-renamed-type-is-a-second-stream-not-a-restatement.md +120 -0
- pysuto-0.1.0rc1/docs/adr/0037-psut-piot-two-classes-piot-is-a-construct-family.md +62 -0
- pysuto-0.1.0rc1/docs/adr/0038-waste-rock-is-a-satellite-mass-flow.md +38 -0
- pysuto-0.1.0rc1/docs/adr/0039-flow-lower-bounds-are-enforced-in-the-qp.md +65 -0
- pysuto-0.1.0rc1/docs/adr/0040-stock-change-legs-are-held-at-their-prior.md +72 -0
- pysuto-0.1.0rc1/docs/adr/0041-signed-edges-carry-no-one-signed-hard-band-and-are-seeded.md +68 -0
- pysuto-0.1.0rc1/docs/adr/0042-stage-4-owns-the-model-a-qp-backend-solves-a-standard-form-qp.md +28 -0
- pysuto-0.1.0rc1/docs/adr/0043-a-stock-change-is-drawn-from-its-regions-cathode-supply.md +39 -0
- pysuto-0.1.0rc1/docs/adr/0044-the-posterior-is-the-qps-linearisation-at-its-active-set.md +17 -0
- pysuto-0.1.0rc1/docs/adr/0045-knobs-are-overridden-at-the-driver-boundary.md +87 -0
- pysuto-0.1.0rc1/docs/adr/0046-an-accounting-structure-is-declared-by-a-spec.md +42 -0
- pysuto-0.1.0rc1/docs/adr/0047-pysuto-ships-no-study-case.md +24 -0
- pysuto-0.1.0rc1/docs/agents/domain.md +47 -0
- pysuto-0.1.0rc1/docs/agents/issue-tracker.md +59 -0
- pysuto-0.1.0rc1/docs/agents/measure-tickets.md +54 -0
- pysuto-0.1.0rc1/docs/agents/parallel-worktrees.md +50 -0
- pysuto-0.1.0rc1/docs/agents/triage-labels.md +17 -0
- pysuto-0.1.0rc1/docs/conf/ISIE2027_abstract.docx +0 -0
- pysuto-0.1.0rc1/docs/conf/ISIE2027_abstract_reviews.md +176 -0
- pysuto-0.1.0rc1/docs/conf/ISIESEM_abstract_finis.docx +0 -0
- pysuto-0.1.0rc1/docs/manuscript/discussion.md +253 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/fig3_problem.png +0 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/fig4_reconciliation.png +0 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/fig5_uncertainty.png +0 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/fig6_copper_system.png +0 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/manuscript_numbers.json +3709 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/numbers.json +1156 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s15_a4_gradient.csv +31 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s15_decomposition.csv +31 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s15_embodied_folded.csv +8 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s15_hhi_1995_2024.csv +17 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s15_knob_criteria.png +0 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s15_ledger.csv +9 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s15_retention_by_stage.csv +10 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s15_secondary_pooled.csv +9 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s15_tolerance_pair.csv +10 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s16_share_soft_ratios.csv +10 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s16_top_identities_edges.csv +26 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s16_top_identities_soft_ratios.csv +26 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s16_top_identities_sum_rows.csv +26 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s17_legs.csv +95 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s6_birge_by_year.csv +32 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s6_calibration.csv +9 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s6_contraction_by_category.csv +55 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s6_contraction_by_class.csv +5 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s6_contraction_shift.png +0 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_s6_shift_calibration.png +0 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/si_tables.md +478 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/table3_intervals.csv +362 -0
- pysuto-0.1.0rc1/docs/manuscript/figs/table3_ledger.csv +9 -0
- pysuto-0.1.0rc1/docs/manuscript/introduction.md +117 -0
- pysuto-0.1.0rc1/docs/manuscript/method.md +808 -0
- pysuto-0.1.0rc1/docs/manuscript/refs.bib +365 -0
- pysuto-0.1.0rc1/docs/manuscript/results.md +199 -0
- pysuto-0.1.0rc1/docs/manuscript/si.md +1004 -0
- pysuto-0.1.0rc1/docs/pap/CONVENT.md +111 -0
- pysuto-0.1.0rc1/docs/pap/skel.yaml +342 -0
- pysuto-0.1.0rc1/environment-reference.yml +268 -0
- pysuto-0.1.0rc1/environment.yml +10 -0
- pysuto-0.1.0rc1/pyproject.toml +98 -0
- pysuto-0.1.0rc1/scripts/acc.py +217 -0
- pysuto-0.1.0rc1/scripts/baci_feed.py +77 -0
- pysuto-0.1.0rc1/scripts/build_baci_reexport.py +301 -0
- pysuto-0.1.0rc1/scripts/build_ore_grade.py +204 -0
- pysuto-0.1.0rc1/scripts/build_trade_shares.py +235 -0
- pysuto-0.1.0rc1/scripts/collect_aggregate_impute.py +128 -0
- pysuto-0.1.0rc1/scripts/constraints.py +111 -0
- pysuto-0.1.0rc1/scripts/copper.py +971 -0
- pysuto-0.1.0rc1/scripts/copper_feed.py +979 -0
- pysuto-0.1.0rc1/scripts/crude_ore_feed.py +77 -0
- pysuto-0.1.0rc1/scripts/icsg_feed.py +76 -0
- pysuto-0.1.0rc1/scripts/input_status.py +43 -0
- pysuto-0.1.0rc1/scripts/issue_audit.py +138 -0
- pysuto-0.1.0rc1/scripts/migrate_registries.py +452 -0
- pysuto-0.1.0rc1/scripts/parse/baci_parse/baci_parse_feed.py +447 -0
- pysuto-0.1.0rc1/scripts/parse/copper_params_parse.py +356 -0
- pysuto-0.1.0rc1/scripts/parse/crude_ore_parse_feed.py +101 -0
- pysuto-0.1.0rc1/scripts/parse/icsg_parse/icsg_2005.py +751 -0
- pysuto-0.1.0rc1/scripts/parse/icsg_parse/icsg_2014.py +704 -0
- pysuto-0.1.0rc1/scripts/parse/icsg_parse/icsg_2023f.py +1056 -0
- pysuto-0.1.0rc1/scripts/parse/icsg_parse/icsg_cap.py +214 -0
- pysuto-0.1.0rc1/scripts/parse/icsg_parse/icsg_clean.py +615 -0
- pysuto-0.1.0rc1/scripts/parse/icsg_parse/icsg_comb.py +305 -0
- pysuto-0.1.0rc1/scripts/parse/icsg_parse/process_icsg.py +210 -0
- pysuto-0.1.0rc1/scripts/parse/ore_grade_parse.py +289 -0
- pysuto-0.1.0rc1/scripts/psut.py +108 -0
- pysuto-0.1.0rc1/scripts/refresh_tutorial.py +100 -0
- pysuto-0.1.0rc1/scripts/report/copper_metabolism_insights.py +866 -0
- pysuto-0.1.0rc1/scripts/report/fonts/Inter[opsz,wght].ttf +0 -0
- pysuto-0.1.0rc1/scripts/report/fonts/JetBrainsMono[wght].ttf +0 -0
- pysuto-0.1.0rc1/scripts/report/fonts/OFL-Inter.txt +93 -0
- pysuto-0.1.0rc1/scripts/report/fonts/OFL-JetBrainsMono.txt +93 -0
- pysuto-0.1.0rc1/scripts/report/insights_artifact.py +553 -0
- pysuto-0.1.0rc1/scripts/report/insights_artifact_page/assemble.py +35 -0
- pysuto-0.1.0rc1/scripts/report/insights_artifact_page/helpers.js +103 -0
- pysuto-0.1.0rc1/scripts/report/insights_artifact_page/main.js +366 -0
- pysuto-0.1.0rc1/scripts/report/insights_artifact_page/template.html +392 -0
- pysuto-0.1.0rc1/scripts/report/insights_docx/build.cjs +157 -0
- pysuto-0.1.0rc1/scripts/report/insights_docx/shoot.cjs +90 -0
- pysuto-0.1.0rc1/scripts/report/insights_docx/text.md +134 -0
- pysuto-0.1.0rc1/scripts/report/make_logo.py +1029 -0
- pysuto-0.1.0rc1/scripts/report/manuscript_numbers.py +1574 -0
- pysuto-0.1.0rc1/scripts/report/results_figs.py +1382 -0
- pysuto-0.1.0rc1/scripts/report/supervisor_figs_20260907.py +274 -0
- pysuto-0.1.0rc1/scripts/report/table3_intervals.py +421 -0
- pysuto-0.1.0rc1/scripts/run_solver.py +106 -0
- pysuto-0.1.0rc1/scripts/solve_diag.py +85 -0
- pysuto-0.1.0rc1/scripts/solver_stats.py +81 -0
- pysuto-0.1.0rc1/scripts/sweep.py +147 -0
- pysuto-0.1.0rc1/scripts/sweep_diag.py +87 -0
- pysuto-0.1.0rc1/scripts/uncertainty_propagation.py +85 -0
- pysuto-0.1.0rc1/scripts/uncprop_diag.py +92 -0
- pysuto-0.1.0rc1/src/pysuto/__init__.py +13 -0
- pysuto-0.1.0rc1/src/pysuto/__main__.py +110 -0
- pysuto-0.1.0rc1/src/pysuto/_conditioning.py +151 -0
- pysuto-0.1.0rc1/src/pysuto/_step.py +90 -0
- pysuto-0.1.0rc1/src/pysuto/acc.py +1989 -0
- pysuto-0.1.0rc1/src/pysuto/agg.py +172 -0
- pysuto-0.1.0rc1/src/pysuto/case.py +451 -0
- pysuto-0.1.0rc1/src/pysuto/clarabel_backend.py +249 -0
- pysuto-0.1.0rc1/src/pysuto/collector.py +216 -0
- pysuto-0.1.0rc1/src/pysuto/conc.py +826 -0
- pysuto-0.1.0rc1/src/pysuto/config.py +52 -0
- pysuto-0.1.0rc1/src/pysuto/constraints/__init__.py +42 -0
- pysuto-0.1.0rc1/src/pysuto/constraints/anchors.py +206 -0
- pysuto-0.1.0rc1/src/pysuto/constraints/base.py +91 -0
- pysuto-0.1.0rc1/src/pysuto/constraints/emit.py +112 -0
- pysuto-0.1.0rc1/src/pysuto/constraints/engine.py +835 -0
- pysuto-0.1.0rc1/src/pysuto/constraints/flow_bound.py +83 -0
- pysuto-0.1.0rc1/src/pysuto/constraints/mass_balance.py +82 -0
- pysuto-0.1.0rc1/src/pysuto/constraints/naming.py +141 -0
- pysuto-0.1.0rc1/src/pysuto/constraints/ratio.py +545 -0
- pysuto-0.1.0rc1/src/pysuto/constraints/run.py +83 -0
- pysuto-0.1.0rc1/src/pysuto/constraints/sum.py +679 -0
- pysuto-0.1.0rc1/src/pysuto/diag/__init__.py +93 -0
- pysuto-0.1.0rc1/src/pysuto/diag/_plot.py +207 -0
- pysuto-0.1.0rc1/src/pysuto/diag/agg.py +368 -0
- pysuto-0.1.0rc1/src/pysuto/diag/const.py +612 -0
- pysuto-0.1.0rc1/src/pysuto/diag/feed.py +258 -0
- pysuto-0.1.0rc1/src/pysuto/diag/imp.py +1011 -0
- pysuto-0.1.0rc1/src/pysuto/diag/psut.py +300 -0
- pysuto-0.1.0rc1/src/pysuto/diag/solver.py +1435 -0
- pysuto-0.1.0rc1/src/pysuto/diag/stats/__init__.py +56 -0
- pysuto-0.1.0rc1/src/pysuto/diag/stats/_core.py +255 -0
- pysuto-0.1.0rc1/src/pysuto/diag/stats/const.py +81 -0
- pysuto-0.1.0rc1/src/pysuto/diag/stats/coverage.py +163 -0
- pysuto-0.1.0rc1/src/pysuto/diag/stats/objective.py +319 -0
- pysuto-0.1.0rc1/src/pysuto/diag/stats/problem.py +442 -0
- pysuto-0.1.0rc1/src/pysuto/diag/stats/solver.py +437 -0
- pysuto-0.1.0rc1/src/pysuto/diag/stats/sweep.py +799 -0
- pysuto-0.1.0rc1/src/pysuto/diag/stats/uncprop.py +519 -0
- pysuto-0.1.0rc1/src/pysuto/diag/stats/val.py +95 -0
- pysuto-0.1.0rc1/src/pysuto/diag/sweep.py +509 -0
- pysuto-0.1.0rc1/src/pysuto/diag/truth.py +333 -0
- pysuto-0.1.0rc1/src/pysuto/diag/uncprop.py +691 -0
- pysuto-0.1.0rc1/src/pysuto/feed.py +67 -0
- pysuto-0.1.0rc1/src/pysuto/feedpipe.py +982 -0
- pysuto-0.1.0rc1/src/pysuto/feedprep/__init__.py +10 -0
- pysuto-0.1.0rc1/src/pysuto/feedprep/ore_grade.py +333 -0
- pysuto-0.1.0rc1/src/pysuto/feedprep/reexport.py +544 -0
- pysuto-0.1.0rc1/src/pysuto/feedprep/trade_shares.py +315 -0
- pysuto-0.1.0rc1/src/pysuto/flow_node_balance.py +89 -0
- pysuto-0.1.0rc1/src/pysuto/impute/__init__.py +51 -0
- pysuto-0.1.0rc1/src/pysuto/impute/base.py +140 -0
- pysuto-0.1.0rc1/src/pysuto/impute/engine.py +292 -0
- pysuto-0.1.0rc1/src/pysuto/impute/fill.py +124 -0
- pysuto-0.1.0rc1/src/pysuto/impute/flat_prior.py +371 -0
- pysuto-0.1.0rc1/src/pysuto/impute/ledger.py +194 -0
- pysuto-0.1.0rc1/src/pysuto/impute/network.py +600 -0
- pysuto-0.1.0rc1/src/pysuto/impute/screens.py +195 -0
- pysuto-0.1.0rc1/src/pysuto/impute/share.py +302 -0
- pysuto-0.1.0rc1/src/pysuto/impute/time.py +340 -0
- pysuto-0.1.0rc1/src/pysuto/input_registry.py +484 -0
- pysuto-0.1.0rc1/src/pysuto/knobs.py +130 -0
- pysuto-0.1.0rc1/src/pysuto/logging.py +108 -0
- pysuto-0.1.0rc1/src/pysuto/lp.py +31 -0
- pysuto-0.1.0rc1/src/pysuto/masks.py +227 -0
- pysuto-0.1.0rc1/src/pysuto/meta.py +174 -0
- pysuto-0.1.0rc1/src/pysuto/piot.py +466 -0
- pysuto-0.1.0rc1/src/pysuto/pipeline.py +731 -0
- pysuto-0.1.0rc1/src/pysuto/psut.py +675 -0
- pysuto-0.1.0rc1/src/pysuto/qp.py +90 -0
- pysuto-0.1.0rc1/src/pysuto/registry/__init__.py +66 -0
- pysuto-0.1.0rc1/src/pysuto/registry/_sidecar.py +146 -0
- pysuto-0.1.0rc1/src/pysuto/registry/base.py +132 -0
- pysuto-0.1.0rc1/src/pysuto/registry/constraint.py +227 -0
- pysuto-0.1.0rc1/src/pysuto/registry/feed.py +271 -0
- pysuto-0.1.0rc1/src/pysuto/registry/imputation.py +227 -0
- pysuto-0.1.0rc1/src/pysuto/registry/lock.py +101 -0
- pysuto-0.1.0rc1/src/pysuto/registry/optim.py +196 -0
- pysuto-0.1.0rc1/src/pysuto/registry/psut.py +185 -0
- pysuto-0.1.0rc1/src/pysuto/registry/sweep.py +70 -0
- pysuto-0.1.0rc1/src/pysuto/registry/uncprop.py +147 -0
- pysuto-0.1.0rc1/src/pysuto/relation/__init__.py +15 -0
- pysuto-0.1.0rc1/src/pysuto/relation/balance.py +65 -0
- pysuto-0.1.0rc1/src/pysuto/relation/param_relation.py +379 -0
- pysuto-0.1.0rc1/src/pysuto/relation/params.py +254 -0
- pysuto-0.1.0rc1/src/pysuto/relation/prior.py +85 -0
- pysuto-0.1.0rc1/src/pysuto/relation/ratio_relation.py +174 -0
- pysuto-0.1.0rc1/src/pysuto/relation/relation.py +90 -0
- pysuto-0.1.0rc1/src/pysuto/relation/sources.py +147 -0
- pysuto-0.1.0rc1/src/pysuto/relation/structure.py +153 -0
- pysuto-0.1.0rc1/src/pysuto/solver.py +820 -0
- pysuto-0.1.0rc1/src/pysuto/stages.py +683 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/00_world.ipynb +1335 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/01_datafeed.ipynb +1882 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/02_aggregate_impute.ipynb +1873 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/03_constraints.ipynb +1682 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/04_solver.ipynb +1068 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/05_posterior.ipynb +883 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/06_psut_piot.ipynb +3248 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/07_scoreboard.ipynb +1365 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/08_break_it.ipynb +948 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/09_bridge.ipynb +1149 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/10_your_case.ipynb +1327 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/README.md +15 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/__init__.py +72 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/params_template.csv +77 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/toy.py +1476 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/toy_coproduct.py +37 -0
- pysuto-0.1.0rc1/src/pysuto/tutorial/toy_ext.py +618 -0
- pysuto-0.1.0rc1/src/pysuto/unc.py +371 -0
- pysuto-0.1.0rc1/src/pysuto/uncprop.py +954 -0
- pysuto-0.1.0rc1/src/pysuto/utils.py +449 -0
- pysuto-0.1.0rc1/tests/copper_case.py +18 -0
- pysuto-0.1.0rc1/tests/test_acc_roles.py +425 -0
- pysuto-0.1.0rc1/tests/test_acc_spec.py +412 -0
- pysuto-0.1.0rc1/tests/test_accounting_structure.py +1591 -0
- pysuto-0.1.0rc1/tests/test_agg.py +240 -0
- pysuto-0.1.0rc1/tests/test_anchors.py +195 -0
- pysuto-0.1.0rc1/tests/test_baci_mirror_duplicates.py +183 -0
- pysuto-0.1.0rc1/tests/test_baci_quantity_recon.py +382 -0
- pysuto-0.1.0rc1/tests/test_case.py +263 -0
- pysuto-0.1.0rc1/tests/test_case_resolution.py +201 -0
- pysuto-0.1.0rc1/tests/test_case_screens.py +114 -0
- pysuto-0.1.0rc1/tests/test_collector.py +319 -0
- pysuto-0.1.0rc1/tests/test_conc.py +889 -0
- pysuto-0.1.0rc1/tests/test_config.py +42 -0
- pysuto-0.1.0rc1/tests/test_const_stats_diag.py +98 -0
- pysuto-0.1.0rc1/tests/test_constraints.py +2845 -0
- pysuto-0.1.0rc1/tests/test_copper_feed.py +415 -0
- pysuto-0.1.0rc1/tests/test_copper_stage1.py +128 -0
- pysuto-0.1.0rc1/tests/test_coverage_diag.py +212 -0
- pysuto-0.1.0rc1/tests/test_driver_data_dir.py +483 -0
- pysuto-0.1.0rc1/tests/test_driver_knobs.py +162 -0
- pysuto-0.1.0rc1/tests/test_feed_diag.py +36 -0
- pysuto-0.1.0rc1/tests/test_feed_spec.py +118 -0
- pysuto-0.1.0rc1/tests/test_feedpipe.py +553 -0
- pysuto-0.1.0rc1/tests/test_feedprep_ore_grade.py +286 -0
- pysuto-0.1.0rc1/tests/test_feedprep_reexport.py +695 -0
- pysuto-0.1.0rc1/tests/test_feedprep_trade_shares.py +705 -0
- pysuto-0.1.0rc1/tests/test_flatprior_row.py +165 -0
- pysuto-0.1.0rc1/tests/test_flow_node_balance.py +87 -0
- pysuto-0.1.0rc1/tests/test_generic_drivers.py +286 -0
- pysuto-0.1.0rc1/tests/test_githooks.py +49 -0
- pysuto-0.1.0rc1/tests/test_icsg_2005_merged_cells.py +70 -0
- pysuto-0.1.0rc1/tests/test_icsg_2014_region_fill.py +91 -0
- pysuto-0.1.0rc1/tests/test_icsg_clean.py +586 -0
- pysuto-0.1.0rc1/tests/test_icsg_comb_renamed_collisions.py +85 -0
- pysuto-0.1.0rc1/tests/test_icsg_comb_zero_revision.py +65 -0
- pysuto-0.1.0rc1/tests/test_icsg_nas.py +190 -0
- pysuto-0.1.0rc1/tests/test_icsg_parse_imports.py +30 -0
- pysuto-0.1.0rc1/tests/test_icsg_stock_levels.py +221 -0
- pysuto-0.1.0rc1/tests/test_imp_diag.py +624 -0
- pysuto-0.1.0rc1/tests/test_import_no_writes.py +139 -0
- pysuto-0.1.0rc1/tests/test_imputation.py +1678 -0
- pysuto-0.1.0rc1/tests/test_impute_share.py +207 -0
- pysuto-0.1.0rc1/tests/test_input_registry.py +491 -0
- pysuto-0.1.0rc1/tests/test_issue_audit.py +57 -0
- pysuto-0.1.0rc1/tests/test_iwcc_enduse.py +131 -0
- pysuto-0.1.0rc1/tests/test_knobs.py +87 -0
- pysuto-0.1.0rc1/tests/test_licence.py +46 -0
- pysuto-0.1.0rc1/tests/test_lp.py +30 -0
- pysuto-0.1.0rc1/tests/test_manuscript_numbers.py +147 -0
- pysuto-0.1.0rc1/tests/test_masks.py +228 -0
- pysuto-0.1.0rc1/tests/test_meta.py +24 -0
- pysuto-0.1.0rc1/tests/test_naming.py +61 -0
- pysuto-0.1.0rc1/tests/test_network_imputer.py +1204 -0
- pysuto-0.1.0rc1/tests/test_objective_stats.py +331 -0
- pysuto-0.1.0rc1/tests/test_outlier_screen.py +412 -0
- pysuto-0.1.0rc1/tests/test_own_case.py +131 -0
- pysuto-0.1.0rc1/tests/test_packaging.py +22 -0
- pysuto-0.1.0rc1/tests/test_param_fill.py +364 -0
- pysuto-0.1.0rc1/tests/test_param_relation.py +361 -0
- pysuto-0.1.0rc1/tests/test_piot.py +302 -0
- pysuto-0.1.0rc1/tests/test_pipeline.py +671 -0
- pysuto-0.1.0rc1/tests/test_problem_stats_diag.py +339 -0
- pysuto-0.1.0rc1/tests/test_psut.py +848 -0
- pysuto-0.1.0rc1/tests/test_pysuto_run.py +244 -0
- pysuto-0.1.0rc1/tests/test_readme_links.py +33 -0
- pysuto-0.1.0rc1/tests/test_registry.py +974 -0
- pysuto-0.1.0rc1/tests/test_relation_emit.py +111 -0
- pysuto-0.1.0rc1/tests/test_relation_params.py +189 -0
- pysuto-0.1.0rc1/tests/test_relation_prior.py +205 -0
- pysuto-0.1.0rc1/tests/test_relation_structure.py +112 -0
- pysuto-0.1.0rc1/tests/test_row_penalty.py +130 -0
- pysuto-0.1.0rc1/tests/test_run_lineage.py +154 -0
- pysuto-0.1.0rc1/tests/test_solver.py +1574 -0
- pysuto-0.1.0rc1/tests/test_solver_diag.py +468 -0
- pysuto-0.1.0rc1/tests/test_solver_stats_diag.py +336 -0
- pysuto-0.1.0rc1/tests/test_stage_lock.py +99 -0
- pysuto-0.1.0rc1/tests/test_stats_diag.py +202 -0
- pysuto-0.1.0rc1/tests/test_sweep_diag.py +547 -0
- pysuto-0.1.0rc1/tests/test_table3_intervals.py +104 -0
- pysuto-0.1.0rc1/tests/test_toy_case.py +531 -0
- pysuto-0.1.0rc1/tests/test_toy_coproduct.py +118 -0
- pysuto-0.1.0rc1/tests/test_toy_ext.py +217 -0
- pysuto-0.1.0rc1/tests/test_tutorial_copy.py +107 -0
- pysuto-0.1.0rc1/tests/test_tutorial_notebooks.py +190 -0
- pysuto-0.1.0rc1/tests/test_unc.py +1025 -0
- pysuto-0.1.0rc1/tests/test_uncprop.py +1168 -0
- pysuto-0.1.0rc1/tests/test_uncprop_calibration.py +492 -0
- pysuto-0.1.0rc1/tests/test_uncprop_diag.py +329 -0
- pysuto-0.1.0rc1/tests/test_uncprop_stats_diag.py +328 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.git_archival.txt export-subst
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# commit-msg: refuse a GitHub closing keyword before an issue number. An issue closes through
|
|
3
|
+
# `gh issue close <n> --comment` with its REP; pushed to main, "fix #98" closes it as a side
|
|
4
|
+
# effect (a merge message once closed #98 before its measurement). `git merge` runs this hook too.
|
|
5
|
+
# Enable once per clone: git config core.hooksPath .githooks (docs/agents/issue-tracker.md)
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
# The message ends at `git commit -v`'s scissors line; the diff below it is not the message.
|
|
9
|
+
REF='(([[:alnum:]_.-]+/[[:alnum:]_.-]+)?#[0-9]+|https?://github\.com/[^[:space:]]+/issues/[0-9]+)'
|
|
10
|
+
hits=$(sed -n '/^# -* >8 -*$/q;p' "$1" | grep -v '^#' \
|
|
11
|
+
| grep -oiE "\b(close[sd]?|fix(e[sd])?|resolve[sd]?):?[[:space:]]+$REF" \
|
|
12
|
+
|| true)
|
|
13
|
+
[ -z "$hits" ] && exit 0
|
|
14
|
+
|
|
15
|
+
cat >&2 <<EOF
|
|
16
|
+
commit-msg: GitHub would close an issue when this commit reaches main:
|
|
17
|
+
$hits
|
|
18
|
+
Name the issue bare, e.g. "(#98)", and close it with: gh issue close <n> --comment "<REP>"
|
|
19
|
+
EOF
|
|
20
|
+
exit 1
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# pre-commit: run ruff check (when installed) and the test suite when a commit touches Python under src/, scripts/ or tests/.
|
|
3
|
+
# Enable once per clone: git config core.hooksPath .githooks
|
|
4
|
+
# Tests import this checkout's src/ (PYTHONPATH), so a worktree tests its own code.
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
git diff --cached --name-only --diff-filter=ACMRD | grep -qE '^(src|scripts|tests)/.*\.py$' || exit 0
|
|
8
|
+
|
|
9
|
+
PY=${PYSUTO_PYTHON:-python}
|
|
10
|
+
export PYTHONPATH="src${PYTHONPATH:+:$PYTHONPATH}"
|
|
11
|
+
if ! "$PY" -c "import pysuto" 2>/dev/null; then
|
|
12
|
+
echo "pre-commit: '$PY' cannot import pysuto; activate the conda env 'pysuto' or set PYSUTO_PYTHON." >&2
|
|
13
|
+
exit 1
|
|
14
|
+
fi
|
|
15
|
+
if command -v ruff >/dev/null 2>&1; then
|
|
16
|
+
ruff check
|
|
17
|
+
else
|
|
18
|
+
echo "pre-commit: ruff not installed; CI lints"
|
|
19
|
+
fi
|
|
20
|
+
exec "$PY" -m pytest tests/ -q -x
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Python cache files
|
|
2
|
+
**/__pycache__/
|
|
3
|
+
*.pyc
|
|
4
|
+
*.pyo
|
|
5
|
+
*.pyd
|
|
6
|
+
*.egg-info/
|
|
7
|
+
|
|
8
|
+
# Virtual environment
|
|
9
|
+
.venv/
|
|
10
|
+
env/
|
|
11
|
+
venv/
|
|
12
|
+
|
|
13
|
+
# Data folders
|
|
14
|
+
# data/ is not tracked: bulk source values.csv, script-generated params
|
|
15
|
+
# (ore_grade, trade_shares) and the run tree are all reproducible or too large.
|
|
16
|
+
# EXCEPTION: the hand-authored inputs under data/input are force-added to git
|
|
17
|
+
# (~290 KB) so a fresh clone can reconstruct the configuration. The input
|
|
18
|
+
# registry already versions and content-hashes them per run (data/input/*/
|
|
19
|
+
# registry.json, vN/ retained, run metadata parents.inputs) — git adds
|
|
20
|
+
# off-machine durability, not versioning. Add new hand-authored inputs with
|
|
21
|
+
# `git add -f`; anything a script writes stays ignored.
|
|
22
|
+
data/
|
|
23
|
+
orga/
|
|
24
|
+
figs/ex/
|
|
25
|
+
figs/mn/
|
|
26
|
+
figs/psut/
|
|
27
|
+
#test/
|
|
28
|
+
res/
|
|
29
|
+
logs/
|
|
30
|
+
scripts/obs
|
|
31
|
+
#.claude/
|
|
32
|
+
.agents/
|
|
33
|
+
plans/
|
|
34
|
+
docs/ref/
|
|
35
|
+
leg/
|
|
36
|
+
|
|
37
|
+
# VSCode settings (optional)
|
|
38
|
+
.vscode/
|
|
39
|
+
|
|
40
|
+
# insight page: build outputs of assemble.py (the tracked copy sits beside its run's data)
|
|
41
|
+
scripts/report/insights_artifact_page/copper_metabolism.html
|
|
42
|
+
scripts/report/insights_artifact_page/inline.js
|
|
43
|
+
src/pysuto/tutorial/runs/
|
|
44
|
+
src/pysuto/tutorial/.ipynb_checkpoints/
|
|
45
|
+
|
|
46
|
+
# Hygiene (#196): local scratch and build output
|
|
47
|
+
.scratch/
|
|
48
|
+
build/
|
|
49
|
+
dist/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use pySUTO, please cite it as below."
|
|
3
|
+
type: software
|
|
4
|
+
title: "pySUTO: Python-based Supply-Use Table Optimiser"
|
|
5
|
+
abstract: >-
|
|
6
|
+
pySUTO reconciles supply-use tables from conflicting sources: a sigma-weighted
|
|
7
|
+
quadratic programme, solved with Clarabel, returns the flows that agree with the
|
|
8
|
+
accounting constraints at the smallest weighted distance from the data, and the
|
|
9
|
+
posterior uncertainty of every flow.
|
|
10
|
+
authors:
|
|
11
|
+
- given-names: Florian
|
|
12
|
+
family-names: Huber
|
|
13
|
+
email: florian.huber1@wu.ac.at
|
|
14
|
+
affiliation: "Vienna University of Economics and Business (WU)"
|
|
15
|
+
orcid: "https://orcid.org/0009-0000-4927-3104"
|
|
16
|
+
license: MIT
|
|
17
|
+
repository-code: "https://github.com/florihu/pySUTO"
|
|
18
|
+
keywords:
|
|
19
|
+
- material flow analysis
|
|
20
|
+
- supply-use tables
|
|
21
|
+
- data reconciliation
|
|
22
|
+
- uncertainty
|
|
23
|
+
- copper
|