Skip to content

Commit

Permalink
Merge pull request #75 from GavinHuttley/develop
Browse files Browse the repository at this point in the history
Remove source of error on Linux
  • Loading branch information
GavinHuttley authored Mar 8, 2024
2 parents 8ce5fd8 + 2937013 commit 14e0ca2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
7 changes: 0 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,3 @@ def test(session):
"-x",
*session.posargs,
)


@nox.session(python=[f"3.{v}" for v in _py_versions])
def test_fast(session):
session.install(".[test]")
session.chdir("tests")
session.run("pytest", "-s", "-x", "-m", "not internet and not slow")
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ dependencies = ["blosc2",
"numpy",
"trogon",
"unsync",
"wakepy>0.7",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down
6 changes: 6 additions & 0 deletions src/ensembl_lite/_util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import contextlib
import functools
import os
import pathlib
Expand Down Expand Up @@ -371,3 +372,8 @@ def sanitise_stableid(stableid: str) -> str:
this function removes redundant biotype component.
"""
return _biotypes.sub("", stableid)


@contextlib.contextmanager
def fake_wake(*args, **kwargs):
yield
11 changes: 8 additions & 3 deletions src/ensembl_lite/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
from collections import defaultdict

import click
import wakepy.keep


try:
import wakepy.keep.running as keep_running
except ImportError:
from ensembl_lite._util import fake_wake as keep_running

from rich.progress import track
from trogon import tui
Expand Down Expand Up @@ -242,7 +247,7 @@ def download(configpath, debug, verbose):
print(config.species_dbs)

config.write()
with wakepy.keep.running():
with keep_running():
download_species(config, debug, verbose)
download_homology(config, debug, verbose)
download_aligns(config, debug, verbose)
Expand Down Expand Up @@ -273,7 +278,7 @@ def install(download, num_procs, force_overwrite, verbose):

config.install_path.mkdir(parents=True, exist_ok=True)
write_installed_cfg(config)
with wakepy.keep.running():
with keep_running():
local_install_genomes(
config, force_overwrite=force_overwrite, max_workers=num_procs
)
Expand Down

0 comments on commit 14e0ca2

Please sign in to comment.