Skip to content

Commit 849650c

Browse files
committed
remove doctest for beckend tests
1 parent 5632d4c commit 849650c

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

.github/workflows/build_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
pip install pytest pytest-cov
156156
- name: Run tests
157157
run: |
158-
python -m pytest --durations=20 -v test/ ot/ --doctest-modules --color=yes --cov=./ --cov-report=xml
158+
python -m pytest --durations=20 -v test/ --color=yes --cov=./ --cov-report=xml
159159
- name: Upload coverage reports to Codecov with GitHub Action
160160
uses: codecov/codecov-action@v4
161161

@@ -183,7 +183,7 @@ jobs:
183183
pip install pytest pytest-cov
184184
- name: Run tests
185185
run: |
186-
python -m pytest --durations=20 -v test/ ot/ --doctest-modules --color=yes --cov=./ --cov-report=xml
186+
python -m pytest --durations=20 -v test/ --color=yes --cov=./ --cov-report=xml
187187
- name: Upload coverage reports to Codecov with GitHub Action
188188
uses: codecov/codecov-action@v4
189189

@@ -211,7 +211,7 @@ jobs:
211211
pip install pytest pytest-cov
212212
- name: Run tests
213213
run: |
214-
python -m pytest --durations=20 -v test/ ot/ --doctest-modules --color=yes --cov=./ --cov-report=xml
214+
python -m pytest --durations=20 -v test/ --color=yes --cov=./ --cov-report=xml
215215
- name: Upload coverage reports to Codecov with GitHub Action
216216
uses: codecov/codecov-action@v4
217217

ot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
from .utils import dist, unif, tic, toc, toq
9494

9595

96-
__version__ = "0.9.7"
96+
__version__ = "0.9.7.dev0"
9797

9898
__all__ = [
9999
"emd",

ot/gnn/_layers.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
# Rémi Flamary <remi.flamary@unice.fr>
88
#
99
# License: MIT License
10-
11-
import torch
12-
import torch.nn as nn
13-
from ._utils import (
14-
TFGW_template_initialization,
15-
FGW_distance_to_templates,
16-
wasserstein_distance_to_templates,
17-
)
10+
try:
11+
import torch
12+
import torch.nn as nn
13+
from ._utils import (
14+
TFGW_template_initialization,
15+
FGW_distance_to_templates,
16+
wasserstein_distance_to_templates,
17+
)
18+
except ImportError:
19+
pass
1820

1921

2022
class TFGWPooling(nn.Module):

0 commit comments

Comments
 (0)