Skip to content

Commit c00e4ea

Browse files
authored
C++ backend for AdjacencyListGraph (#682)
1 parent f7a6296 commit c00e4ea

22 files changed

+893
-51
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,26 @@ jobs:
3131
3232
- name: Install requirements
3333
run: |
34-
pip install -r requirements.txt
35-
pip install -r docs/requirements.txt
36-
34+
python -m pip install -r requirements.txt
35+
python -m pip install -r docs/requirements.txt
36+
3737
- name: Install lcov
3838
run: |
3939
sudo apt-get update
4040
sudo apt-get install -y lcov
4141
4242
- name: Build package
4343
run: |
44-
CXXFLAGS=--coverage CFLAGS=--coverage python scripts/build/install.py
45-
# coverage tests
44+
CXXFLAGS="-std=c++17 --coverage" CFLAGS="--coverage" python scripts/build/install.py
45+
# coverage tests
4646
- name: Run tests
4747
run: |
4848
python -m pytest --doctest-modules --cov=./ --cov-report=xml -s
4949
5050
- name: Capture Coverage Data with lcov
5151
run: |
5252
lcov --capture --directory . --output-file coverage.info --no-external
53-
53+
5454
- name: Generate HTML Coverage Report with genhtml
5555
run: |
5656
genhtml coverage.info --output-directory coverage_report
@@ -97,12 +97,12 @@ jobs:
9797
9898
- name: Install requirements
9999
run: |
100-
pip install -r requirements.txt
101-
pip install -r docs/requirements.txt
100+
python -m pip install -r requirements.txt
101+
python -m pip install -r docs/requirements.txt
102102
103103
- name: Build package
104104
run: |
105-
python scripts/build/install.py
105+
CXXFLAGS="-std=c++17" python scripts/build/install.py
106106
107107
- name: Run tests
108108
run: |
@@ -138,12 +138,12 @@ jobs:
138138
139139
- name: Install requirements
140140
run: |
141-
pip install -r requirements.txt
142-
pip install -r docs/requirements.txt
141+
python -m pip install -r requirements.txt
142+
python -m pip install -r docs/requirements.txt
143143
144144
- name: Build package
145145
run: |
146-
python scripts/build/install.py
146+
CXXFLAGS="-std=c++17" python scripts/build/install.py
147147
148148
- name: Run tests
149149
run: |
@@ -186,10 +186,12 @@ jobs:
186186
187187
- name: Install requirements
188188
run: |
189-
pip install -r requirements.txt
190-
pip install -r docs/requirements.txt
189+
python -m pip install -r requirements.txt
190+
python -m pip install -r docs/requirements.txt
191191
192192
- name: Build package
193+
env:
194+
CL: "/std:c++17"
193195
run: |
194196
python scripts/build/install.py
195197

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ channels:
55
dependencies:
66
- python=3.8
77
- pip
8+
- pytest
89
- pip:
910
- codecov
1011
- pytest-cov

pydatastructs/graphs/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from . import algorithms
1010
from . import adjacency_list
1111
from . import adjacency_matrix
12+
from . import _extensions
1213

1314
from .algorithms import (
1415
breadth_first_search,

pydatastructs/graphs/_backend/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)