Skip to content

Commit

Permalink
[ENH] Adding integration test with causal learn (py-why#54)
Browse files Browse the repository at this point in the history
* Adding integration test with causal learn for FCI and PC algorithm
* Fix CI

Signed-off-by: Adam Li <adam2392@gmail.com>
  • Loading branch information
adam2392 committed Jan 9, 2023
1 parent 976601f commit de2e69d
Show file tree
Hide file tree
Showing 7 changed files with 600 additions and 225 deletions.
36 changes: 35 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
python-version: [3.8, "3.10"] # oldest and newest supported versions
poetry-version: [1.3.0]
networkx: [stable, main]
name: pytest ${{ matrix.os }} - py${{ matrix.python-version }} - Networkx ${{ matrix.networkx }}
name: Unit-test ${{ matrix.os }} - py${{ matrix.python-version }} - Networkx ${{ matrix.networkx }}
runs-on: ${{ matrix.os }}-latest
defaults:
run:
Expand Down Expand Up @@ -159,6 +159,40 @@ jobs:
fail_ci_if_error: true
verbose: true

integration_test:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu]
python-version: ["3.10"] # oldest and newest supported versions
poetry-version: [1.3.0]
networkx: [main]
name: Integration test ${{ matrix.os }} - py${{ matrix.python-version }} - Networkx ${{ matrix.networkx }}
runs-on: ${{ matrix.os }}-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Install Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2.2.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install Poetry Dynamic Versioning Plugin
run: pip install poetry-dynamic-versioning
- name: Install packages via poetry
run: |
poetry install --with test,docs --extras graph_func
- name: Run pytest # headless via Xvfb on linux
run: poetry run poe integration_test

# release is ran when a release is made on Github
release:
name: Release
Expand Down
3 changes: 2 additions & 1 deletion dodiscover/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
from sklearn.metrics import confusion_matrix
from sklearn.preprocessing import LabelBinarizer

from dodiscover.typing import NetworkxGraph

from ._protocol import Graph
from .typing import NetworkxGraph


def confusion_matrix_networks(
Expand Down
Loading

0 comments on commit de2e69d

Please sign in to comment.