otwin 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- otwin-0.2.0/.gitignore +13 -0
- otwin-0.2.0/CHANGELOG.md +107 -0
- otwin-0.2.0/CODE_OF_CONDUCT.md +42 -0
- otwin-0.2.0/CONTRIBUTING.md +89 -0
- otwin-0.2.0/LICENSE +202 -0
- otwin-0.2.0/MAINTAINERS.md +52 -0
- otwin-0.2.0/NOTICE +7 -0
- otwin-0.2.0/PKG-INFO +537 -0
- otwin-0.2.0/README.md +480 -0
- otwin-0.2.0/SECURITY.md +28 -0
- otwin-0.2.0/benchmarks/bench_integrator.py +293 -0
- otwin-0.2.0/benchmarks/results/benchmark_summary.json +23 -0
- otwin-0.2.0/benchmarks/results/simple_forecasting.json +22 -0
- otwin-0.2.0/benchmarks/results/water_tank.json +22 -0
- otwin-0.2.0/benchmarks/results/water_tank_metadata.json +9 -0
- otwin-0.2.0/benchmarks/run_benchmarks.py +219 -0
- otwin-0.2.0/conftest.py +17 -0
- otwin-0.2.0/examples/bess_end_to_end.py +234 -0
- otwin-0.2.0/pyproject.toml +111 -0
- otwin-0.2.0/src/otwin/__init__.py +91 -0
- otwin-0.2.0/src/otwin/advise/__init__.py +9 -0
- otwin-0.2.0/src/otwin/advise/envelope.py +294 -0
- otwin-0.2.0/src/otwin/estimate/__init__.py +80 -0
- otwin-0.2.0/src/otwin/estimate/energy.py +485 -0
- otwin-0.2.0/src/otwin/estimate/kalman.py +470 -0
- otwin-0.2.0/src/otwin/estimate/linear.py +198 -0
- otwin-0.2.0/src/otwin/estimate/mhe.py +411 -0
- otwin-0.2.0/src/otwin/forecast/__init__.py +82 -0
- otwin-0.2.0/src/otwin/forecast/baselines.py +186 -0
- otwin-0.2.0/src/otwin/forecast/calibration.py +150 -0
- otwin-0.2.0/src/otwin/forecast/ensemble.py +112 -0
- otwin-0.2.0/src/otwin/forecast/gp_phs.py +134 -0
- otwin-0.2.0/src/otwin/forecast/metrics.py +301 -0
- otwin-0.2.0/src/otwin/forecast/protocol.py +298 -0
- otwin-0.2.0/src/otwin/forecast/report.py +257 -0
- otwin-0.2.0/src/otwin/forecast/splitters.py +155 -0
- otwin-0.2.0/src/otwin/interfaces/__init__.py +55 -0
- otwin-0.2.0/src/otwin/interfaces/manifest.py +265 -0
- otwin-0.2.0/src/otwin/interfaces/protocols.py +390 -0
- otwin-0.2.0/src/otwin/interfaces/results.py +388 -0
- otwin-0.2.0/src/otwin/io/__init__.py +150 -0
- otwin-0.2.0/src/otwin/io/loader.py +129 -0
- otwin-0.2.0/src/otwin/io/modbus.py +712 -0
- otwin-0.2.0/src/otwin/io/registry.py +74 -0
- otwin-0.2.0/src/otwin/io/simulator.py +659 -0
- otwin-0.2.0/src/otwin/io/source.py +419 -0
- otwin-0.2.0/src/otwin/io/sunspec.py +1189 -0
- otwin-0.2.0/src/otwin/model/__init__.py +86 -0
- otwin-0.2.0/src/otwin/model/integrators.py +1119 -0
- otwin-0.2.0/src/otwin/model/iphs.py +255 -0
- otwin-0.2.0/src/otwin/model/library.py +371 -0
- otwin-0.2.0/src/otwin/model/linalg.py +129 -0
- otwin-0.2.0/src/otwin/model/losses.py +34 -0
- otwin-0.2.0/src/otwin/model/phnn.py +235 -0
- otwin-0.2.0/src/otwin/model/phs.py +248 -0
- otwin-0.2.0/src/otwin/model/solvers.py +127 -0
- otwin-0.2.0/src/otwin/py.typed +0 -0
- otwin-0.2.0/src/otwin/signal/__init__.py +17 -0
- otwin-0.2.0/src/otwin/signal/condition.py +218 -0
- otwin-0.2.0/tests/test_advise.py +618 -0
- otwin-0.2.0/tests/test_calibration.py +72 -0
- otwin-0.2.0/tests/test_closed_form.py +181 -0
- otwin-0.2.0/tests/test_ensemble.py +104 -0
- otwin-0.2.0/tests/test_estimate.py +462 -0
- otwin-0.2.0/tests/test_forecast_no_leakage.py +231 -0
- otwin-0.2.0/tests/test_gp_phs.py +39 -0
- otwin-0.2.0/tests/test_guards.py +155 -0
- otwin-0.2.0/tests/test_integrators.py +540 -0
- otwin-0.2.0/tests/test_interfaces_has_no_algorithms.py +156 -0
- otwin-0.2.0/tests/test_io.py +646 -0
- otwin-0.2.0/tests/test_io_paths.py +1806 -0
- otwin-0.2.0/tests/test_iphs.py +96 -0
- otwin-0.2.0/tests/test_iphs_enforcement.py +58 -0
- otwin-0.2.0/tests/test_library.py +395 -0
- otwin-0.2.0/tests/test_linalg.py +112 -0
- otwin-0.2.0/tests/test_metrics.py +134 -0
- otwin-0.2.0/tests/test_packaging.py +132 -0
- otwin-0.2.0/tests/test_phnn.py +40 -0
- otwin-0.2.0/tests/test_phs_core.py +308 -0
- otwin-0.2.0/tests/test_protocol.py +128 -0
- otwin-0.2.0/tests/test_protocols.py +630 -0
- otwin-0.2.0/tests/test_registry.py +139 -0
- otwin-0.2.0/tests/test_signal.py +524 -0
- otwin-0.2.0/tests/test_structural_guarantees.py +150 -0
- otwin-0.2.0/tests/test_structure_preserving.py +59 -0
- otwin-0.2.0/tests/test_without_torch.py +85 -0
otwin-0.2.0/.gitignore
ADDED
otwin-0.2.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are recorded here.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
6
|
+
this project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
Until version 1.0.0 the public API may change between minor versions. Pin an
|
|
9
|
+
exact version in anything you depend on.
|
|
10
|
+
|
|
11
|
+
## [Unreleased]
|
|
12
|
+
|
|
13
|
+
Nothing yet.
|
|
14
|
+
|
|
15
|
+
## [0.2.0] — 2026-08-13
|
|
16
|
+
|
|
17
|
+
First consolidated release. Thirteen separate packages were merged into one
|
|
18
|
+
distribution named `otwin`, and the result was audited before publication.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- **One package instead of thirteen.** `otwin` now contains the whole
|
|
23
|
+
modelling, estimation and validation stack. The module layout follows the six
|
|
24
|
+
data-processing blocks of ISO 13374: `otwin.io` (data acquisition),
|
|
25
|
+
`otwin.signal` (data manipulation), `otwin.estimate` (state detection),
|
|
26
|
+
`otwin.model` (health assessment), `otwin.forecast` (prognostic assessment)
|
|
27
|
+
and `otwin.advise` (advisory generation).
|
|
28
|
+
- **Field connectors.** SunSpec Modbus (models 1, 701, 702, 704, 713, 802, 803,
|
|
29
|
+
804, 805) and generic Modbus TCP/RTU, both read-only, both with a simulator
|
|
30
|
+
that drives the identical decode path so the library can be developed and
|
|
31
|
+
tested without hardware.
|
|
32
|
+
- **Validity envelopes** (`otwin.advise`). A forecast request outside the
|
|
33
|
+
operating range the model was identified over, or beyond the horizon it was
|
|
34
|
+
validated to, returns a refusal with a reason rather than a number.
|
|
35
|
+
- **Leakage-free forecast validation** (`otwin.forecast.protocol`). Held-out
|
|
36
|
+
targets are not reachable from the model under evaluation; the split is
|
|
37
|
+
out-of-sample and a reference forecaster is compulsory rather than optional.
|
|
38
|
+
- **Structure-preserving integration.** Implicit midpoint with an analytic
|
|
39
|
+
Jacobian, `I - (dt/2)(J - R)grad^2 H`, factorised once and reused. Roughly
|
|
40
|
+
140x faster than the previous `fsolve` path at n = 50, with the energy bound
|
|
41
|
+
held to 1e-9.
|
|
42
|
+
- **Type information for downstream users.** The package ships a PEP 561
|
|
43
|
+
`py.typed` marker, so a project that installs `otwin` and runs mypy gets its
|
|
44
|
+
own call sites checked.
|
|
45
|
+
- **Supply-chain hardening.** Every GitHub Action pinned to a commit SHA;
|
|
46
|
+
CodeQL with the extended query pack; OpenSSF Scorecard publishing results;
|
|
47
|
+
Dependabot.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
Four defects, each found by a test written against the behaviour rather than
|
|
52
|
+
against the implementation, and each now covered by a regression test verified
|
|
53
|
+
to fail on the previous code.
|
|
54
|
+
|
|
55
|
+
- **Forecast evaluation could see the held-out data.** `protocol.py` passed the
|
|
56
|
+
test window to `model.predict()` at two separate call sites, so a reported
|
|
57
|
+
skill score measured interpolation rather than forecasting. The test targets
|
|
58
|
+
are no longer an argument to the function that asks the model for a
|
|
59
|
+
prediction.
|
|
60
|
+
- **An unrecorded operating range admitted any operating point.**
|
|
61
|
+
`advise/envelope.py` skipped the state check entirely when `state_bounds` was
|
|
62
|
+
`None`, so a twin with no identified range returned a clean verdict for a
|
|
63
|
+
state of charge of 1e12. An absent range is now a refusal, matching the rule
|
|
64
|
+
the horizon check already followed.
|
|
65
|
+
- **Resampling ran past the last measurement.** `signal/condition.py` built its
|
|
66
|
+
grid up to half a step beyond the final sample and `coverage()` reported the
|
|
67
|
+
invented point as measured. The grid now stops at the last whole step.
|
|
68
|
+
- **A corrupt SunSpec scale factor destroyed the whole sample.**
|
|
69
|
+
`io/sunspec.py` computed `10.0 ** exponent` unguarded and outside the
|
|
70
|
+
per-model error handling, so one bad `sunssf` register raised `OverflowError`
|
|
71
|
+
out of `read()` and lost every other model on the chain. The exponent is now
|
|
72
|
+
range-checked against the SunSpec specification and the affected points
|
|
73
|
+
degrade through the existing quality ladder.
|
|
74
|
+
- **State of charge was lost when one of two views went dark.**
|
|
75
|
+
`SunSpecSource.soc()` chose between models 713 and 802 on publication order
|
|
76
|
+
and then refused if that one read bad — even with the other answering
|
|
77
|
+
cleanly. Candidates are now ranked by readability first, so the model
|
|
78
|
+
preference breaks ties rather than overriding them.
|
|
79
|
+
- **The learned-model path named a package that does not exist.**
|
|
80
|
+
`model/phnn.py` instructed users to `pip install otwin-learn[torch]`, left
|
|
81
|
+
over from the pre-merge distributions. It now names the real extra,
|
|
82
|
+
`otwin[nn]`, checked in CI against the metadata pip itself reads.
|
|
83
|
+
|
|
84
|
+
### Changed
|
|
85
|
+
|
|
86
|
+
- The source distribution no longer carries the README artwork. Every image is
|
|
87
|
+
referenced by absolute URL, so the 2.1 MB of PNGs were downloaded by everyone
|
|
88
|
+
installing from source and displayed to nobody. sdist 3.07 MB to 0.83 MB.
|
|
89
|
+
- `dev` extra no longer pulls PyTorch. Two test modules need it and both skip
|
|
90
|
+
cleanly without it; use `pip install -e ".[dev,nn]"` to run them.
|
|
91
|
+
|
|
92
|
+
### Verification
|
|
93
|
+
|
|
94
|
+
489 tests, 92 % statement coverage, mypy clean across 39 modules, ruff clean.
|
|
95
|
+
`otwin.io.sunspec`, `otwin.io.source`, `otwin.io.loader`, `otwin.advise` and
|
|
96
|
+
`otwin.signal` are at 100 %. The distribution is additionally tested as
|
|
97
|
+
installed — built as a wheel and imported in a container that has never seen
|
|
98
|
+
this repository.
|
|
99
|
+
|
|
100
|
+
### Known limitations
|
|
101
|
+
|
|
102
|
+
- Python only. Julia and MATLAB implementations are open contributor positions.
|
|
103
|
+
- Connectors are read-only. Closed-loop actuation is deliberately out of scope.
|
|
104
|
+
- No production deployment on an operating asset is known to the maintainer.
|
|
105
|
+
|
|
106
|
+
[Unreleased]: https://github.com/otwin-core/otwin/compare/v0.2.0...HEAD
|
|
107
|
+
[0.2.0]: https://github.comit/otwin-core/otwin/releases/tag/v0.2.0
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our pledge
|
|
4
|
+
|
|
5
|
+
We pledge to make participation in this project a harassment-free experience
|
|
6
|
+
for everyone, regardless of age, body size, disability, ethnicity, sex
|
|
7
|
+
characteristics, gender identity and expression, level of experience,
|
|
8
|
+
education, socio-economic status, nationality, personal appearance, race,
|
|
9
|
+
religion, or sexual identity and orientation.
|
|
10
|
+
|
|
11
|
+
## Our standards
|
|
12
|
+
|
|
13
|
+
Examples of behaviour that contributes to a positive environment:
|
|
14
|
+
|
|
15
|
+
- Using welcoming and inclusive language
|
|
16
|
+
- Being respectful of differing viewpoints and experiences
|
|
17
|
+
- Gracefully accepting constructive criticism
|
|
18
|
+
- Focusing on what is best for the community
|
|
19
|
+
- Showing empathy towards other community members
|
|
20
|
+
|
|
21
|
+
Examples of unacceptable behaviour:
|
|
22
|
+
|
|
23
|
+
- Sexualised language or imagery, and unwelcome sexual attention or advances
|
|
24
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
25
|
+
- Public or private harassment
|
|
26
|
+
- Publishing others' private information without explicit permission
|
|
27
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
28
|
+
professional setting
|
|
29
|
+
|
|
30
|
+
## Enforcement
|
|
31
|
+
|
|
32
|
+
Instances of abusive, harassing, or otherwise unacceptable behaviour may be
|
|
33
|
+
reported to the project maintainer at javier@jmarin.info. All complaints will be reviewed
|
|
34
|
+
and investigated promptly and fairly.
|
|
35
|
+
|
|
36
|
+
Maintainers are obligated to respect the privacy and security of the reporter
|
|
37
|
+
of any incident.
|
|
38
|
+
|
|
39
|
+
## Attribution
|
|
40
|
+
|
|
41
|
+
Adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
|
|
42
|
+
version 2.0.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Practices follow [ColPrac](https://github.com/SciML/ColPrac).
|
|
4
|
+
|
|
5
|
+
## The three most useful contributions
|
|
6
|
+
|
|
7
|
+
1. **A reference case.** A physical system with a closed-form answer that no
|
|
8
|
+
current case covers, for [`otwin-spec`](https://github.com/otwin-core/otwin-spec).
|
|
9
|
+
It needs four things: the system and its parameters, an analytically known
|
|
10
|
+
result, a stated rationale for what goes wrong without the check, and a
|
|
11
|
+
**fault injection test** proving the check catches the fault it was written
|
|
12
|
+
for. The last is not optional — a check without one is untested code
|
|
13
|
+
protecting untested code.
|
|
14
|
+
2. **A Julia or MATLAB implementation.** See [MAINTAINERS.md](MAINTAINERS.md).
|
|
15
|
+
Both slots are open and the definition of done is objective.
|
|
16
|
+
3. **A register map.** If you run a PCS or BMS whose Modbus map is not SunSpec,
|
|
17
|
+
the map itself is useful even with no code attached.
|
|
18
|
+
|
|
19
|
+
## Dependency licence policy
|
|
20
|
+
|
|
21
|
+
This is a hard rule, not a preference, and it is the reason the connector layer
|
|
22
|
+
looks the way it does.
|
|
23
|
+
|
|
24
|
+
- **The base install carries NumPy and SciPy.** Nothing else.
|
|
25
|
+
- **Nothing under a copyleft licence is ever a hard requirement.** LGPL and MPL
|
|
26
|
+
dependencies may be optional extras. GPL dependencies may not be vendored at
|
|
27
|
+
all.
|
|
28
|
+
- **Three protocols are deliberately out of scope**, because in 2026 no
|
|
29
|
+
permissively licensed Python path to them exists:
|
|
30
|
+
|
|
31
|
+
| Protocol | Why not |
|
|
32
|
+
|---|---|
|
|
33
|
+
| IEC 61850 | `libiec61850` is GPL-3.0 or commercial; its SWIG bindings are explicitly unsupported by their own maintainers |
|
|
34
|
+
| IEC 60870-5-104 | `c104` is GPL-3.0, and capped at Python < 3.13 |
|
|
35
|
+
| DNP3 (IEEE 1815) | `opendnp3` was archived read-only in Sept 2022; its successor `stepfunc/dnp3` prohibits commercial and production use |
|
|
36
|
+
|
|
37
|
+
Use an out-of-process gateway (61850 → OPC UA or MQTT) and read that with a
|
|
38
|
+
supported connector. A pull request adding any of the three as a dependency
|
|
39
|
+
will be declined however good the code is.
|
|
40
|
+
|
|
41
|
+
## Standards claims
|
|
42
|
+
|
|
43
|
+
Sort every claim into one of four buckets and keep it there:
|
|
44
|
+
|
|
45
|
+
- **Implemented and tested** — ISO 13374 architecture, SunSpec model
|
|
46
|
+
conformance, IEC 63278-1 AAS submodel export.
|
|
47
|
+
- **Aligned to, stated as design intent with a mapping table** — ISO 13381-1,
|
|
48
|
+
IEEE 1856-2017, IEC 61850-7-420 Ed. 2.0.
|
|
49
|
+
- **Vocabulary borrowed, stated as vocabulary** — ISA-95 / IEC 62264,
|
|
50
|
+
ISO/IEC 9646, ISO 23247, ANSI/ISA-18.2.
|
|
51
|
+
- **Never claimed** — IEEE 1547 / 1547.1 compliance, ISA/IEC 62443
|
|
52
|
+
certification, UL 1741 SB. **A library cannot be IEEE 1547 compliant; a DER
|
|
53
|
+
device can.** 1547.1 Clause 6 is an interoperability test performed on
|
|
54
|
+
hardware. Say what the code supports; never say what it is certified to.
|
|
55
|
+
|
|
56
|
+
One claim in the wrong bucket undoes the argument the type test exists to make.
|
|
57
|
+
|
|
58
|
+
## Tests
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install -e ".[dev]"
|
|
62
|
+
pytest
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`[dev]` deliberately leaves out PyTorch — it is a ~2 GB download and only two
|
|
66
|
+
test modules need it. They skip cleanly without it, and `test_without_torch.py`
|
|
67
|
+
exists to keep that path green. If you are working on the learned models:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pip install -e ".[dev,nn]"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Doctests run as part of the suite, so every example in a docstring is executed.
|
|
74
|
+
|
|
75
|
+
New code needs the test that would fail without it. In particular:
|
|
76
|
+
|
|
77
|
+
- A new integrator needs an **energy-conservation** test, not only an accuracy
|
|
78
|
+
test. That distinction is the point of the package.
|
|
79
|
+
- A new splitter needs a **leakage** test — a demonstration that no test index
|
|
80
|
+
precedes a train index it should not.
|
|
81
|
+
- A new reference forecaster needs to be **genuinely hard to beat**. A straw man
|
|
82
|
+
makes every model look good and is worse than nothing.
|
|
83
|
+
- A new connector needs a **simulator** so it can be tested in CI without
|
|
84
|
+
hardware, and the simulator must drive the same decode path as the real
|
|
85
|
+
source. A test that bypasses the decoder tests nothing.
|
|
86
|
+
|
|
87
|
+
## Git
|
|
88
|
+
|
|
89
|
+
Never commit to `main`. Every change opens a branch and a pull request.
|
otwin-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 Javier Marin
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Maintainers
|
|
2
|
+
|
|
3
|
+
| Name | GitHub | Scope |
|
|
4
|
+
|---|---|---|
|
|
5
|
+
| Javier Marin | [@Javihaus](https://github.com/Javihaus) | Everything, for now |
|
|
6
|
+
|
|
7
|
+
## Two open maintainer slots
|
|
8
|
+
|
|
9
|
+
The type test in [`otwin-spec`](https://github.com/otwin-core/otwin-spec) grades
|
|
10
|
+
an implementation over a subprocess boundary, so it can judge a language this
|
|
11
|
+
repository knows nothing about. That makes a second-language implementation a
|
|
12
|
+
self-contained piece of work with an objective definition of done: **pass the
|
|
13
|
+
abstract test suite, unmodified.**
|
|
14
|
+
|
|
15
|
+
### Julia — open
|
|
16
|
+
|
|
17
|
+
A minimal native core, not a wrapper. Julia has better tools for this than
|
|
18
|
+
Python does — `ForwardDiff` for the energy gradient, `DifferentialEquations.jl`
|
|
19
|
+
for the solver — so a wrapper would be worse than the thing it wraps.
|
|
20
|
+
|
|
21
|
+
Scope is roughly a thousand lines: the energy-based model (`J`, `R`, `H`, `g`,
|
|
22
|
+
power balance, structure checks), an energy-consistent integrator, manifest
|
|
23
|
+
read and write, and the conformance adapter. Nothing else. Evaluation,
|
|
24
|
+
estimation and uncertainty stay Python-only until someone asks, and the
|
|
25
|
+
implementation declares that in its conformance statement rather than implying
|
|
26
|
+
parity.
|
|
27
|
+
|
|
28
|
+
### MATLAB — open
|
|
29
|
+
|
|
30
|
+
Same scope, same test. Pure MATLAB: File Exchange refuses any submission
|
|
31
|
+
containing MEX files or compiled binaries, and a toolbox that shells out to
|
|
32
|
+
Python is useless to the Simulink and Simscape users who are the reason to ship
|
|
33
|
+
MATLAB at all.
|
|
34
|
+
|
|
35
|
+
### What being a maintainer means here, concretely
|
|
36
|
+
|
|
37
|
+
- Review pull requests that touch your area. There will not be many.
|
|
38
|
+
- Have an opinion when a design decision affects it.
|
|
39
|
+
- You do **not** need to write code on a schedule.
|
|
40
|
+
- You do **not** need to know the rest of the ecosystem.
|
|
41
|
+
- You can stop whenever you like, and we will say so gracefully in this file.
|
|
42
|
+
|
|
43
|
+
Open an issue titled `Maintainer: <your name>`, or email javier@jmarin.info. A
|
|
44
|
+
short yes is enough to start a conversation.
|
|
45
|
+
|
|
46
|
+
## Governance
|
|
47
|
+
|
|
48
|
+
There is none yet, deliberately. A steering council of one person is theatre.
|
|
49
|
+
|
|
50
|
+
When this project has two or more external maintainers we will adopt the
|
|
51
|
+
standard NumFOCUS template, the same one [SciML](https://sciml.ai/governance/)
|
|
52
|
+
uses.
|