From 20646b03e92788a8c2a59dc0b1eed566b5fb4bf9 Mon Sep 17 00:00:00 2001 From: Adam Taranto Date: Fri, 20 Sep 2024 14:09:28 +1000 Subject: [PATCH] Move workflow (#44) * mv ruff into workflows dir * minor edit to dev install instructions * Style fixes by Ruff --------- Co-authored-by: Adamtaranto --- .github/{ => workflows}/ruff.yml | 0 README.md | 2 +- src/python/tests/test_basic.py | 3 ++- src/python/tests/test_kmer_map.py | 4 ++-- src/python/tests/test_output.py | 14 +++++++++----- src/python/tests/test_setops.py | 1 + 6 files changed, 15 insertions(+), 9 deletions(-) rename .github/{ => workflows}/ruff.yml (100%) diff --git a/.github/ruff.yml b/.github/workflows/ruff.yml similarity index 100% rename from .github/ruff.yml rename to .github/workflows/ruff.yml diff --git a/README.md b/README.md index e2c49b7..9e23344 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This will install the oxli library. Right now there is only You can also try building it yourself and using it in development mode: ``` mamba env create -f environment.yml -n oxli -pip install -e . +pip install -e '.[test]' ``` ## Documentation diff --git a/src/python/tests/test_basic.py b/src/python/tests/test_basic.py index 97ed7eb..9cc6813 100644 --- a/src/python/tests/test_basic.py +++ b/src/python/tests/test_basic.py @@ -164,8 +164,9 @@ def test_get_hash_array(): ), "Hash array counts should match the counts of 'AAA' and 'AAC' and return zero for 'GGG'." assert rev_counts == [0, 1, 2], "Count should be in same order as input list" + def test_get_array(): """ Get vector of counts corresponding to vector of kmers. """ - pass \ No newline at end of file + pass diff --git a/src/python/tests/test_kmer_map.py b/src/python/tests/test_kmer_map.py index f4bf376..e894d18 100644 --- a/src/python/tests/test_kmer_map.py +++ b/src/python/tests/test_kmer_map.py @@ -4,5 +4,5 @@ def test_kmermap(): - '''Test option to add kmermap''' - pass \ No newline at end of file + """Test option to add kmermap""" + pass diff --git a/src/python/tests/test_output.py b/src/python/tests/test_output.py index 8394602..382b8a3 100644 --- a/src/python/tests/test_output.py +++ b/src/python/tests/test_output.py @@ -4,21 +4,25 @@ def test_serialise(): - '''Serialise object to JSON ''' + """Serialise object to JSON""" pass + def test_deserialise(): - '''Load object from file.''' + """Load object from file.""" pass + def test_dump(): - '''Write tab delimited kmer:count pairs''' + """Write tab delimited kmer:count pairs""" pass + def test_dump_hash(): - '''Write tab delimited hash_count pairs ''' + """Write tab delimited hash_count pairs""" pass + def test_histo(): - '''Write frequency counts.''' + """Write frequency counts.""" pass diff --git a/src/python/tests/test_setops.py b/src/python/tests/test_setops.py index df71ee3..a332faf 100644 --- a/src/python/tests/test_setops.py +++ b/src/python/tests/test_setops.py @@ -3,6 +3,7 @@ from test_basic import create_sample_kmer_table + # Set operations def test_union(): table1 = create_sample_kmer_table(3, ["AAA", "AAC"])