modelwright 0.1.0a1__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.
- modelwright-0.1.0a1/LICENSE +21 -0
- modelwright-0.1.0a1/PKG-INFO +160 -0
- modelwright-0.1.0a1/README.md +109 -0
- modelwright-0.1.0a1/pyproject.toml +89 -0
- modelwright-0.1.0a1/setup.cfg +4 -0
- modelwright-0.1.0a1/src/modelwright/__init__.py +148 -0
- modelwright-0.1.0a1/src/modelwright/cli.py +466 -0
- modelwright-0.1.0a1/src/modelwright/conversion.py +931 -0
- modelwright-0.1.0a1/src/modelwright/evaluation.py +173 -0
- modelwright-0.1.0a1/src/modelwright/execution.py +239 -0
- modelwright-0.1.0a1/src/modelwright/extraction.py +662 -0
- modelwright-0.1.0a1/src/modelwright/formulas.py +571 -0
- modelwright-0.1.0a1/src/modelwright/formulas_oracle.py +153 -0
- modelwright-0.1.0a1/src/modelwright/generation.py +726 -0
- modelwright-0.1.0a1/src/modelwright/graph.py +591 -0
- modelwright-0.1.0a1/src/modelwright/oracle_validation.py +59 -0
- modelwright-0.1.0a1/src/modelwright/oracles.py +132 -0
- modelwright-0.1.0a1/src/modelwright/references.py +209 -0
- modelwright-0.1.0a1/src/modelwright/validation.py +475 -0
- modelwright-0.1.0a1/src/modelwright.egg-info/PKG-INFO +160 -0
- modelwright-0.1.0a1/src/modelwright.egg-info/SOURCES.txt +48 -0
- modelwright-0.1.0a1/src/modelwright.egg-info/dependency_links.txt +1 -0
- modelwright-0.1.0a1/src/modelwright.egg-info/entry_points.txt +2 -0
- modelwright-0.1.0a1/src/modelwright.egg-info/requires.txt +30 -0
- modelwright-0.1.0a1/src/modelwright.egg-info/top_level.txt +1 -0
- modelwright-0.1.0a1/tests/test_cli.py +335 -0
- modelwright-0.1.0a1/tests/test_conversion_plan.py +238 -0
- modelwright-0.1.0a1/tests/test_dependency_graph.py +283 -0
- modelwright-0.1.0a1/tests/test_evaluation_orchestration.py +143 -0
- modelwright-0.1.0a1/tests/test_extraction_records.py +166 -0
- modelwright-0.1.0a1/tests/test_formula_expressions.py +95 -0
- modelwright-0.1.0a1/tests/test_formula_translation.py +367 -0
- modelwright-0.1.0a1/tests/test_formulas_oracle.py +54 -0
- modelwright-0.1.0a1/tests/test_generated_execution.py +126 -0
- modelwright-0.1.0a1/tests/test_generation_contract.py +93 -0
- modelwright-0.1.0a1/tests/test_import.py +5 -0
- modelwright-0.1.0a1/tests/test_materialize_fable_benchmarks.py +69 -0
- modelwright-0.1.0a1/tests/test_openpyxl_extraction.py +209 -0
- modelwright-0.1.0a1/tests/test_oracle_backed_validation.py +176 -0
- modelwright-0.1.0a1/tests/test_oracle_interface.py +116 -0
- modelwright-0.1.0a1/tests/test_public_api.py +25 -0
- modelwright-0.1.0a1/tests/test_python_generation.py +538 -0
- modelwright-0.1.0a1/tests/test_references.py +98 -0
- modelwright-0.1.0a1/tests/test_scalar_comparison.py +91 -0
- modelwright-0.1.0a1/tests/test_supported_semantics_fixture.py +64 -0
- modelwright-0.1.0a1/tests/test_synthetic_fixture.py +46 -0
- modelwright-0.1.0a1/tests/test_validation.py +104 -0
- modelwright-0.1.0a1/tests/test_validation_regression.py +122 -0
- modelwright-0.1.0a1/tests/test_validation_report_builder.py +95 -0
- modelwright-0.1.0a1/tests/test_validation_scenario.py +75 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 UBC FRESH Lab
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: modelwright
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Summary: Tools for converting spreadsheet workbooks into transparent Python models.
|
|
5
|
+
Author: UBC FRESH Lab
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/UBC-FRESH/modelwright
|
|
8
|
+
Project-URL: Documentation, https://ubc-fresh.github.io/modelwright/
|
|
9
|
+
Project-URL: Repository, https://github.com/UBC-FRESH/modelwright
|
|
10
|
+
Project-URL: Issues, https://github.com/UBC-FRESH/modelwright/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/UBC-FRESH/modelwright/blob/main/CHANGE_LOG.md
|
|
12
|
+
Keywords: spreadsheets,excel,model-conversion,reproducible-models,validation
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Office/Business
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: openpyxl>=3.1
|
|
27
|
+
Requires-Dist: rich>=13
|
|
28
|
+
Requires-Dist: typer>=0.9
|
|
29
|
+
Provides-Extra: docs
|
|
30
|
+
Requires-Dist: sphinx>=7; extra == "docs"
|
|
31
|
+
Requires-Dist: sphinx-rtd-theme>=2; extra == "docs"
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
34
|
+
Requires-Dist: formulas; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
36
|
+
Requires-Dist: ruff>=0.8; extra == "dev"
|
|
37
|
+
Requires-Dist: sphinx>=7; extra == "dev"
|
|
38
|
+
Requires-Dist: sphinx-rtd-theme>=2; extra == "dev"
|
|
39
|
+
Requires-Dist: twine>=5; extra == "dev"
|
|
40
|
+
Provides-Extra: oracle
|
|
41
|
+
Requires-Dist: formulas; extra == "oracle"
|
|
42
|
+
Provides-Extra: quality
|
|
43
|
+
Requires-Dist: ruff>=0.8; extra == "quality"
|
|
44
|
+
Provides-Extra: release
|
|
45
|
+
Requires-Dist: build>=1.2; extra == "release"
|
|
46
|
+
Requires-Dist: twine>=5; extra == "release"
|
|
47
|
+
Provides-Extra: test
|
|
48
|
+
Requires-Dist: formulas; extra == "test"
|
|
49
|
+
Requires-Dist: pytest>=8; extra == "test"
|
|
50
|
+
Dynamic: license-file
|
|
51
|
+
|
|
52
|
+
# Modelwright
|
|
53
|
+
|
|
54
|
+
`modelwright` is an early-stage project for turning spreadsheet workbooks into transparent, version-controlled, standalone Python models.
|
|
55
|
+
|
|
56
|
+
The intended direction is a generic workflow that can inspect workbook structure, extract formulas and dependencies, generate maintainable Python source, and validate the generated model against the original workbook outputs.
|
|
57
|
+
|
|
58
|
+
This repository is currently an early implementation skeleton. It defines minimal Python package and test scaffolding plus initial validation, extraction, graph, generation, oracle records, and thin JSON command-line wrappers, but does not yet provide a release stability guarantee, catalog schema, or full workbook conversion.
|
|
59
|
+
|
|
60
|
+
## Current Focus
|
|
61
|
+
|
|
62
|
+
- Build the first package-backed validation/report, workbook extraction, generation, and CLI cores.
|
|
63
|
+
- Keep extraction, code generation, validation, diagnostics, and reporting responsibilities separate.
|
|
64
|
+
- Avoid committing private notes, source workbooks, generated clones, or large artifacts while the project shape is still being established.
|
|
65
|
+
|
|
66
|
+
## Python API Boundary
|
|
67
|
+
|
|
68
|
+
The durable API is organized by module responsibility:
|
|
69
|
+
|
|
70
|
+
- `modelwright.extraction`: workbook extraction records and `extract_workbook`.
|
|
71
|
+
- `modelwright.graph`: dependency graph records and `build_dependency_graph`.
|
|
72
|
+
- `modelwright.formulas`: formula expression records, translation helpers, and reference-index helpers.
|
|
73
|
+
- `modelwright.generation`: generated-module records and `generate_python_module`.
|
|
74
|
+
- `modelwright.validation`: validation scenarios, scalar comparisons, and report records.
|
|
75
|
+
- `modelwright.oracles`, `modelwright.formulas_oracle`, and `modelwright.oracle_validation`: oracle request/result records, optional `formulas` oracle execution, and oracle-backed report assembly.
|
|
76
|
+
|
|
77
|
+
The package root `modelwright` exposes a curated convenience facade for those records and functions. Module-level imports remain preferred for implementation work because this project is still pre-release.
|
|
78
|
+
|
|
79
|
+
## Command-Line Interface
|
|
80
|
+
|
|
81
|
+
Bootstrap the repo-local virtual environment before using the console script:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
scripts/bootstrap_dev_env.sh
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The current CLI prints JSON to stdout and stays close to the Python APIs:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
modelwright workbook extract path/to/workbook.xlsx > tmp/extraction.json
|
|
91
|
+
modelwright workbook graph path/to/workbook.xlsx > tmp/dependency-graph.json
|
|
92
|
+
modelwright conversion plan path/to/workbook.xlsx > tmp/conversion-plan.json
|
|
93
|
+
modelwright model generate --contract tmp/contract.json --expressions tmp/expressions.json --constants tmp/constants.json --out tmp/generated_model.py > tmp/generation-result.json
|
|
94
|
+
modelwright validation report --scenario tests/fixtures/synthetic_model/baseline_scenario.json --generated-values tmp/generated-values.json --oracle-values tmp/oracle-values.json > tmp/validation-report.json
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
These commands do not provide a one-step workbook converter. `conversion plan` reports extraction, graphing, formula-translation, and residual-blocker status; `model generate` expects explicit generated-module and formula-expression JSON inputs; and `validation report` compares already-observed generated/oracle values. See `planning/cli-json-workflows.md` for JSON examples and workflow boundaries.
|
|
98
|
+
|
|
99
|
+
## Local Development
|
|
100
|
+
|
|
101
|
+
Bootstrap a repo-local virtual environment:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
scripts/bootstrap_dev_env.sh
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
This installs Modelwright with the `dev` extra:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
.venv/bin/python -m pip install -e '.[dev]'
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Run lint checks:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
.venv/bin/python -m ruff check .
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Run tests:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
.venv/bin/python -m pytest
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Build docs locally:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
.venv/bin/sphinx-build -b html docs _build/html -W
|
|
129
|
+
.venv/bin/python scripts/verify_docs_theme.py _build/html
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Restore the public external FABLE benchmark workbooks into ignored local paths:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
scripts/bootstrap_dev_env.sh --benchmarks
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`modelwright` is pre-release. The first planned alpha line is `0.1.0a1`; alpha releases must not be described as full-workbook conversion guarantees.
|
|
139
|
+
|
|
140
|
+
Check release artifacts locally:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
scripts/check_release_artifacts.sh
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Release checks write build outputs under ignored `tmp/release-checks/`.
|
|
147
|
+
|
|
148
|
+
See `docs/guides/release-deployment.rst` for the release and deployment runbook.
|
|
149
|
+
|
|
150
|
+
## Repository Conventions
|
|
151
|
+
|
|
152
|
+
- `AGENTS.md` is the working contract for AI coding agents.
|
|
153
|
+
- `CONTRIBUTING.md` is the contributor onboarding and development workflow guide.
|
|
154
|
+
- `ROADMAP.md` is the current plan and next-step tracker.
|
|
155
|
+
- `CHANGE_LOG.md` is the append-only project narrative.
|
|
156
|
+
- `planning/` contains focused design notes and research records that are too detailed for the roadmap.
|
|
157
|
+
- `benchmarks/` contains tracked metadata for official external benchmarks; large workbook binaries remain untracked and are restored locally under `tmp/`.
|
|
158
|
+
- `src/modelwright/` contains the importable Python package.
|
|
159
|
+
- `tests/` contains package-backed tests and tracked synthetic fixture helpers.
|
|
160
|
+
- `tmp/` is ignored local working space for private notes, source workbooks, experiments, and generated scratch outputs.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Modelwright
|
|
2
|
+
|
|
3
|
+
`modelwright` is an early-stage project for turning spreadsheet workbooks into transparent, version-controlled, standalone Python models.
|
|
4
|
+
|
|
5
|
+
The intended direction is a generic workflow that can inspect workbook structure, extract formulas and dependencies, generate maintainable Python source, and validate the generated model against the original workbook outputs.
|
|
6
|
+
|
|
7
|
+
This repository is currently an early implementation skeleton. It defines minimal Python package and test scaffolding plus initial validation, extraction, graph, generation, oracle records, and thin JSON command-line wrappers, but does not yet provide a release stability guarantee, catalog schema, or full workbook conversion.
|
|
8
|
+
|
|
9
|
+
## Current Focus
|
|
10
|
+
|
|
11
|
+
- Build the first package-backed validation/report, workbook extraction, generation, and CLI cores.
|
|
12
|
+
- Keep extraction, code generation, validation, diagnostics, and reporting responsibilities separate.
|
|
13
|
+
- Avoid committing private notes, source workbooks, generated clones, or large artifacts while the project shape is still being established.
|
|
14
|
+
|
|
15
|
+
## Python API Boundary
|
|
16
|
+
|
|
17
|
+
The durable API is organized by module responsibility:
|
|
18
|
+
|
|
19
|
+
- `modelwright.extraction`: workbook extraction records and `extract_workbook`.
|
|
20
|
+
- `modelwright.graph`: dependency graph records and `build_dependency_graph`.
|
|
21
|
+
- `modelwright.formulas`: formula expression records, translation helpers, and reference-index helpers.
|
|
22
|
+
- `modelwright.generation`: generated-module records and `generate_python_module`.
|
|
23
|
+
- `modelwright.validation`: validation scenarios, scalar comparisons, and report records.
|
|
24
|
+
- `modelwright.oracles`, `modelwright.formulas_oracle`, and `modelwright.oracle_validation`: oracle request/result records, optional `formulas` oracle execution, and oracle-backed report assembly.
|
|
25
|
+
|
|
26
|
+
The package root `modelwright` exposes a curated convenience facade for those records and functions. Module-level imports remain preferred for implementation work because this project is still pre-release.
|
|
27
|
+
|
|
28
|
+
## Command-Line Interface
|
|
29
|
+
|
|
30
|
+
Bootstrap the repo-local virtual environment before using the console script:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
scripts/bootstrap_dev_env.sh
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The current CLI prints JSON to stdout and stays close to the Python APIs:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
modelwright workbook extract path/to/workbook.xlsx > tmp/extraction.json
|
|
40
|
+
modelwright workbook graph path/to/workbook.xlsx > tmp/dependency-graph.json
|
|
41
|
+
modelwright conversion plan path/to/workbook.xlsx > tmp/conversion-plan.json
|
|
42
|
+
modelwright model generate --contract tmp/contract.json --expressions tmp/expressions.json --constants tmp/constants.json --out tmp/generated_model.py > tmp/generation-result.json
|
|
43
|
+
modelwright validation report --scenario tests/fixtures/synthetic_model/baseline_scenario.json --generated-values tmp/generated-values.json --oracle-values tmp/oracle-values.json > tmp/validation-report.json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
These commands do not provide a one-step workbook converter. `conversion plan` reports extraction, graphing, formula-translation, and residual-blocker status; `model generate` expects explicit generated-module and formula-expression JSON inputs; and `validation report` compares already-observed generated/oracle values. See `planning/cli-json-workflows.md` for JSON examples and workflow boundaries.
|
|
47
|
+
|
|
48
|
+
## Local Development
|
|
49
|
+
|
|
50
|
+
Bootstrap a repo-local virtual environment:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
scripts/bootstrap_dev_env.sh
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This installs Modelwright with the `dev` extra:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
.venv/bin/python -m pip install -e '.[dev]'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Run lint checks:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
.venv/bin/python -m ruff check .
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Run tests:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
.venv/bin/python -m pytest
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Build docs locally:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
.venv/bin/sphinx-build -b html docs _build/html -W
|
|
78
|
+
.venv/bin/python scripts/verify_docs_theme.py _build/html
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Restore the public external FABLE benchmark workbooks into ignored local paths:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
scripts/bootstrap_dev_env.sh --benchmarks
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`modelwright` is pre-release. The first planned alpha line is `0.1.0a1`; alpha releases must not be described as full-workbook conversion guarantees.
|
|
88
|
+
|
|
89
|
+
Check release artifacts locally:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
scripts/check_release_artifacts.sh
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Release checks write build outputs under ignored `tmp/release-checks/`.
|
|
96
|
+
|
|
97
|
+
See `docs/guides/release-deployment.rst` for the release and deployment runbook.
|
|
98
|
+
|
|
99
|
+
## Repository Conventions
|
|
100
|
+
|
|
101
|
+
- `AGENTS.md` is the working contract for AI coding agents.
|
|
102
|
+
- `CONTRIBUTING.md` is the contributor onboarding and development workflow guide.
|
|
103
|
+
- `ROADMAP.md` is the current plan and next-step tracker.
|
|
104
|
+
- `CHANGE_LOG.md` is the append-only project narrative.
|
|
105
|
+
- `planning/` contains focused design notes and research records that are too detailed for the roadmap.
|
|
106
|
+
- `benchmarks/` contains tracked metadata for official external benchmarks; large workbook binaries remain untracked and are restored locally under `tmp/`.
|
|
107
|
+
- `src/modelwright/` contains the importable Python package.
|
|
108
|
+
- `tests/` contains package-backed tests and tracked synthetic fixture helpers.
|
|
109
|
+
- `tmp/` is ignored local working space for private notes, source workbooks, experiments, and generated scratch outputs.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "modelwright"
|
|
7
|
+
version = "0.1.0a1"
|
|
8
|
+
description = "Tools for converting spreadsheet workbooks into transparent Python models."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "UBC FRESH Lab" }
|
|
15
|
+
]
|
|
16
|
+
keywords = [
|
|
17
|
+
"spreadsheets",
|
|
18
|
+
"excel",
|
|
19
|
+
"model-conversion",
|
|
20
|
+
"reproducible-models",
|
|
21
|
+
"validation"
|
|
22
|
+
]
|
|
23
|
+
classifiers = [
|
|
24
|
+
"Development Status :: 3 - Alpha",
|
|
25
|
+
"Intended Audience :: Developers",
|
|
26
|
+
"Intended Audience :: Science/Research",
|
|
27
|
+
"Programming Language :: Python :: 3",
|
|
28
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
29
|
+
"Programming Language :: Python :: 3.10",
|
|
30
|
+
"Programming Language :: Python :: 3.11",
|
|
31
|
+
"Programming Language :: Python :: 3.12",
|
|
32
|
+
"Topic :: Office/Business",
|
|
33
|
+
"Topic :: Scientific/Engineering"
|
|
34
|
+
]
|
|
35
|
+
dependencies = [
|
|
36
|
+
"openpyxl>=3.1",
|
|
37
|
+
"rich>=13",
|
|
38
|
+
"typer>=0.9"
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Homepage = "https://github.com/UBC-FRESH/modelwright"
|
|
43
|
+
Documentation = "https://ubc-fresh.github.io/modelwright/"
|
|
44
|
+
Repository = "https://github.com/UBC-FRESH/modelwright"
|
|
45
|
+
Issues = "https://github.com/UBC-FRESH/modelwright/issues"
|
|
46
|
+
Changelog = "https://github.com/UBC-FRESH/modelwright/blob/main/CHANGE_LOG.md"
|
|
47
|
+
|
|
48
|
+
[project.scripts]
|
|
49
|
+
modelwright = "modelwright.cli:app"
|
|
50
|
+
|
|
51
|
+
[project.optional-dependencies]
|
|
52
|
+
docs = [
|
|
53
|
+
"sphinx>=7",
|
|
54
|
+
"sphinx-rtd-theme>=2"
|
|
55
|
+
]
|
|
56
|
+
dev = [
|
|
57
|
+
"build>=1.2",
|
|
58
|
+
"formulas",
|
|
59
|
+
"pytest>=8",
|
|
60
|
+
"ruff>=0.8",
|
|
61
|
+
"sphinx>=7",
|
|
62
|
+
"sphinx-rtd-theme>=2",
|
|
63
|
+
"twine>=5"
|
|
64
|
+
]
|
|
65
|
+
oracle = [
|
|
66
|
+
"formulas"
|
|
67
|
+
]
|
|
68
|
+
quality = [
|
|
69
|
+
"ruff>=0.8"
|
|
70
|
+
]
|
|
71
|
+
release = [
|
|
72
|
+
"build>=1.2",
|
|
73
|
+
"twine>=5"
|
|
74
|
+
]
|
|
75
|
+
test = [
|
|
76
|
+
"formulas",
|
|
77
|
+
"pytest>=8"
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
[tool.setuptools.packages.find]
|
|
81
|
+
where = ["src"]
|
|
82
|
+
|
|
83
|
+
[tool.pytest.ini_options]
|
|
84
|
+
testpaths = ["tests"]
|
|
85
|
+
|
|
86
|
+
[tool.ruff]
|
|
87
|
+
line-length = 120
|
|
88
|
+
target-version = "py310"
|
|
89
|
+
extend-exclude = ["tmp"]
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"""Modelwright package skeleton."""
|
|
2
|
+
|
|
3
|
+
from modelwright.extraction import (
|
|
4
|
+
CellRecord,
|
|
5
|
+
ExtractionDiagnostic,
|
|
6
|
+
FormulaRecord,
|
|
7
|
+
NamedRangeRecord,
|
|
8
|
+
SheetRecord,
|
|
9
|
+
TableRecord,
|
|
10
|
+
WorkbookRecord,
|
|
11
|
+
extract_workbook,
|
|
12
|
+
)
|
|
13
|
+
from modelwright.execution import (
|
|
14
|
+
ExecutionDiagnostic,
|
|
15
|
+
GeneratedExecutionResult,
|
|
16
|
+
execute_generated_model,
|
|
17
|
+
)
|
|
18
|
+
from modelwright.evaluation import (
|
|
19
|
+
ValidationEvaluationResult,
|
|
20
|
+
evaluate_generated_model,
|
|
21
|
+
)
|
|
22
|
+
from modelwright.conversion import (
|
|
23
|
+
ConversionPlan,
|
|
24
|
+
ConversionSource,
|
|
25
|
+
CoverageSummary,
|
|
26
|
+
DiagnosticSummary,
|
|
27
|
+
GenerationSummary,
|
|
28
|
+
PlanRecommendation,
|
|
29
|
+
PrivacyReview,
|
|
30
|
+
ResidualBlocker,
|
|
31
|
+
ValidationSummary,
|
|
32
|
+
WorkflowStatus,
|
|
33
|
+
build_conversion_plan,
|
|
34
|
+
)
|
|
35
|
+
from modelwright.formulas import (
|
|
36
|
+
FormulaExpression,
|
|
37
|
+
FormulaExpressionNode,
|
|
38
|
+
FormulaTranslationDiagnostic,
|
|
39
|
+
build_formula_reference_index,
|
|
40
|
+
translate_formula_cell,
|
|
41
|
+
)
|
|
42
|
+
from modelwright.formulas_oracle import FormulasWorkbookOracle
|
|
43
|
+
from modelwright.generation import (
|
|
44
|
+
GeneratedContractInferenceResult,
|
|
45
|
+
GeneratedModuleContract,
|
|
46
|
+
GeneratedSymbol,
|
|
47
|
+
GenerationDiagnostic,
|
|
48
|
+
GenerationResult,
|
|
49
|
+
generate_python_module,
|
|
50
|
+
infer_generated_module_contract,
|
|
51
|
+
)
|
|
52
|
+
from modelwright.graph import (
|
|
53
|
+
DependencyEdge,
|
|
54
|
+
DependencyGraph,
|
|
55
|
+
build_dependency_graph,
|
|
56
|
+
)
|
|
57
|
+
from modelwright.oracles import (
|
|
58
|
+
OracleDiagnostic,
|
|
59
|
+
OracleRequest,
|
|
60
|
+
OracleResult,
|
|
61
|
+
WorkbookOracle,
|
|
62
|
+
)
|
|
63
|
+
from modelwright.oracle_validation import build_oracle_validation_report
|
|
64
|
+
from modelwright.references import (
|
|
65
|
+
WorkbookReference,
|
|
66
|
+
normalize_cell_reference,
|
|
67
|
+
normalize_reference,
|
|
68
|
+
)
|
|
69
|
+
from modelwright.validation import (
|
|
70
|
+
ComparisonResult,
|
|
71
|
+
ComparisonRules,
|
|
72
|
+
Diagnostic,
|
|
73
|
+
MISSING_VALUE,
|
|
74
|
+
OracleConfig,
|
|
75
|
+
ScenarioInput,
|
|
76
|
+
ScenarioOutput,
|
|
77
|
+
ValidationReport,
|
|
78
|
+
ValidationScenario,
|
|
79
|
+
build_validation_report,
|
|
80
|
+
compare_scalar_output,
|
|
81
|
+
load_validation_scenario,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
__version__ = "0.1.0a1"
|
|
85
|
+
|
|
86
|
+
__all__ = [
|
|
87
|
+
"CellRecord",
|
|
88
|
+
"ComparisonResult",
|
|
89
|
+
"ComparisonRules",
|
|
90
|
+
"ConversionPlan",
|
|
91
|
+
"ConversionSource",
|
|
92
|
+
"CoverageSummary",
|
|
93
|
+
"DependencyEdge",
|
|
94
|
+
"DependencyGraph",
|
|
95
|
+
"Diagnostic",
|
|
96
|
+
"DiagnosticSummary",
|
|
97
|
+
"ExtractionDiagnostic",
|
|
98
|
+
"ExecutionDiagnostic",
|
|
99
|
+
"FormulaExpression",
|
|
100
|
+
"FormulaExpressionNode",
|
|
101
|
+
"FormulaRecord",
|
|
102
|
+
"FormulaTranslationDiagnostic",
|
|
103
|
+
"FormulasWorkbookOracle",
|
|
104
|
+
"GeneratedModuleContract",
|
|
105
|
+
"GeneratedExecutionResult",
|
|
106
|
+
"GeneratedContractInferenceResult",
|
|
107
|
+
"GeneratedSymbol",
|
|
108
|
+
"GenerationSummary",
|
|
109
|
+
"GenerationDiagnostic",
|
|
110
|
+
"GenerationResult",
|
|
111
|
+
"MISSING_VALUE",
|
|
112
|
+
"NamedRangeRecord",
|
|
113
|
+
"OracleConfig",
|
|
114
|
+
"OracleDiagnostic",
|
|
115
|
+
"OracleRequest",
|
|
116
|
+
"OracleResult",
|
|
117
|
+
"PlanRecommendation",
|
|
118
|
+
"PrivacyReview",
|
|
119
|
+
"ResidualBlocker",
|
|
120
|
+
"ScenarioInput",
|
|
121
|
+
"ScenarioOutput",
|
|
122
|
+
"SheetRecord",
|
|
123
|
+
"TableRecord",
|
|
124
|
+
"ValidationReport",
|
|
125
|
+
"ValidationEvaluationResult",
|
|
126
|
+
"ValidationScenario",
|
|
127
|
+
"ValidationSummary",
|
|
128
|
+
"WorkbookOracle",
|
|
129
|
+
"WorkbookReference",
|
|
130
|
+
"WorkbookRecord",
|
|
131
|
+
"WorkflowStatus",
|
|
132
|
+
"__version__",
|
|
133
|
+
"build_dependency_graph",
|
|
134
|
+
"build_conversion_plan",
|
|
135
|
+
"build_formula_reference_index",
|
|
136
|
+
"build_oracle_validation_report",
|
|
137
|
+
"build_validation_report",
|
|
138
|
+
"compare_scalar_output",
|
|
139
|
+
"execute_generated_model",
|
|
140
|
+
"evaluate_generated_model",
|
|
141
|
+
"extract_workbook",
|
|
142
|
+
"generate_python_module",
|
|
143
|
+
"infer_generated_module_contract",
|
|
144
|
+
"load_validation_scenario",
|
|
145
|
+
"normalize_cell_reference",
|
|
146
|
+
"normalize_reference",
|
|
147
|
+
"translate_formula_cell",
|
|
148
|
+
]
|