-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,713 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: build | ||
# This should ensure that the workflow won't run on `dev-*` branches, but will | ||
# otherwise execute on any other branch and any pull request (including dev | ||
# branches). | ||
on: | ||
push: | ||
branches-ignore: | ||
- 'dev-*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
env: | ||
# A fixed version used for testing, so that the builds don't | ||
# spontaneously break after a few years. | ||
# Make sure to update this from time to time. | ||
RUST_VERSION: "1.77.0" | ||
jobs: | ||
# Check formatting | ||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- name: Checkout. | ||
uses: actions/checkout@v3 | ||
- name: Install Rust toolchain. | ||
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ env.RUST_VERSION }} | ||
- name: Rust format check. | ||
run: cargo fmt --all -- --check | ||
|
||
# Run basic code validity check | ||
check: | ||
needs: fmt | ||
name: Check | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- name: Checkout. | ||
uses: actions/checkout@v3 | ||
- name: Install Rust toolchain. | ||
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ env.RUST_VERSION }} | ||
- name: Rust code validity check. | ||
run: cargo check | ||
|
||
# Run all tests | ||
test: | ||
needs: check | ||
name: Test Suite | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout. | ||
uses: actions/checkout@v3 | ||
- name: Install Rust toolchain. | ||
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ env.RUST_VERSION }} | ||
- name: Run tests. | ||
run: cargo test --all-features | ||
|
||
# Check code style | ||
clippy: | ||
needs: check | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- name: Checkout. | ||
uses: actions/checkout@v3 | ||
- name: Install Rust toolchain. | ||
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ env.RUST_VERSION }} | ||
- name: Run clippy. | ||
run: cargo clippy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ Cargo.lock | |
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[package] | ||
name = "biodivine-lib-bma-data" | ||
version = "0.0.1" | ||
authors = ["Ondřej Huvar <[email protected]>", "Samuel Pastva <[email protected]>"] | ||
edition = "2021" | ||
description = "Library for working with models in BMA format." | ||
homepage = "https://github.com/sybila/biodivine-lib-bma-data" | ||
repository = "https://github.com/sybila/biodivine-lib-bma-data" | ||
readme = "README.md" | ||
keywords = ["boolean-network", "BMA", "systems-biology"] | ||
categories = ["science", "simulation"] | ||
license = "MIT" | ||
|
||
[lib] | ||
name = "biodivine_lib_bma_data" | ||
path = "src/lib.rs" | ||
|
||
[dependencies] | ||
biodivine-lib-param-bn = ">=0.5.11, <1.0.0" | ||
clap = { version = "4.1.4", features = ["derive"] } | ||
rand = "0.8.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Model":{"Name":"Resting Neuron","Variables":[{"Id":6,"RangeFrom":0,"RangeTo":1,"Formula":"0"},{"Id":24,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":25,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":26,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":27,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":1,"RangeFrom":0,"RangeTo":1,"Formula":"max(var(3),var(1))-var(5)"},{"Id":3,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":4,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":5,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":28,"RangeFrom":0,"RangeTo":1,"Formula":"max(var(29),var(28))-var(31)"},{"Id":29,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":30,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":31,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":32,"RangeFrom":0,"RangeTo":1,"Formula":"max(var(33),var(32))-var(35)"},{"Id":33,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":34,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":35,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":36,"RangeFrom":0,"RangeTo":1,"Formula":"max(var(37),var(36))-var(39)"},{"Id":37,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":38,"RangeFrom":0,"RangeTo":1,"Formula":""},{"Id":39,"RangeFrom":0,"RangeTo":1,"Formula":""}],"Relationships":[{"Id":4,"FromVariable":4,"ToVariable":5,"Type":"Activator"},{"Id":21,"FromVariable":30,"ToVariable":31,"Type":"Activator"},{"Id":21,"FromVariable":34,"ToVariable":35,"Type":"Activator"},{"Id":21,"FromVariable":38,"ToVariable":39,"Type":"Activator"},{"Id":2,"FromVariable":3,"ToVariable":1,"Type":"Activator"},{"Id":3,"FromVariable":1,"ToVariable":4,"Type":"Activator"},{"Id":5,"FromVariable":5,"ToVariable":1,"Type":"Inhibitor"},{"Id":10,"FromVariable":1,"ToVariable":24,"Type":"Activator"},{"Id":18,"FromVariable":1,"ToVariable":1,"Type":"Activator"},{"Id":1,"FromVariable":6,"ToVariable":3,"Type":"Activator"},{"Id":19,"FromVariable":29,"ToVariable":28,"Type":"Activator"},{"Id":20,"FromVariable":28,"ToVariable":30,"Type":"Activator"},{"Id":22,"FromVariable":31,"ToVariable":28,"Type":"Inhibitor"},{"Id":23,"FromVariable":28,"ToVariable":28,"Type":"Activator"},{"Id":25,"FromVariable":28,"ToVariable":25,"Type":"Activator"},{"Id":24,"FromVariable":24,"ToVariable":29,"Type":"Activator"},{"Id":19,"FromVariable":33,"ToVariable":32,"Type":"Activator"},{"Id":20,"FromVariable":32,"ToVariable":34,"Type":"Activator"},{"Id":22,"FromVariable":35,"ToVariable":32,"Type":"Inhibitor"},{"Id":23,"FromVariable":32,"ToVariable":32,"Type":"Activator"},{"Id":27,"FromVariable":32,"ToVariable":26,"Type":"Activator"},{"Id":26,"FromVariable":25,"ToVariable":33,"Type":"Activator"},{"Id":19,"FromVariable":37,"ToVariable":36,"Type":"Activator"},{"Id":20,"FromVariable":36,"ToVariable":38,"Type":"Activator"},{"Id":22,"FromVariable":39,"ToVariable":36,"Type":"Inhibitor"},{"Id":23,"FromVariable":36,"ToVariable":36,"Type":"Activator"},{"Id":29,"FromVariable":36,"ToVariable":27,"Type":"Activator"},{"Id":28,"FromVariable":26,"ToVariable":37,"Type":"Activator"}]},"Layout":{"Variables":[{"Id":6,"Name":"Potential","Type":"Constant","ContainerId":0,"PositionX":454.16666666666663,"PositionY":222.14285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":24,"Name":"P2","Type":"Constant","ContainerId":0,"PositionX":704.1666666666666,"PositionY":222.14285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":25,"Name":"P3","Type":"Constant","ContainerId":0,"PositionX":954.1666666666666,"PositionY":222.14285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":26,"Name":"P4","Type":"Constant","ContainerId":0,"PositionX":1204.1666666666667,"PositionY":222.14285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":27,"Name":"Output","Type":"Constant","ContainerId":0,"PositionX":1454.1666666666667,"PositionY":222.14285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":1,"Name":"Pore","Type":"MembraneReceptor","ContainerId":1,"PositionX":378.7883124043404,"PositionY":293.0092058578739,"CellX":null,"CellY":null,"Angle":0},{"Id":3,"Name":"VS","Type":"MembraneReceptor","ContainerId":1,"PositionX":451.29012214872057,"PositionY":328.0311128390987,"CellX":null,"CellY":null,"Angle":45},{"Id":4,"Name":"CTD_connect","Type":"Default","ContainerId":1,"PositionX":399.06666666666666,"PositionY":381.2285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":5,"Name":"CTD","Type":"Default","ContainerId":1,"PositionX":351.56666666666666,"PositionY":381.2285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":28,"Name":"Pore","Type":"MembraneReceptor","ContainerId":2,"PositionX":628.7883124043486,"PositionY":293.00920585707354,"CellX":null,"CellY":null,"Angle":0},{"Id":29,"Name":"VS","Type":"MembraneReceptor","ContainerId":2,"PositionX":701.29012214872,"PositionY":328.03111283909914,"CellX":null,"CellY":null,"Angle":45},{"Id":30,"Name":"CTD_connect","Type":"Default","ContainerId":2,"PositionX":649.0666666666666,"PositionY":381.2285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":31,"Name":"CTD","Type":"Default","ContainerId":2,"PositionX":601.5666666666666,"PositionY":381.2285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":32,"Name":"Pore","Type":"MembraneReceptor","ContainerId":3,"PositionX":878.7883124042828,"PositionY":293.00920586354914,"CellX":null,"CellY":null,"Angle":0},{"Id":33,"Name":"VS","Type":"MembraneReceptor","ContainerId":3,"PositionX":951.2901221487209,"PositionY":328.03111283909834,"CellX":null,"CellY":null,"Angle":45},{"Id":34,"Name":"CTD_connect","Type":"Default","ContainerId":3,"PositionX":899.0666666666666,"PositionY":381.2285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":35,"Name":"CTD","Type":"Default","ContainerId":3,"PositionX":851.5666666666666,"PositionY":381.2285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":36,"Name":"Pore","Type":"MembraneReceptor","ContainerId":4,"PositionX":1128.788312404283,"PositionY":293.0092058635637,"CellX":null,"CellY":null,"Angle":0},{"Id":37,"Name":"VS","Type":"MembraneReceptor","ContainerId":4,"PositionX":1201.29012214872,"PositionY":328.03111283909925,"CellX":null,"CellY":null,"Angle":45},{"Id":38,"Name":"CTD_connect","Type":"Default","ContainerId":4,"PositionX":1149.0666666666666,"PositionY":381.2285714285714,"CellX":null,"CellY":null,"Angle":0},{"Id":39,"Name":"CTD","Type":"Default","ContainerId":4,"PositionX":1101.5666666666666,"PositionY":381.2285714285714,"CellX":null,"CellY":null,"Angle":0}],"Containers":[{"Id":1,"Name":"","Size":1,"PositionX":1,"PositionY":1},{"Id":2,"Name":"","Size":1,"PositionX":2,"PositionY":1},{"Id":3,"Name":"","Size":1,"PositionX":3,"PositionY":1},{"Id":4,"Name":"","Size":1,"PositionX":4,"PositionY":1}]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"Model": { | ||
"Name": "model 1", | ||
"Variables": [ | ||
{ | ||
"Id": 3, | ||
"RangeFrom": 0, | ||
"RangeTo": 1, | ||
"Formula": "" | ||
} | ||
], | ||
"Relationships": [ | ||
{ | ||
"Id": 12, | ||
"FromVariable": 3, | ||
"ToVariable": 3, | ||
"Type": "Activator" | ||
} | ||
] | ||
}, | ||
"Layout": { | ||
"Variables": [ | ||
{ | ||
"Id": 3, | ||
"Name": "A", | ||
"Type": "Default", | ||
"ContainerId": 1, | ||
"PositionX": 632.5, | ||
"PositionY": -493.33333333333337, | ||
"CellX": 0, | ||
"CellY": 0, | ||
"Angle": 0 | ||
} | ||
], | ||
"Containers": [ | ||
{ | ||
"Id": 1, | ||
"Size": 1, | ||
"PositionX": 2, | ||
"PositionY": -2 | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.