Andreas Tille pushed to branch master at Debian Med / q2-feature-table


Commits:
7ae5aa6f by Andreas Tille at 2026-11-16T19:27:16+01:00
Add patch to skip usage example tests when the network is unavailable

The usage examples download example artifacts from data.qiime2.org via
the rachis SDK.  Debian build environments are offline and refuse those
connections, so the build time test failed with 'Could not obtain URL'.
Probe the server with a short timeout and skip the tests when it cannot
be reached; they still run in environments with network access.

- - - - -
290c1d44 by Andreas Tille at 2026-11-16T19:34:35+01:00
Upload to experimental

- - - - -


4 changed files:

- debian/changelog
- + debian/patches/offline-usage-examples.patch
- debian/patches/selenium-tests-optional.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,4 +1,4 @@
-q2-feature-table (2026.10.0+dfsg-1) UNRELEASED; urgency=medium
+q2-feature-table (2026.10.0+dfsg-1) experimental; urgency=medium
 
   * Team upload.
   * Revert restriction to specific Python version


=====================================
debian/patches/offline-usage-examples.patch
=====================================
@@ -0,0 +1,53 @@
+Description: skip the usage example tests when the network is not available
+ The usage examples (TestUsageExample) download their example artifacts
+ from data.qiime2.org through the rachis SDK.  Debian build environments
+ are usually offline and refuse those connections, so the build time test
+ failed with "Could not obtain URL".  Probe the server with a short
+ timeout and skip the tests when it cannot be reached; they still run in
+ environments with network access.
+Author: Andreas Tille <[email protected]>
+Forwarded: not-needed
+Last-Update: 2026-11-16
+Assisted-By: scaleway/deepseek-v4-flash-0731
+
+---
+ q2_feature_table/tests/test_examples.py |   21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+--- a/q2_feature_table/tests/test_examples.py
++++ b/q2_feature_table/tests/test_examples.py
+@@ -6,11 +6,32 @@
+ # The full license is in the file LICENSE, distributed with this software.
+ # ----------------------------------------------------------------------------
+ 
++import socket
++import unittest
++
+ from qiime2.plugin.testing import TestPluginBase
+ 
+ 
++def _data_server_reachable() -> bool:
++    """True if the usage example data server can be contacted.
++
++    The usage examples download their example artifacts from
++    data.qiime2.org.  Debian build and autopkgtest environments are
++    usually offline, where these tests can only fail; in that case they
++    are skipped instead of failing the build.
++    """
++    try:
++        with socket.create_connection(("data.qiime2.org", 443), timeout=2):
++            return True
++    except OSError:
++        return False
++
++
+ class TestUsageExample(TestPluginBase):
+     package = 'q2_feature_table.tests'
+ 
++    @unittest.skipUnless(
++        _data_server_reachable(),
++        "data.qiime2.org is not reachable, skipping usage examples")
+     def test_usage_examples(self):
+         self.execute_examples()
+*** /dev/null
+*** End of Patch


=====================================
debian/patches/selenium-tests-optional.patch
=====================================
@@ -6,11 +6,10 @@ Description: skip the Selenium browser tests when no 
webdriver is available
  the driver cannot be started instead; they still run in environments
  that provide one.
 Author: Andreas Tille <[email protected]>
-Origin: vendor
 Forwarded: not-needed
 Last-Update: 2026-11-16
-Assisted-By: aim2balance/a2b-code
-Applied-Upstream: no
+Assisted-By: scaleway/deepseek-v4-flash-0731
+
 ---
  q2_feature_table/tests/test_summarize.py |   11 ++++++++++-
  1 file changed, 10 insertions(+), 1 deletion(-)


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 optional-rnanorm.patch
 selenium-tests-optional.patch
+offline-usage-examples.patch



View it on GitLab: 
https://salsa.debian.org/med-team/q2-feature-table/-/compare/fe58af8fcab480e4d11d02bd465ee6963ac9e437...290c1d448c4437e3ae6667a824055c8855e7e0fd

-- 
View it on GitLab: 
https://salsa.debian.org/med-team/q2-feature-table/-/compare/fe58af8fcab480e4d11d02bd465ee6963ac9e437...290c1d448c4437e3ae6667a824055c8855e7e0fd
You're receiving this email because of your account on salsa.debian.org. Manage 
all notifications: https://salsa.debian.org/-/profile/notifications | Help: 
https://salsa.debian.org/help


_______________________________________________
debian-med-commit mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to