Skip to content

Commit

Permalink
Add CI and beta dependencies (#1)
Browse files Browse the repository at this point in the history
* add tests

* add test requirements

* add coverage
  • Loading branch information
Helveg authored Dec 19, 2023
1 parent 36eb626 commit 1e09219
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test BSB Arbor adapter

on: [ push, pull_request ]

jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install openmpi-bin libopenmpi-dev
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies & self
run: |
python -m pip install --upgrade pip
pip install -e . --no-deps
pip install -r requirements.txt --prefer-binary
pip install -e .
- name: Run tests & coverage
run: |
coverage run -p -m unittest
mpiexec -n 2 coverage run -p -m unittest
bash <(curl -s https://codecov.io/bash)
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ readme = "README.md"
license = {file = "LICENSE"}
classifiers = ["License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)"]
dynamic = ["version", "description"]
dependencies = ["bsb-core>=4.0.0b0,<=4.0.0b9999", "arbor~=0.9", "arborize[arbor]==4.0.0a4"]
dependencies = [
"bsb-core>=4.0.0b0,<=4.0.0b9999",
"arbor~=0.9",
"arborize[arbor]>=4.0.0b1"
]

[project.entry-points."bsb.simulation_backends"]
arbor = "bsb_arbor"
Expand All @@ -18,4 +22,4 @@ arbor = "bsb_arbor"
name = "bsb_arbor"

[project.optional-dependencies]
test = ["bsb-test==0.0.0a0"]
test = ["bsb-test>=0.0.0b0"]
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
arbor==0.9
mpi4py==3.1.5
bsb-core>=4.0.0b0
bsb-test==0.0.0b2
coverage==7.3.3

0 comments on commit 1e09219

Please sign in to comment.