From b05846a9e33750bf70a19ab90290f36938dc2a53 Mon Sep 17 00:00:00 2001 From: Evgeny Metelkin Date: Tue, 11 Jun 2024 16:57:28 +0300 Subject: [PATCH] update readme --- README.md | 101 ++++++++--------------------------------------- README.old.md | 87 ++++++++++++++++++++++++++++++++++++++++ static/style.css | 2 +- 3 files changed, 105 insertions(+), 85 deletions(-) create mode 100644 README.old.md diff --git a/README.md b/README.md index ef1855ff7..875f60ce4 100644 --- a/README.md +++ b/README.md @@ -1,100 +1,33 @@ # SBML Heta Cases -The package is designed to test different aspects of Heta formats on [SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite). +The repository is designed to test different aspects of Heta formats on [SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite). [![Heta project](https://img.shields.io/badge/%CD%B1-Heta_project-blue)](https://hetalang.github.io/) -[![Copy visualization](https://github.com/insysbio/sbml-heta-cases/workflows/Copy%20visualization/badge.svg)](https://insysbio.github.io/sbml-heta-cases/) -[![Build and simulate](https://github.com/insysbio/sbml-heta-cases/actions/workflows/convert-to-heta.yml/badge.svg)](https://github.com/insysbio/sbml-heta-cases/actions/workflows/convert-to-heta.yml) +[![Autotest](https://github.com/insysbio/sbml-heta-cases/actions/workflows/convert-to-heta.yml/badge.svg)](https://insysbio.github.io/sbml-heta-cases/) [![GitHub issues](https://img.shields.io/github/issues/insysbio/sbml-heta-cases.svg)](https://GitHub.com/insysbio/sbml-heta-cases/issues/) [![GitHub license](https://img.shields.io/github/license/insysbio/sbml-heta-cases.svg)](https://github.com/insysbio/sbml-heta-cases/blob/master/LICENSE) +## Summary -1. Conversion of cases into Heta code and JSON format -2. Load models in SBML format and make simulations in +The GitHub Actions are utilized for the automatic testing. -## File content - -- [SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite) cases in `cases_path = "./cases/semantic"`. The original Matlab models were converted to Julia with Heta compiler. Julia code for each model is stored in `./cases/semantic//julia`, while models' settings and tags are stored in `cases_db = "./cases.json"`. -- API (documented in the *Usage* section) to upload `cases_db`, run simulations, save results to `output_path = "./cases/output"` and update status in `results_db = "./results.json"`. A simulation can end with one of the three status: `success` indicates the output file has passed [tolerance test](https://github.com/sbmlteam/sbml-test-suite/blob/master/cases/semantic/README.md#tolerances-and-errors-for-timecourse-tests), `failure` signifies that tolerance test for a given simulation was not passed and `error` stands for any error during the simulation (error message is printed to the `message` field in `results_db`). - -## Usage - -SBML Heta Cases exports the following functions: - -``` - upload_cases(;db_path::AbstractString=cases_db) +1. Download SBML Test Suite v3.4.0 semantic cases from https://github.com/sbmlteam/sbml-test-suite. -Upload cases from `cases_db`. -``` +2. Convert files of format SBML L2V5 and L3V2 (if presented) from semantic test suite to Heta format. -``` - add_cases(; - cases_path::AbstractString=cases_path, - cases_db::AbstractString=cases_db - ) +3. Store the converted models and `summary.json` in the the `result` branch. -Add new cases from `cases_path` to `cases_db`. -``` +4. The statistics of the conversion and result visualization can be seen in the https://insysbio.github.io/sbml-heta-cases/ -``` - update_results( - case::AbstractString, - cases_dict::AbstractDict=upload_cases(db_path=results_db); - cases_path::AbstractString=cases_path, - cases_db::AbstractString=cases_db, - results_db::AbstractString=results_db, - backend::DataType=default_backend, - kwargs... - ) - -Reads `results_db` to `cases_dict`, accesses the `case`, -solves it with the chosen `backend` solver and writes result to `results_db`. -``` - -``` - update_results( - cases_vec::Vector{String}, - cases_dict::AbstractDict=upload_cases(db_path=results_db); - cases_path::AbstractString=cases_path, - cases_db::AbstractString=cases_db, - results_db::AbstractString=results_db, - backend::DataType=default_backend, - kwargs... - ) - -Reads `results_db` to `cases_dict`, accesses the selected cases from `cases_vec`, -solves it with the chosen `backend` solver and writes results to `results_db`. -``` - -``` - update_results( - cases_range::UnitRange, - cases_dict::AbstractDict=upload_cases(db_path=results_db); - cases_path::AbstractString=cases_path, - cases_db::AbstractString=cases_db, - results_db::AbstractString=results_db, - backend::DataType=default_backend, - kwargs... - ) +## File content -Reads `results_db` to `cases_dict`, accesses the selected cases from `cases_range`, -solves it with the chosen `backend` solver and writes results to `results_db`. -``` +- `.github/workflows` - GitHub Actions files. +- `bash` - bash scripts for the conversion. +- `result` (temporal) - the folder with the converted models and `summary.json`. +- `static` - the folder with the static files for the GitHub Pages. +- `README.md` - the current file. -``` - update_results( - cases_dict::AbstractDict=upload_cases(db_path=results_db); - include_test_tags::Vector{String}=String[], - include_component_tags::Vector{String}=String[], - exclude_test_tags::Vector{String}=String[], - exclude_component_tags::Vector{String}=String[], - cases_path::AbstractString=cases_path, - cases_db::AbstractString=cases_db, - results_db::AbstractString=results_db, - backend::DataType=default_backend, - kwargs... - ) +## Authors -Reads `results_db` to `cases_dict`, filters the cases according to `include` and `exclude` tags, -solves it with the chosen `backend` solver and writes results to `results_db`. -``` +- Evgeny Metelkin +- Ivan Borisov diff --git a/README.old.md b/README.old.md new file mode 100644 index 000000000..198bc951a --- /dev/null +++ b/README.old.md @@ -0,0 +1,87 @@ +## File content + +- [SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite) cases in `cases_path = "./cases/semantic"`. The original Matlab models were converted to Julia with Heta compiler. Julia code for each model is stored in `./cases/semantic//julia`, while models' settings and tags are stored in `cases_db = "./cases.json"`. +- API (documented in the *Usage* section) to upload `cases_db`, run simulations, save results to `output_path = "./cases/output"` and update status in `results_db = "./results.json"`. A simulation can end with one of the three status: `success` indicates the output file has passed [tolerance test](https://github.com/sbmlteam/sbml-test-suite/blob/master/cases/semantic/README.md#tolerances-and-errors-for-timecourse-tests), `failure` signifies that tolerance test for a given simulation was not passed and `error` stands for any error during the simulation (error message is printed to the `message` field in `results_db`). + + +## Usage + +SBML Heta Cases exports the following functions: + +``` + upload_cases(;db_path::AbstractString=cases_db) + +Upload cases from `cases_db`. +``` + +``` + add_cases(; + cases_path::AbstractString=cases_path, + cases_db::AbstractString=cases_db + ) + +Add new cases from `cases_path` to `cases_db`. +``` + +``` + update_results( + case::AbstractString, + cases_dict::AbstractDict=upload_cases(db_path=results_db); + cases_path::AbstractString=cases_path, + cases_db::AbstractString=cases_db, + results_db::AbstractString=results_db, + backend::DataType=default_backend, + kwargs... + ) + +Reads `results_db` to `cases_dict`, accesses the `case`, +solves it with the chosen `backend` solver and writes result to `results_db`. +``` + +``` + update_results( + cases_vec::Vector{String}, + cases_dict::AbstractDict=upload_cases(db_path=results_db); + cases_path::AbstractString=cases_path, + cases_db::AbstractString=cases_db, + results_db::AbstractString=results_db, + backend::DataType=default_backend, + kwargs... + ) + +Reads `results_db` to `cases_dict`, accesses the selected cases from `cases_vec`, +solves it with the chosen `backend` solver and writes results to `results_db`. +``` + +``` + update_results( + cases_range::UnitRange, + cases_dict::AbstractDict=upload_cases(db_path=results_db); + cases_path::AbstractString=cases_path, + cases_db::AbstractString=cases_db, + results_db::AbstractString=results_db, + backend::DataType=default_backend, + kwargs... + ) + +Reads `results_db` to `cases_dict`, accesses the selected cases from `cases_range`, +solves it with the chosen `backend` solver and writes results to `results_db`. +``` + +``` + update_results( + cases_dict::AbstractDict=upload_cases(db_path=results_db); + include_test_tags::Vector{String}=String[], + include_component_tags::Vector{String}=String[], + exclude_test_tags::Vector{String}=String[], + exclude_component_tags::Vector{String}=String[], + cases_path::AbstractString=cases_path, + cases_db::AbstractString=cases_db, + results_db::AbstractString=results_db, + backend::DataType=default_backend, + kwargs... + ) + +Reads `results_db` to `cases_dict`, filters the cases according to `include` and `exclude` tags, +solves it with the chosen `backend` solver and writes results to `results_db`. +``` diff --git a/static/style.css b/static/style.css index dcf3fa54e..48977a174 100644 --- a/static/style.css +++ b/static/style.css @@ -139,5 +139,5 @@ pre { background-color: yellow; } .retCode_9 { - background-color: gray; + background-color: lightgray; } \ No newline at end of file