Skip to content

Commit 2e477b7

Browse files
authored
Hotfix/vendored-read-until (#292)
* Remove git read-until dependency Ignore vendored read-until base tests * Alter `read_until` imports to be `readfish.read_until` * Minimal vendored `read_until` package Taken from v3.4.1 tag **SOME IMPORTS EDITED** to point to readfish.read_until * Omit read_until python files from coverage
1 parent a6c4cb9 commit 2e477b7

9 files changed

Lines changed: 937 additions & 9 deletions

File tree

.github/workflows/CI.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
python -m site
4848
python -m pip install -U pip setuptools wheel
4949
python -m pip install -e ".[tests]"
50-
coverage run -pm pytest
50+
coverage run --omit "src/readfish/read_until/*.py" -pm pytest
5151
- name: Upload coverage data
5252
uses: actions/upload-artifact@v3
5353
with:
@@ -97,7 +97,7 @@ jobs:
9797
uses: actions/upload-artifact@v3
9898
with:
9999
name: built-package
100-
path: dist
100+
path: dist/
101101
if-no-files-found: error
102102

103103
build-docs:
@@ -148,7 +148,6 @@ jobs:
148148
uses: actions/download-artifact@v3
149149
with:
150150
name: built-package
151-
path: dist
152151

153152
- name: Publish package distributions to PyPI
154153
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ dependencies = [
3535
"rtoml",
3636
"more_itertools",
3737
'exceptiongroup ; python_version<"3.11"',
38-
"read_until @ git+https://github.com/nanoporetech/read_until_api@v3.4.1",
3938
"readfish_summarise >= 0.2.5",
4039
"readfish[all]",
4140
]
@@ -82,4 +81,4 @@ testpaths = [
8281
markers = [
8382
"alignment: marks tests which rely on loading or using Mappy or Mappy-rs aligners, used to test with both. (deselect with '-m \"not slow\", select with '-k alignment')",
8483
]
85-
addopts = ["-ra", "--doctest-modules"]
84+
addopts = ["-ra", "--doctest-modules", "--ignore=src/readfish/read_until/base.py"]

src/readfish/_read_until_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from minknow_api.acquisition_pb2 import AcquisitionState
1111
from minknow_api import protocol_service, acquisition_service
12-
from read_until import ReadUntilClient
12+
from readfish.read_until.base import ReadUntilClient
1313
from readfish._loggers import setup_logger
1414
from grpc import RpcError
1515

src/readfish/entry_points/targets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
from typing import Any
7777

7878
# Third party imports
79-
from read_until.read_cache import AccumulatingCache
80-
from read_until import ReadUntilClient
79+
from readfish.read_until.read_cache import AccumulatingCache
80+
from readfish.read_until import ReadUntilClient
8181
from minknow_api import protocol_service
8282

8383
# Library

src/readfish/plugins/abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from readfish.plugins.utils import Result
2121

2222
import numpy as np
23-
from read_until.base import CALIBRATION
23+
from readfish.read_until.base import CALIBRATION
2424

2525
if TYPE_CHECKING:
2626
import minknow_api
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from readfish.read_until._version import __version__
2+
from readfish.read_until.base import ReadUntilClient
3+
from readfish.read_until.read_cache import ReadCache, AccumulatingCache
4+
5+
__all__ = ["__version__", "ReadUntilClient", "ReadCache", "AccumulatingCache"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "3.4.1"

0 commit comments

Comments
 (0)