You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
|
|
|
<div align="center">
|
|
|
|
|
|
|
|
|
|
# PyCTBN
|
|
|
|
|
|
|
|
|
|
[![coverage](https://codecov.io/gh/madlabunimib/PyCTBN/branch/master/graph/badge.svg)](https://codecov.io/gh/madlabunimib/PyCTBN)
|
|
|
|
|
|
|
|
|
|
A Continuous Time Bayesian Networks Library
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
## Installation from Source
|
|
|
|
|
|
|
|
|
|
### Prerequisites
|
|
|
|
|
|
|
|
|
|
+ `python3` (_>=3.6_)
|
|
|
|
|
+ `python3-setuptools`
|
|
|
|
|
+ `python3-pip`
|
|
|
|
|
|
|
|
|
|
### Install
|
|
|
|
|
|
|
|
|
|
At the _root_ of the project's folder launch:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
pip3 install .
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Uninstall
|
|
|
|
|
|
|
|
|
|
Anywhere in the system launch:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
pip3 uninstall <package_name>
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Upgrade
|
|
|
|
|
|
|
|
|
|
At the _root_ of the project's folder launch:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
pip3 install --upgrade .
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Installation via wheel package
|
|
|
|
|
|
|
|
|
|
**Pip installation**
|
|
|
|
|
|
|
|
|
|
Download the latest release in .tar.gz or .whl format and simply use pip install to install it:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
pip install PyCTBN-2.2.tar.gz
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Develop
|
|
|
|
|
|
|
|
|
|
**Prerequisites:**
|
|
|
|
|
|
|
|
|
|
+ `python3` (_>=3.6_)
|
|
|
|
|
+ `python3-setuptools`
|
|
|
|
|
+ `python3-pip`
|
|
|
|
|
+ `python3-venv` (_optional_)
|
|
|
|
|
|
|
|
|
|
_Create_ the **_virtual environment_** in the project's folder:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
python3 -m venv venv
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Or if oyu wanna use the `virtualenv` package:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
virtualenv -p python3 venv
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
_Activate_ the virtual environment:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
source venv/bin/activate
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
_Prepare_ the development environment:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
./setup.py develop
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
That's all! ☕️
|
|
|
|
|
|
|
|
|
|
> **Tip:** To deactivate the **_virtual environment_** simply issue the `deactivate` command.
|
|
|
|
|
|
|
|
|
|
## Testing & Linting
|
|
|
|
|
|
|
|
|
|
Install these dependencies for **tesing**:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
pip3 install -r test-requirements.txt
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Install these dependencies for **linting**:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
pip3 install -r lint-requirements.txt
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
To launch **pytest**:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
pytest
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
To launch **flake8**:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
flake8
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
To launch **pylint**:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
pylint --output-format=text --rcfile=setup.cfg src/ test/ *.py
|
|
|
|
|
```
|