Skip to content

Commit

Permalink
sourmash: init at 4.8.11
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Aug 1, 2024
1 parent 78fd992 commit 5a263de
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
3 changes: 3 additions & 0 deletions recipes/recipes_emscripten/sourmash/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
export MATURIN_PYTHON_SYSCONFIGDATA_DIR=${PREFIX}/etc/conda/_sysconfigdata__emscripten_wasm32-emscripten.py
${PYTHON} -m pip install . -vvv
46 changes: 46 additions & 0 deletions recipes/recipes_emscripten/sourmash/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
context:
version: '4.8.11'
sha256: '1a06a76df464b92685779aaaa6ed02a577bdd73a4ab32972e8134581034d34bf'

package:
name: sourmash
version: ${{ version }}

source:
- url: https://pypi.io/packages/source/s/sourmash/sourmash-${{ version }}.tar.gz
sha256: ${{ sha256 }}

build:
number: 0

requirements:
build:
- cross-python_${{target_platform}}
- cffi == 1.15.1
- openssl
- rust
- maturin
host:
- python
- openssl
- cffi ==1.15.1
run:
- screed >=1.1.2
- cffi ==1.15.1
- deprecation >=2.0.6
- cachetools >=4.2.1,<5
- numpy
- matplotlib-base
- scipy
- bitstring >=3.1.9,<4

tests:
- script: pytester
requirements:
build:
- pytester
run:
- pytester-run
files:
recipe:
- 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 5a263de

Please sign in to comment.