Repository: deeptools/HiCMatrix (language: python)

Issue:
 ModuleNotFoundError: No module named 'importlib.metadata'
In the last version (17.1), I use `from importlib.metadata import version`. In python 3.8 and later, this is included into CPython but in 3.7, it requires `importlib-metadata`.
If you are using python 3.7, you need to install `importlib-metadata` the same way you installed HiCMatrix.
@bgruening , do you know if I should add `importlib-metadata` as requirements? Or if there is a way to add `importlib-metadata` as a requirement only for python 3.7 both in pypi and conda recipe?



Discussion / hints:
I am stupid, with the `importlib-metadata` package you need to use `from importlib_metadata import version` so I will propose a bug fix.

Fix patch:
diff --git a/HiCMatrix_env_ci.yml b/HiCMatrix_env_ci.yml
index e774e1b..17761cb 100644
--- a/HiCMatrix_env_ci.yml
+++ b/HiCMatrix_env_ci.yml
@@ -7,6 +7,7 @@ dependencies:
    - scipy >= 1.2
    - pandas >= 0.25
    - pytables >= 3.5
+   - c-blosc2<=2.14.1 # Temp fix see https://github.com/Blosc/c-blosc2/issues/601
    - cooler >= 0.8.9
    - intervaltree >= 3.0
    - pytest
diff --git a/hicmatrix/lib/cool.py b/hicmatrix/lib/cool.py
index 83bf955..84d68a5 100644
--- a/hicmatrix/lib/cool.py
+++ b/hicmatrix/lib/cool.py
@@ -2,7 +2,10 @@
 import os
 
 import gc
-from importlib.metadata import version
+try:
+    from importlib.metadata import version
+except ImportError:
+    from importlib_metadata import version
 
 import cooler
 import h5py
diff --git a/pyproject.toml b/pyproject.toml
index 305e1a9..f7fee0e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
 
 [project]
 name = "HiCMatrix"
-version = "17.1"
+version = "17.2"
 authors = [
   { name = "Lucille Lopez-Delisle, Joachim Wolff, Leily Rabbani, Vivek Bhardwaj, Fidel Ramirez", email = "lucille.delisle@epfl.ch" },
 ]
 description = "Helper package which implements HiCMatrix class for HiCExplorer, pyGenomeTracks and scHiCExplorer."
 readme = "README.rst"
-requires-python = ">=3.8"
+requires-python = ">=3.7"
 classifiers = [
     'Intended Audience :: Science/Research',
     'Topic :: Scientific/Engineering :: Bio-Informatics',
@@ -21,7 +21,8 @@ dependencies = [
     "tables >= 3.5",
     "pandas >= 0.25",
     "cooler >= 0.8.9",
-    "intervaltree >= 3.0"
+    "intervaltree >= 3.0",
+    "importlib_metadata; python_version<'3.8'"
 ]
 
 [project.urls]


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 2093630..aa6ecf8 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -12,6 +12,7 @@ jobs:
     strategy:
       matrix:
         python-version:
+          - "3.7"
           - "3.8"
           - "3.9"
           - "3.10"
diff --git a/pytest.ini b/pytest.ini
index cc8b80a..fa32b1b 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -3,6 +3,4 @@ filterwarnings =
     ignore::UserWarning
     ignore::FutureWarning
     ignore::DeprecationWarning
-    ignore::ImportWarning
-    ignore::tables.exceptions.FlavorWarning
-    ; error::ResourceWarning
\ No newline at end of file
+    ignore::ImportWarning
\ No newline at end of file