Skip to content

Commit

Permalink
sourmash: init at 4.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Mar 12, 2023
1 parent da9c0fd commit ed1bed9
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recipes/recipes_emscripten/sourmash/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
${PYTHON} -m pip install .
42 changes: 42 additions & 0 deletions recipes/recipes_emscripten/sourmash/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package:
name: sourmash
version: '4.7.0'

source:
- url: https://codeload.github.com/sourmash-bio/sourmash/tar.gz/fecfc97c3ec0be1dcfe43c73a12297f1295b5199
sha256: 0dff73ca2252877108756cc1e53ef5981312a9006be93dfd88cbd7aaaf35f6ae

build:
number: 0

requirements:
build:
- '{{ compiler("c") }}'
- '{{ compiler("rust") }}'
- cross-python_emscripten-32
- python
- cffi ==1.15.0
- pip
- maturin
host:
- python
- pip
- cffi ==1.15.0
- maturin
- toml
run:
- python
- screed >=1.1.2
- cffi >=1.14
- deprecation >=2.0.6
- cachetools >=4.2.1,<5
- numpy
- matplotlib-base
- scipy
- bitstring >=3.1.9,<4

extra:
emscripten_tests:
python:
pytest_files:
- test_sourmash.py
17 changes: 17 additions & 0 deletions recipes/recipes_emscripten/sourmash/test_sourmash.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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

0 comments on commit ed1bed9

Please sign in to comment.