public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-xnat] rawhide: Avoid the dependency on xnat4tests
Date: Tue, 15 Sep 2026 09:45:05 GMT [thread overview]
Message-ID: <178946550520.1.1732420859556601694.rpms-python-xnat-98276f39dcd7@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-xnat
Branch : rawhide
Commit : 98276f39dcd7845fcfbc2f31d9ec12b08b84ece0
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-09-14T07:49:56+01:00
Stats : +131/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-xnat/c/98276f39dcd7845fcfbc2f31d9ec12b08b84ece0?branch=rawhide
Log:
Avoid the dependency on xnat4tests
---
diff --git a/python-xnat.spec b/python-xnat.spec
index a5cc90c..869aa8b 100644
--- a/python-xnat.spec
+++ b/python-xnat.spec
@@ -19,6 +19,10 @@ License: Apache-2.0
URL: %forgeurl
Source0: %forgesource
+# Downstream-only: avoid the python3dist(xnat4tests) test dependency, which we
+# prefer not to maintain.
+Patch: xnatpy-0.8.1-avoid-xnat4tests.patch
+
BuildArch: noarch
BuildRequires: python3-devel
@@ -29,7 +33,6 @@ BuildRequires: help2man
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytest-mock)
BuildRequires: python3dist(requests-mock)
-BuildRequires: python3dist(xnat4tests)
%endif
%global desc %{expand: \
diff --git a/xnatpy-0.8.1-avoid-xnat4tests.patch b/xnatpy-0.8.1-avoid-xnat4tests.patch
new file mode 100644
index 0000000..847e40a
--- /dev/null
+++ b/xnatpy-0.8.1-avoid-xnat4tests.patch
@@ -0,0 +1,127 @@
+diff -Naur a/conftest.py b/conftest.py
+--- a/conftest.py 2026-06-24 16:28:25.000000000 +0100
++++ b/conftest.py 2026-09-14 07:40:59.316639258 +0100
+@@ -25,10 +25,10 @@
+ import requests
+ import requests.cookies
+ from pytest_mock import MockerFixture
+-from xnat4tests import Config
+-from xnat4tests import __version__ as xnat4tests_version
+-from xnat4tests import add_data, start_xnat, stop_xnat
+-from xnat4tests.utils import set_loggers
++# from xnat4tests import Config
++# from xnat4tests import __version__ as xnat4tests_version
++# from xnat4tests import add_data, start_xnat, stop_xnat
++# from xnat4tests.utils import set_loggers
+
+ import xnat
+ from xnat.core import XNATObject
+@@ -64,7 +64,7 @@
+ except ImportError:
+ extra_header.append("Cannot find XNATpy version information")
+
+- extra_header.append(f"XNAT test dependencies: xnat4tests-{xnat4tests_version}, requests-{requests.__version__}")
++ # extra_header.append(f"XNAT test dependencies: xnat4tests-{xnat4tests_version}, requests-{requests.__version__}")
+
+ return extra_header
+
+@@ -229,6 +229,10 @@
+ # Fixtures for xnat4tests, setup a config, use the pytest tmp_path_factory fixture for the tmpdir
+ @pytest.fixture(scope="session")
+ def xnat4tests_config(tmp_path_factory) -> Config:
++ # Make this a “dummy” fixture so that test functions asking for it can be
++ # collected, but would fail and must be skipped.
++ return None
++
+ tmp_path = tmp_path_factory.mktemp("config")
+
+ docker_host = os.environ.get("DOCKER_HOST")
+diff -Naur a/xnat/tests/functional_tests/test_existing_data.py b/xnat/tests/functional_tests/test_existing_data.py
+--- a/xnat/tests/functional_tests/test_existing_data.py 2026-06-24 16:28:25.000000000 +0100
++++ b/xnat/tests/functional_tests/test_existing_data.py 2026-09-14 07:47:47.782052863 +0100
+@@ -22,6 +22,7 @@
+ pytestmark = [pytest.mark.docker_test, pytest.mark.functional_test]
+
+
++@pytest.mark.skip("Avoid xnat4tests dependency")
+ def test_list_projects(xnat4tests_connection):
+ projects = xnat4tests_connection.projects
+ assert isinstance(projects, XNATListing)
+@@ -36,6 +37,7 @@
+ assert projects["TRAINING"] is projects[1]
+
+
++@pytest.mark.skip("Avoid xnat4tests dependency")
+ def test_list_subjects(xnat4tests_connection):
+ project = xnat4tests_connection.projects["dummydicomproject"]
+ subjects = project.subjects
+@@ -50,6 +52,7 @@
+ assert subjects[subject.label] is subject
+
+
++@pytest.mark.skip("Avoid xnat4tests dependency")
+ def test_list_experiments(xnat4tests_connection):
+ project = xnat4tests_connection.projects["dummydicomproject"]
+ experiments = project.experiments
+diff -Naur a/xnat/tests/functional_tests/test_import.py b/xnat/tests/functional_tests/test_import.py
+--- a/xnat/tests/functional_tests/test_import.py 2026-06-24 16:28:25.000000000 +0100
++++ b/xnat/tests/functional_tests/test_import.py 2026-09-14 07:47:53.967145165 +0100
+@@ -21,6 +21,7 @@
+ pytestmark = [pytest.mark.docker_test, pytest.mark.functional_test]
+
+
++@pytest.mark.skip("Avoid xnat4tests dependency")
+ def test_import_zip_file(xnat4tests_connection,
+ test_resource_dir):
+ connection = xnat4tests_connection
+@@ -67,6 +68,7 @@
+ assert exp_2.scans['6'].type == "--ANONYMIZ_00000000_0000000.00_T1final--"
+
+
++@pytest.mark.skip("Avoid xnat4tests dependency")
+ def test_import_dir(xnat4tests_connection, test_resource_dir):
+ connection = xnat4tests_connection
+
+diff -Naur a/xnat/tests/functional_tests/test_map.py b/xnat/tests/functional_tests/test_map.py
+--- a/xnat/tests/functional_tests/test_map.py 2026-06-24 16:28:25.000000000 +0100
++++ b/xnat/tests/functional_tests/test_map.py 2026-09-14 07:47:22.258671958 +0100
+@@ -22,6 +22,7 @@
+ pytestmark = [pytest.mark.docker_test, pytest.mark.functional_test]
+
+
++@pytest.mark.skip("Avoid xnat4tests dependency")
+ def test_map_loglevel(xnat4tests_connection):
+ # Test mapping over projects, but use string to indicate level
+ result0 = xnat4tests_connection.map(lambda x: x.name, level="project")
+@@ -36,6 +37,7 @@
+ xnat4tests_connection.map(lambda x: x.name, level="wrong_level")
+
+
++@pytest.mark.skip("Avoid xnat4tests dependency")
+ def test_map_connection(xnat4tests_connection):
+ # Test mapping over projects
+ result0 = xnat4tests_connection.map(lambda x: x.name, level=MappingLevel.PROJECT)
+@@ -106,6 +108,7 @@
+ assert sorted(x.label for x in result5) == ["TEST01", "TEST02"]
+
+
++@pytest.mark.skip("Avoid xnat4tests dependency")
+ def test_map_project(xnat4tests_connection):
+ project = xnat4tests_connection.projects["dummydicomproject"]
+
+@@ -141,6 +144,7 @@
+ assert item == MappedFunctionFailed("'MrScanData' object has no attribute 'label'")
+
+
++@pytest.mark.skip("Avoid xnat4tests dependency")
+ def test_map_logfile(xnat4tests_connection, tmp_path):
+ log_file = tmp_path / "map_log.yaml"
+ message = f"We cannot process experiment with label CONT02_MR02"
+@@ -186,6 +190,7 @@
+ }
+
+
++@pytest.mark.skip("Avoid xnat4tests dependency")
+ def test_map_return_value(xnat4tests_connection, tmp_path):
+ project = xnat4tests_connection.projects["dummydicomproject"]
+ log_file1 = tmp_path / "map_log1.yaml"
reply other threads:[~2026-09-15 9:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178946550520.1.1732420859556601694.rpms-python-xnat-98276f39dcd7@fedoraproject.org \
--to=code@musicinmybrain.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox