Skip to content

Commit 60c9fe2

Browse files
Merge pull request #269 from ContextLab/fix/colab-import-error
Fix Colab import error and suppress hdbscan SyntaxWarning
2 parents b583a58 + e14addc commit 60c9fe2

File tree

5 files changed

+251
-109
lines changed

5 files changed

+251
-109
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,15 @@ jobs:
6060
pip install -e .
6161
6262
- name: Run pytest
63+
env:
64+
MPLBACKEND: Agg
6365
run: |
6466
pytest -v --tb=short
6567
6668
- name: Run pytest with coverage (Ubuntu Python 3.12 only)
6769
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
70+
env:
71+
MPLBACKEND: Agg
6872
run: |
6973
pytest --cov=hypertools --cov-report=xml --cov-report=term-missing
7074

hypertools/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#!/usr/bin/env python
2+
3+
import warnings
4+
5+
warnings.filterwarnings(
6+
"ignore", category=SyntaxWarning, message="invalid escape sequence"
7+
)
8+
29
from .config import __version__
310
from .plot.plot import plot
411
from .plot.backend import set_interactive_backend

0 commit comments

Comments
 (0)