semvec/pypi-packages huggingface dataset:
trappist 1.1.3
Minimal Trap Spaces computation using Maximal Siphons
Requires Python: >=3.6

![trappist logo](trappist.svg)

Trappist is a tool for computing _minimal trap spaces_ of a Boolean model.

# Install

You can install trappist with `pip` directly from the Package Index:

``` sh
$ python3 -m pip install trappist
```

or grab the very latest version from the source:

``` sh
$ python3 -m pip install -e git+https://github.com/soli/trap-spaces-as-siphons.git
```

You will also need the `clingo` ASP solver in your PATH for the `asp` method of computing the trap spaces (default). Instructions are provided directly on the [Potassco pages](https://github.com/potassco/clingo/releases/).

Note that Trappist does install the [PySAT](https://pysathq.github.io/docs/html/index.html) module so that the `sat` method is always available even if you do not have `clingo`.

# Run trappist in a Binder image

CMSB 2022 Submitted version: [![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/soli/trap-spaces-as-siphons/camera-ready)

Latest version, with _2022-12-01_ colomoto-docker image: [![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/soli/trap-spaces-as-siphons/main)

# Read about trappist

You can find articles describing trappist [here](https://hal.science/hal-03721508), [here](https://hal.science/hal-04167028/) and [here](https://hal.science/hal-04523118/) (`tsconj`'s improvements have been backported to `trappist` with `conj` and `conj-c` solvers).

# Run trappist from the command line

After installing `trappist` (and maybe `clingo`), just run

```
$ trappist -h
usage: trappist [-h] [-d] [-v] [-m MAX] [-p PARALLEL] [-t TIME] [-c {min,max,fix}] [-s {asp,cp,ilp,sat,naive,conj,conj-c}] [infile]

Compute minimal trap-spaces of a Petri-net encoded Boolean model. Copyright (C) Sylvain.Soliman@inria.fr and
giang.trinh91@gmail.com GPLv3

positional arguments:
  infile                Boolnet (.bnet) file of the model or Petri-net (PNML) file of its Petri net encoding. 'naive' and
                        'conj(-c)' solvers only handle .bnet input.

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug           Print debugging information.
  -v, --version         show program's version number and exit
  -m MAX, --max MAX     Maximum number of solutions (0 for all).
  -p PARALLEL, --parallel PARALLEL
                        Maximum number of cores to use [only for naive and conj(-c) method] (0 for no-limit).
  -t TIME, --time TIME  Maximum number of seconds for search (0 for no-limit).
  -c {min,max,fix}, --computation {min,max,fix}
                        Computation option.
  -s {asp,cp,ilp,sat,naive,conj,conj-c}, --solver {asp,cp,ilp,sat,naive,conj,conj-c}
                        Solver to compute the Maximal conflict-free siphons. 'asp', 'naive' and 'conj(-c)' require `clingo`, 'cp'
                        requires `minizinc`.
```
model-lifecycle-tracker 0.0.7
A model lifecycle tracker database backed by postgres

# model-tracker

A simple data store keeping track of models and things


### 1. Running locally

* Get postgres up and running for local development
* In the cell block below we pull down a postgres docker container and we set our password as `docker`, though you can set it as whatever you'd like.
```
 docker pull postgres
 docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=docker -d postgres
```

* Flash database for quick dev

```
PGPASSWORD='docker' psql -h localhost -U postgres -c "drop database modeltracker" 
  && PGPASSWORD='docker' psql -h localhost -U postgres -c "create database modeltracker"
```


### 2. Populating the basic type tables

If you've installed this as a pip package in your virtual environment then you can navigate into your virtual environment, then lib, then your installed python version, then site packages, and finally into modeltracker (this step is not required if you have access to the source code) 

The path should look something like this:

```
<virtualenv here>/lib/python3.xx/site-packages/modeltracker/
```

Once you've reached that path, you can generate the basic table types with:
```bash 
python -m modeltracker.main  
```

* Suppose you have been developing and wish to destroy all table contents:

```bash
python -m modeltracker.main -r
```

### 3. Checking tables existence in local postgres databse instance

You can then hop into your running postgres database instance with:
```
docker exec -it some-postgres psql -U postgres
```

# Database dict
## To keep track of what is being produced by the modeltracker

**datastore_type** : Describes the datastore types, BQ or GCS for instance.

**feature_store_metrics** : Describes the metrics relating to each model in the model_catalog_id

**job** : Describes tasks that have been run

**model_catalog** : describes models and links to state_id

**model_output** : describes location and datastore type of model_output

**state** : Catalogue of states

**task_type** : Tracks tasks that occur