Repository: cogent3/cogent3
Pull request #2002 (2024-08-27 05:29:37)

Bugfix


Patch:
diff --git a/README.md b/README.md
index 285a1e84c..0d81f3b33 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
 [![coverall](https://coveralls.io/repos/github/cogent3/cogent3/badge.svg?branch=develop)](https://coveralls.io/github/cogent3/cogent3?branch=develop)
 
 ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cogent3)
-![Using Black Formatting](https://img.shields.io/badge/code%20style-black-000000.svg)
+[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
 
 [![CodeQL](https://github.com/cogent3/cogent3/actions/workflows/codeql.yml/badge.svg)](https://github.com/cogent3/cogent3/actions/workflows/codeql.yml)
 [![Codacy Badge](https://app.codacy.com/project/badge/Grade/e80e3441de59449bb1a4d8ad1fdea4fa)](https://app.codacy.com/gh/cogent3/cogent3/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
diff --git a/changelog.d/20240827_152735_Gavin.Huttley.md b/changelog.d/20240827_152735_Gavin.Huttley.md
new file mode 100644
index 000000000..7a1f5b89e
--- /dev/null
+++ b/changelog.d/20240827_152735_Gavin.Huttley.md
@@ -0,0 +1,40 @@
+<!--
+A new scriv changelog fragment.
+
+Uncomment the section that is right (remove the HTML comment wrapper).
+-->
+
+
+### Contributors
+
+- @GavinHuttley
+
+<!--
+### ENH
+
+- A bullet item for the ENH category.
+
+-->
+### BUG
+
+- Fixed issue where read only zipped data stores would include files
+  starting with a "._"
+
+<!--
+### DOC
+
+- A bullet item for the DOC category.
+
+-->
+<!--
+### Deprecations
+
+- A bullet item for the Deprecations category.
+
+-->
+<!--
+### Discontinued
+
+- A bullet item for the Discontinued category.
+
+-->
diff --git a/requirements.txt b/requirements.txt
index 49671ee5f..b1fb6c805 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -6,7 +6,7 @@ numba>0.48.0;python_version<'3.9'
 numba>0.53; python_version>='3.9'
 numba>0.54; python_version>='3.10'
 numba>=0.57.0; python_version=='3.11'
-scipy==1.14.0
+scipy==1.14.1
 nox==2024.4.15
 plotly==5.23.0
 typing_extensions>=3.7
diff --git a/src/cogent3/app/data_store.py b/src/cogent3/app/data_store.py
index c513949ef..2095cf964 100644
--- a/src/cogent3/app/data_store.py
+++ b/src/cogent3/app/data_store.py
@@ -637,7 +637,7 @@ class ReadOnlyDataStoreZipped(DataStoreABC):
                 name = pathlib.Path(name)
                 if subdir and name.parent.name != subdir:
                     continue
-                if name.match(pattern):
+                if name.match(pattern) and not name.name.startswith("."):
                     yield name
 
     @property


Test patch:
diff --git a/tests/test_app/test_data_store.py b/tests/test_app/test_data_store.py
index 8bfde90d9..cc63e6332 100644
--- a/tests/test_app/test_data_store.py
+++ b/tests/test_app/test_data_store.py
@@ -616,6 +616,30 @@ def test_zipped_ro_basic(zipped_basic, ro_dstore):
     assert expect == got
 
 
+@pytest.fixture
+def zipped_hidden(fasta_dir):
+    # converts the fasta_dir into a zipped archive and duplicates
+    # all files to one whose name is preixed by "."
+    for fn in fasta_dir.glob("*.fasta"):
+        nf = fn.parent / f".{fn.name}"
+        shutil.copyfile(fn, nf)
+
+    path = shutil.make_archive(
+        base_name=fasta_dir.name,
+        format="zip",
+        base_dir=fasta_dir.name,
+        root_dir=fasta_dir.parent,
+    )
+    return pathlib.Path(path)
+
+
+def test_zipped_ro_basic_hidden(zipped_hidden, zipped_basic):
+    orig = ReadOnlyDataStoreZipped(zipped_basic, suffix="fasta")
+    dstore = ReadOnlyDataStoreZipped(zipped_hidden, suffix="fasta")
+    assert len(dstore) == len(orig)
+    assert all(not m.unique_id.startswith(".") for m in dstore)
+
+
 def test_zipped_ro_full(zipped_full, full_dstore):
     got_ids = {m.unique_id for m in zipped_full.completed}
     expect_ids = {m.unique_id for m in full_dstore.completed}