[med-svn] [Git][med-team/python-cobra][master] 7 commits: Build-Depends: python3-importlib-resources

Andreas Tille (@tille) gitlab at salsa.debian.org
Thu Aug 25 14:36:57 BST 2022



Andreas Tille pushed to branch master at Debian Med / python-cobra


Commits:
a148e24c by Andreas Tille at 2022-08-25T14:01:41+02:00
Build-Depends: python3-importlib-resources

- - - - -
d0c08fda by Andreas Tille at 2022-08-25T14:01:55+02:00
routine-update: Standards-Version: 4.6.1

- - - - -
31a38ef6 by Andreas Tille at 2022-08-25T14:06:00+02:00
Update patches

- - - - -
4bb929ac by Andreas Tille at 2022-08-25T14:08:34+02:00
Build-Depends: python3-pytest-mock

- - - - -
76ff0f74 by Andreas Tille at 2022-08-25T15:00:51+02:00
Reactivate test_show_versions patch

- - - - -
b5ed468e by Andreas Tille at 2022-08-25T15:01:39+02:00
Ignore tests accessing remote locations

- - - - -
dbe74dbb by Andreas Tille at 2022-08-25T15:23:58+02:00
Reflect move of data directory inside upstream source

- - - - -


7 changed files:

- debian/changelog
- debian/control
- + debian/patches/ignore_tests.patch
- − debian/patches/no_importlib_resources_for_test.patch
- debian/patches/series
- debian/patches/xfail_test_show_versions.patch
- debian/python-cobra-data.install


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,13 @@
 python-cobra (0.25.0-1) UNRELEASED; urgency=medium
 
+  [ Étienne Mollier ]
   * Team upload.
   * New upstream version
-TODO: package importlib_resources as it seems now needed to import cobra..
+
+  [ Andreas Tille ]
+  * Build-Depends: python3-importlib-resources, python3-pytest-mock
+  * Standards-Version: 4.6.1 (routine-update)
+  * Ignore tests accessing remote locations
 
  -- Étienne Mollier <emollier at debian.org>  Wed, 04 May 2022 21:27:29 +0200
 


=====================================
debian/control
=====================================
@@ -11,6 +11,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-setuptools,
                python3-depinfo,
                python3-future,
+               python3-importlib-resources,
                python3-numpy,
                python3-optlang,
                python3-ruamel.yaml,
@@ -25,6 +26,7 @@ Build-Depends: debhelper-compat (= 13),
                cython3,
                python3-pytest <!nocheck>,
                python3-pytest-benchmark <!nocheck>,
+               python3-pytest-mock <!nocheck>,
                python3-jsonschema <!nocheck>,
                libsbml5 <!nocheck>,
                python3-matplotlib <!nocheck>,
@@ -33,7 +35,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-httpx <!nocheck>,
                python3-pydantic <!nocheck>,
                python3-rich <!nocheck>
-Standards-Version: 4.6.0
+Standards-Version: 4.6.1
 Vcs-Browser: https://salsa.debian.org/med-team/python-cobra
 Vcs-Git: https://salsa.debian.org/med-team/python-cobra.git
 Homepage: https://opencobra.github.io/cobrapy/


