diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..29ba11a1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,46 @@ +# Contributing + +Contributions to the PEtab SciML test suite are welcome. Please either: + +- (Preferred) open a + [pull request](https://github.com/sebapersson/petab_sciml_testsuite/pulls) (drafts + welcome) adding one or more test cases. +- Or open an [issue](https://github.com/sebapersson/petab_sciml_testsuite/issues) describing + the missing coverage. + +## Adding a new test case + +To add a new test case, create a subdirectory in the relevant suite under `test_cases/`, +named with the next three-digit ID (e.g., `003`). Include a short README describing what the +test covers. Most test files should be generated automatically using utility functions from +this repository’s associated Julia library. We use Julia for its strong SciML ecosystem and +mature tooling for computing reference gradients (high-order finite-difference methods). To +install this Julia library, with Julia ≥1.10, from the root directory of repository start +Julia and run: + +```julia +import Pkg; Pkg.instantiate() +``` + +Which files to add depends on the test type. + +For **ML model import tests**, provide both `net.jl` and `net.py` script. The `net.jl` +script should generate the test inputs, ML parameters, expected outputs, and +`solutions.yaml`. The `net.py` script should create the PEtab SciML ML-model YAML file and +checks consistency with the ML model used to produce the Julia reference outputs. This +ensures the case is importable in both Python (e.g., PyTorch/Equinox) and Julia, aligning +with the goal that the PEtab SciML YAML is exchangeable across ecosystems. An example can be +found +[here](https://github.com/sebapersson/petab_sciml_testsuite/tree/main/test_cases/net_import/001). + +For **PEtab SciML import problem tests**, provide a `create.jl` script. It should generate +the PEtab problem files and the reference values. For the PEtab problem files, the mapping +and hybridisation PEtab tables must be provided manually, the other components can be +selected from predefined assets (`assets/` for SBML models, ML-model YAMLs, ML parameters, +and array inputs) and defaults in `src/` (new values can be added if needed). For the +reference values, include an `llh_id` that maps to a likelihood implementation in +`src/test_values/nllh/`. Because these SciML problems are not analytically solvable, the +likelihood must be implemented explicitly. An example can be found +[here](https://github.com/sebapersson/petab_sciml_testsuite/tree/main/test_cases/hybrid/001). + +**Initialization tests** are specified similarly to PEtab SciML import problem. diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..274d1f37 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +MIT License + +Copyright (c) 2026, PEtab - an SBML and TSV-based data format for parameter estimation +problems in systems biology + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 96e5591c..cc77c6d8 100644 --- a/README.md +++ b/README.md @@ -109,50 +109,3 @@ memory access). For example, for images PyTorch expects `(C, H, W)`, whereas Jul `(H, W, C)`; accordingly, test case 018 sets `input_order_py = (C, H, W)` and `input_order_jl = (H, W, C)`. If you add an importer for another language (e.g., R), provide the corresponding input/output orders in `solutions.yaml` for the ML import tests. - -## Contributing - -Contributions to the PEtab SciML test suite are welcome. Please either: - -- (Preferred) open a - [pull request](https://github.com/sebapersson/petab_sciml_testsuite/pulls) (drafts - welcome) adding one or more test cases. -- Or open an [issue](https://github.com/sebapersson/petab_sciml_testsuite/issues) describing - the missing coverage. - -### Adding a new test case - -To add a new test case, create a subdirectory in the relevant suite under `test_cases/`, -named with the next three-digit ID (e.g., `003`). Include a short README describing what the -test covers. Most test files should be generated automatically using utility functions from -this repository’s associated Julia library. We use Julia for its strong SciML ecosystem and -mature tooling for computing reference gradients (high-order finite-difference methods). To -install this Julia library, with Julia ≥1.10, from the root directory of repository start -Julia and run: - -```julia -import Pkg; Pkg.instantiate() -``` - -Which files to add depends on the test type. - -For **ML model import tests**, provide both `net.jl` and `net.py` script. The `net.jl` -script should generate the test inputs, ML parameters, expected outputs, and -`solutions.yaml`. The `net.py` script should create the PEtab SciML ML-model YAML file and -checks consistency with the ML model used to produce the Julia reference outputs. This -ensures the case is importable in both Python (e.g., PyTorch/Equinox) and Julia, aligning -with the goal that the PEtab SciML YAML is exchangeable across ecosystems. An example can be -found -[here](https://github.com/sebapersson/petab_sciml_testsuite/tree/main/test_cases/net_import/001). - -For **PEtab SciML import problem tests**, provide a `create.jl` script. It should generate -the PEtab problem files and the reference values. For the PEtab problem files, the mapping -and hybridisation PEtab tables must be provided manually, the other components can be -selected from predefined assets (`assets/` for SBML models, ML-model YAMLs, ML parameters, -and array inputs) and defaults in `src/` (new values can be added if needed). For the -reference values, include an `llh_id` that maps to a likelihood implementation in -`src/test_values/nllh/`. Because these SciML problems are not analytically solvable, the -likelihood must be implemented explicitly. An example can be found -[here](https://github.com/sebapersson/petab_sciml_testsuite/tree/main/test_cases/hybrid/001). - -**Initialization tests** are specified similarly to PEtab SciML import problem.