Skip to content

Commit

Permalink
update gurobi and python version (#6)
Browse files Browse the repository at this point in the history
* update repo name

* update gurobi and matplotlib version

* update python version

* update conda env

* TEST: run conda test on pull request

* Update docs/contributing.md

Co-authored-by: Scott C. Livingston <[email protected]>

* Update docs/contributing.md

Co-authored-by: Scott C. Livingston <[email protected]>

* consistent name

---------

Co-authored-by: Scott C. Livingston <[email protected]>
  • Loading branch information
jgraeb and slivingston authored Oct 3, 2024
1 parent 37cf9d0 commit 4756ea1
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 66 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# configuration for GitHub Actions
name: flowsynth tests
name: floras tests in PDM env
on:
push:
pull_request:
Expand All @@ -13,6 +13,8 @@ jobs:
matrix:
python-version: [
'3.10',
'3.11',
'3.12'
]
steps:
- uses: actions/checkout@v4
Expand All @@ -22,8 +24,8 @@ jobs:
cache: true
- name: Setup testing environment
run: |
sudo apt update
sudo apt install -y \
sudo apt-get update
sudo apt-get install -y \
libgraphviz-dev \
graphviz
- name: Install Python dependencies
Expand All @@ -34,7 +36,7 @@ jobs:
uses: actions/cache@v4
with:
path: spot-2.12
key: ${{ runner.os }}-${{ matrix.python-version }}-spot-${{ hashFiles('get_spot.py') }}
key: ${{ runner.os }}-${{ matrix.python-version }}-spot-${{ hashFiles('get_spot.py') }}-${{ hashFiles('pyproject.toml') }}
- name: Install Spot
if: steps.cache-spot.outputs.cache-hit == 'true'
run: |
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/test_conda_env.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Testing
name: floras tests conda env
on:
push:
branches:
- 'main'
pull_request:

jobs:
create-env:
Expand All @@ -12,7 +11,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
python-version: ["3.10","3.11","3.12"]
defaults:
run:
shell: bash -l {0}
Expand All @@ -34,14 +33,14 @@ jobs:
conda info
conda list
- name: Add Tulip
run: pip install tulip
- name: Add pdm
run: pip install pdm

- name: Add Gurobipy
run: pip install gurobipy
- name: Install package
run: pdm install

- name : Install Package for Testing
run : conda install pytest

- name : Run tests
run : pytest
run : pdm run pytest -v tests
18 changes: 13 additions & 5 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
# Contributing to FLORAS

If you want to modify FLORAS or contribute, you can also install it directly from source. We are using pdm to manage the dependencies.
If you want to modify floras or contribute, you can install it directly from source. We are using [pdm](https://pdm-project.org/en/latest/) to manage the dependencies.
```
pip install pdm
git clone https://github.com/tulip-control/flowsynth
git clone https://github.com/tulip-control/floras.git
```
Navigate to the repo and run to install the FLORAS and all required dependencies:
Navigate to the repo to install floras and all required dependencies:
```
cd floras
pdm install
```
Next, install spot by running
Next, install spot by running:
```
pdm run python get_spot.py
```
If you are using [conda](https://conda.org/), instead of the above command, you can install spot directly from [conda-forge](https://conda-forge.org/) (this is faster):
```
conda install -c conda-forge spot
```
If the spot installation does not work, please install it according to the instructions on the [spot website](https://spot.lre.epita.fr/install.html).

To enter the virtual environment created by pdm:
```
$(pdm venv activate)
```
Now floras is ready to use. If there are problems installing floras, please create an issue on GitHub.

If you need to add dependencies you can do that by running:
If you need to add any new dependencies you can do that by running:
```
pdm add your_dependency_here
```
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# FLORAS - Flow-based Reactive Test Synthesis for Autonomous Systems
# floras - Flow-based Reactive Test Synthesis for Autonomous Systems

<figure markdown="span">
![floras logo](logo.png "floras logo"){ width="300" }
<figcaption>Welcome to FLORAS!</figcaption>
</figure>

FLORAS is an open-source Python package for reactive test synthesis for autonomous systems using network flows.
Floras is an open-source Python package for reactive test synthesis for autonomous systems using network flows.

Installation instructions can be found [here](contributing.md).

If you use FLORAS for research purposes, please acknowledge it by citing
If you use floras for research purposes, please acknowledge it by citing
[Josefine B. Graebener\*, Apurva S. Badithela\*, Denizalp Goktas, Wyatt Ubellacker, Eric V. Mazumdar, Aaron D. Ames, and Richard M. Murray. "Flow-Based Synthesis of Reactive Tests for Discrete Decision-Making Systems with Temporal Logic Specifications." ArXiv abs/2404.09888 (2024).](https://arxiv.org/abs/2404.09888)
6 changes: 3 additions & 3 deletions docs/installing.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Installing FLORAS
### Requirements
FLORAS requires `Python==3.10` and a C++17-compliant compiler (for example `g++>=7.0` or `clang++>=5.0`).
Floras requires `Python>=3.10` and a C++17-compliant compiler (for example `g++>=7.0` or `clang++>=5.0`).
You can check the versions by running `python --version` and `gcc --version`.

### From Source
If you want to modify FLORAS or contribute, you can install it directly from source (see [here](contributing.md)).
If you want to modify floras or contribute, you can install it directly from source (see [here](contributing.md)).

### Troubleshooting
Here are common errors we encountered and what we learned to fix the problem.
Expand All @@ -14,4 +14,4 @@ If you are on a Mac and your C++ compiler version is correct, but the build stil
export SDKROOT=$(xcrun --show-sdk-path)
```

FLORAS requires `spot`, which should be automatically installed. If its installation fails, please download [spot](https://spot.lre.epita.fr/install.html) from its source, follow the instructions, and repeat the FLORAS installation.
Floras requires `spot`, which should be automatically installed. If its installation fails, please download [spot](https://spot.lre.epita.fr/install.html) from its source, follow the instructions, and repeat the floras installation.
6 changes: 0 additions & 6 deletions envs/conda_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@ channels:
- conda-forge
dependencies:
- spot
- pip
- numpy>=1.24.1
- imageio>=2.19.3
- matplotlib
- networkx>=3.0
- scipy>=1.10.1
70 changes: 37 additions & 33 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ keywords = ["test synthesis"]

dependencies = [
"numpy>=1.24.1",
"gurobipy==10.0.1",
"gurobipy==11.0.3",
"imageio>=2.19.3",
"ipdb>=0.13.11",
"matplotlib>=3.7.3",
"matplotlib>=3.9.2",
"networkx>=3.0",
"scipy>=1.10.1",
"tulip==1.4.0",
Expand All @@ -32,7 +32,7 @@ dependencies = [
"pygraphviz>=1.13",
"graphviz>=0.20.3",
]
requires-python = "==3.10"
requires-python = ">=3.10"
version = "0.0.0"
readme = "README.md"

Expand Down

0 comments on commit 4756ea1

Please sign in to comment.