=====================================
debian/patches/ignore_tests.patch
=====================================
@@ -0,0 +1,31 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Thu, 25 Aug 2022 14:49:24 +0200
+Description: Ignore test accessing online resources
+
+--- a/tests/test_io/test_web/test_load.py
++++ b/tests/test_io/test_web/test_load.py
+@@ -41,7 +41,7 @@ def test_biomodels_access(biomodels):
+     load_model("BIOMD0000000633", cache=False, repositories=[biomodels])
+     biomodels.get_sbml.assert_called_once_with(model_id="BIOMD0000000633")
+ 
+-
++ at pytest.mark.skip(reason="Do not test in Debian since build is offline")
+ def test_unknown_model():
+     """Expect that a not found error is raised (e2e)."""
+     with pytest.raises(
+@@ -50,6 +50,7 @@ def test_unknown_model():
+         load_model("MODELWHO?", cache=False)
+ 
+ 
++ at pytest.mark.skip(reason="Do not test in Debian since build is offline")
+ @pytest.mark.parametrize(
+     "model_id, num_metabolites, num_reactions",
+     [("e_coli_core", 72, 95), ("BIOMD0000000633", 50, 35)],
+@@ -61,6 +62,7 @@ def test_remote_load(model_id: str, num_
+     assert len(model.reactions) == num_reactions
+ 
+ 
++ at pytest.mark.skip(reason="Do not test in Debian since build is offline")
+ def test_cache(monkeypatch, tmp_path, bigg_models, biomodels):
+     """Test that remote models are properly cached."""
+     config = Configuration()


=====================================
debian/patches/no_importlib_resources_for_test.patch deleted
=====================================
@@ -1,61 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 29 Sep 2020 12:43:02 +0200
-Description: importlib_resources is not packaged for Debian thus ignore the test that needs this module
-
---- a/setup.cfg
-+++ b/setup.cfg
-@@ -57,7 +57,6 @@
- 	diskcache ~=5.0
- 	future
- 	httpx ~=0.14
--	importlib_resources
- 	numpy ~=1.13
- 	optlang ~=1.5
- 	pandas ~=1.0
---- a/src/cobra/test/test_io/test_json.py
-+++ b/src/cobra/test/test_io/test_json.py
-@@ -8,19 +8,19 @@
- from os.path import join
- 
- import pytest
--from importlib_resources import open_text
-+#from importlib_resources import open_text
- 
- from cobra import io as cio
- from cobra.test.test_io.conftest import compare_models
- 
--
-- at pytest.fixture(scope="module")
--def json_schema_v1():
--    with open_text(cio, "schema_v1.json") as handle:
--        schema_v1 = json.load(handle)
--    return schema_v1
-+#@pytest.fixture(scope="module")
-+#def json_schema_v1():
-+#    with open_text(cio, "schema_v1.json") as handle:
-+#        schema_v1 = json.load(handle)
-+#    return schema_v1
- 
- 
-+ at pytest.mark.skip(reason="importlib_resources not packaged for Debian")
- def test_validate_json(data_directory, json_schema_v1):
-     """Validate file according to JSON-schema."""
-     jsonschema = pytest.importorskip("jsonschema")
-@@ -35,6 +35,7 @@
-     assert compare_models(mini_model, json_model) is None
- 
- 
-+ at pytest.mark.skip(reason="importlib_resources not packaged for Debian")
- def test_save_json_model(tmpdir, mini_model, json_schema_v1):
-     """Test the writing of JSON model."""
-     jsonschema = pytest.importorskip("jsonschema")
---- a/tox.ini
-+++ b/tox.ini
-@@ -94,7 +94,6 @@
- known_third_party =
-     depinfo
-     future
--    importlib_resources
-     libsbml
-     numpy
-     optlang


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,3 @@
 mathjax.patch
-no_importlib_resources_for_test.patch
 xfail_test_show_versions.patch
+ignore_tests.patch


=====================================
debian/patches/xfail_test_show_versions.patch
=====================================
@@ -3,8 +3,8 @@ The corresponding files aren't installed during build time. This simple xpass du
 Author: Nilesh Patra <npatra974 at gmail.com>
 Forwarded: not-needed
 Last-Update: 2020-11-05
---- a/src/cobra/test/test_util/test_util.py
-+++ b/src/cobra/test/test_util/test_util.py
+--- a/tests/test_util/test_util.py
++++ b/tests/test_util/test_util.py
 @@ -34,6 +34,7 @@
      assert test_data["c"]["d"] == 2
  


=====================================
debian/python-cobra-data.install
=====================================
@@ -1 +1 @@
-src/cobra/test/data		usr/share/python-cobra
+tests/data		usr/share/python-cobra



View it on GitLab: https://salsa.debian.org/med-team/python-cobra/-/compare/1415ae8f9106263849047b512e6a01e4110297d8...dbe74dbbc0d816ad1e9471139decd5a4b1dacc4c

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-cobra/-/compare/1415ae8f9106263849047b512e6a01e4110297d8...dbe74dbbc0d816ad1e9471139decd5a4b1dacc4c
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220825/5d38d746/attachment-0001.htm>


More information about the debian-med-commit mailing list