Skip to content

Commit 25a71fc

Browse files
Fix issues noticed in Ubuntu setup
- Use pip build in dev setup, remove defaults channel - Fix backend coverage issue
1 parent 34a1102 commit 25a71fc

4 files changed

Lines changed: 19 additions & 3 deletions

File tree

devtools/conda-envs/dev_env.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: mdadash-dev
22
channels:
33
- conda-forge
4+
- nodefaults
45
dependencies:
56
# Base depends
67
- python
78
- pip
9+
- pip:
10+
- build
811

912
# Development
1013
- nodejs
1114
- twine
1215
- ruff
13-
14-
# Build
15-
- build

devtools/conda-envs/test_env.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: mdadash-test
22
channels:
33
- conda-forge
4+
- nodefaults
45
dependencies:
56
# Base depends
67
- python

docs/requirements.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: mdadash-docs
22
channels:
33
- conda-forge
4+
- nodefaults
45

56
dependencies:
67
# Base depends

mdadash/backend/kernel/manager.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,20 @@ async def start(self) -> None:
8686

8787
async def stop(self) -> None:
8888
"""Stop the async kernel"""
89+
# This seems to be the only reliable way to get coverage results
90+
# back from the kernel started with AsyncKernerlManager on Ubuntu.
91+
# This should not impact existing app functionality.
92+
coverage_flush = """
93+
try:
94+
import coverage
95+
cov = coverage.Coverage.current()
96+
if cov:
97+
cov.stop()
98+
cov.save()
99+
except ImportError:
100+
pass
101+
"""
102+
self.kc.execute(coverage_flush)
89103
self._is_running = False
90104
# wait for listen task to completely exit
91105
await self.listen_task

0 commit comments

Comments
 (0)