New package: sourmash (and deps) (#3635)

Add sourmash (Python + Rust extension, packaged with maturin) and missing pure-wheel deps (screed, bitstring, cachetools, deprecation).

After a couple of fixes in sourmash-bio/sourmash#2433 I managed to build it out-of-tree, would like to have it available here to make it easier to distribute (while PyPI doesn't support emscripten wheels).
This commit is contained in:
Luiz Irber 2023-04-07 20:11:30 -07:00 committed by GitHub
parent 5a8ecf130a
commit 24f839a2f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 112 additions and 0 deletions

View File

@ -26,6 +26,11 @@ myst:
a single file.
{pr}`3727`
### Packages
- New packages: sourmash {pr}`3635`, screed {pr}`3635`, bitstring {pr}`3635`,
deprecation {pr}`3635`, cachetools {pr}`3635`.
## Version 0.23.0
_March 30, 2023_

View File

@ -0,0 +1,13 @@
package:
name: bitstring
version: 4.0.1
top-level:
- bitstring
source:
url: https://files.pythonhosted.org/packages/1b/07/951d7bc9804fcec26e8cdbf1d352018a21c16194d42e3f38cb7f5564ca4b/bitstring-4.0.1-py3-none-any.whl
sha256: 4a27cdefd95eb535c4b79e0afcdb5532ba1dba0aaed98a31ad98f46b1e0d5bd9
about:
home: ""
PyPI: https://pypi.org/project/bitstring
summary: Simple construction, analysis and modification of binary data.
license: ""

View File

@ -0,0 +1,13 @@
package:
name: cachetools
version: 5.3.0
top-level:
- cachetools
source:
url: https://files.pythonhosted.org/packages/db/14/2b48a834d349eee94677e8702ea2ef98b7c674b090153ea8d3f6a788584e/cachetools-5.3.0-py3-none-any.whl
sha256: 429e1a1e845c008ea6c85aa35d4b98b65d6a9763eeef3e37e92728a12d1de9d4
about:
home: https://github.com/tkem/cachetools/
PyPI: https://pypi.org/project/cachetools
summary: Extensible memoizing collections and decorators
license: MIT

View File

@ -0,0 +1,16 @@
package:
name: deprecation
version: 2.1.0
top-level:
- deprecation
requirements:
run:
- packaging
source:
url: https://files.pythonhosted.org/packages/02/c3/253a89ee03fc9b9682f1541728eb66db7db22148cd94f89ab22528cd1e1b/deprecation-2.1.0-py2.py3-none-any.whl
sha256: a10811591210e1fb0e768a8c25517cabeabcba6f0bf96564f8ff45189f90b14a
about:
home: http://deprecation.readthedocs.io/
PyPI: https://pypi.org/project/deprecation
summary: A library to handle automated deprecations
license: Apache 2

14
packages/screed/meta.yaml Normal file
View File

@ -0,0 +1,14 @@
package:
name: screed
version: 1.1.2
top-level:
- bigtests
- screed
source:
url: https://files.pythonhosted.org/packages/a6/c1/e33d75369bffaf304b891afa34aa8b9765f117931673cdf8837eba9b0efb/screed-1.1.2-py2.py3-none-any.whl
sha256: 413e9cfce4b4908d0fa1fe69dcd2c523641a02a856eb196f9ce2183657f342dc
about:
home: https://github.com/dib-lab/screed
PyPI: https://pypi.org/project/screed
summary: a Python library for loading FASTA and FASTQ sequences
license: BSD 3-clause

View File

@ -0,0 +1,28 @@
package:
name: sourmash
version: 4.8.0
top-level:
- sourmash
requirements:
run:
- screed
- cffi
- deprecation
- cachetools
- numpy
- matplotlib
- scipy
- sqlite3
- bitstring
source:
url: https://pypi.io/packages/source/s/sourmash/sourmash-4.8.0.tar.gz
sha256: 778d5d182f9e625ae560a5b3a2fdf6bd4fd3b876c84593da8c8c07d11ce2c697
build:
script: |
rustup toolchain install ${RUST_TOOLCHAIN} && rustup default ${RUST_TOOLCHAIN}
rustup target add wasm32-unknown-emscripten --toolchain ${RUST_TOOLCHAIN}
about:
home: https://github.com/sourmash-bio/sourmash
PyPI: https://pypi.org/project/sourmash
summary: Compute and compare MinHash signatures for DNA data sets.
license: BSD-3-Clause

View File

@ -0,0 +1,23 @@
import pytest
from pytest_pyodide import run_in_pyodide
@pytest.mark.driver_timeout(60)
@run_in_pyodide(packages=["sourmash"])
def test_simple_save_load(selenium):
from pathlib import Path
from tempfile import TemporaryDirectory
import sourmash
mh = sourmash.MinHash(0, 5, scaled=1)
mh.add_sequence("ACGTAGGTATAGGATACCTCGCTAGTACGTGCA")
ss = sourmash.SourmashSignature(mh, name="foo")
with TemporaryDirectory() as td:
name = Path(td) / "test.sig"
with open(name, "w") as fp:
sourmash.save_signatures([ss], fp=fp)
loaded = sourmash.load_one_signature(str(name))
assert loaded == ss