[med-svn] [Git][med-team/emperor][master] 7 commits: New upstream version 1.0.5+ds

Alexandre Detiste (@detiste-guest) gitlab at salsa.debian.org
Sun Jan 11 15:54:47 GMT 2026



Alexandre Detiste pushed to branch master at Debian Med / emperor


Commits:
93969e1d by Alexandre Detiste at 2026-01-11T16:36:29+01:00
New upstream version 1.0.5+ds
- - - - -
4efdd08f by Alexandre Detiste at 2026-01-11T16:36:39+01:00
Update upstream source from tag 'upstream/1.0.5+ds'

Update to upstream version '1.0.5+ds'
with Debian dir c9f5326bce1c830342cd433267a503ff25cb3a40
- - - - -
a04acbd0 by Alexandre Detiste at 2026-01-11T16:37:31+01:00
drop dependency on python3-pkg-resources

- - - - -
a80cd7f5 by Alexandre Detiste at 2026-01-11T16:38:40+01:00
refresh patch

- - - - -
7c3f8169 by Alexandre Detiste at 2026-01-11T16:39:35+01:00
drop pandas-2.patch, applied upstream

- - - - -
3da03752 by Alexandre Detiste at 2026-01-11T16:40:50+01:00
release

- - - - -
2d25ac91 by Alexandre Detiste at 2026-01-11T16:48:17+01:00
rewrite d/rules with newer & shorter syntax

- - - - -


15 changed files:

- .github/workflows/main.yml
- ChangeLog.md
- debian/changelog
- debian/control
- − debian/patches/pandas-2.patch
- debian/patches/python3.12,patch
- debian/patches/series
- debian/rules
- doc/source/conf.py
- emperor/__init__.py
- emperor/util.py
- setup.py
- tests/test_core.py
- tests/test_pandas.py
- tests/test_util.py


Changes:

=====================================
.github/workflows/main.yml
=====================================
@@ -17,7 +17,7 @@ jobs:
     # we can add more versions of node.js in the future
     strategy:
       matrix:
-        python-version: ['3.7', '3.8']
+        python-version: ['3.8']
 
     # Steps represent a sequence of tasks that will be executed as part of the job
     steps:
@@ -52,7 +52,7 @@ jobs:
       - name: Install Emperor
         shell: bash -l {0}
         run: |
-          conda install pip numpy 'scipy>=0.17.0' matplotlib pandas flake8 pep8 jupyter coverage cython scikit-learn requests
+          conda install pip numpy 'scipy>=0.17.0' matplotlib pandas flake8 pep8 jupyter coverage cython scikit-learn requests "notebook<7"
           conda install -c conda-forge phantomjs --yes
           pip install -e ".[all]"
 
@@ -63,6 +63,8 @@ jobs:
 
       - name: Run tests and measure coverage
         shell: bash -l {0}
+        env:
+          OPENSSL_CONF: /dev/null
         run: |
           coverage run tests/all_tests.py
           coverage report


=====================================
ChangeLog.md
=====================================
@@ -1,6 +1,18 @@
 Emperor ChangeLog
 =================
 
+# Emperor 1.0.5 (13 Dec 2025)
+-----------------------------
+
+### Miscellaneous
+
+* Pin `notebook<7` for CI workflow.
+* Update Python unit tests for new Pandas versions.
+* Remove EOL Python version `3.7` from test matrix in CI workflow.
+* Apply a workaround (`OPENSSL_CONF=/dev/null`) for running PhantomJS on `ubuntu-latest` in CI workflow.
+* Replaced call to `pkg_resources` with the relevant `importlib` command.
+
+
 # Emperor 1.0.4 (10 Jul 2023)
 -----------------------------
 


=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+emperor (1.0.5+ds-1) unstable; urgency=medium
+
+  * Team upload.
+  * Bump Standards-Version to 4.7.3, no more change needed
+  * New upstream version 1.0.5+ds
+  * Drop dependency on python3-pkg-resources
+  * Refresh python3.12,patch
+  * Drop pandas-2.patch, applied upstream
+  * Rewrite d/rules with newer & shorter syntax
+
+ -- Alexandre Detiste <tchet at debian.org>  Sun, 11 Jan 2026 16:40:14 +0100
+
 emperor (1.0.4+ds-2) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -34,7 +34,6 @@ Depends:
  python3-jinja2,
  python3-numpy,
  python3-pandas,
- python3-pkg-resources,
  python3-scipy (>= 1.9),
  python3-skbio (>= 0.5.8-2exp1~),
  ${misc:Depends},


=====================================
debian/patches/pandas-2.patch deleted
=====================================
@@ -1,80 +0,0 @@
-Description: Replace pd.util.testing with pd.testing as the former has been pruned in pandas2.x
-Author: Nilesh Patra <nilesh at debian.org>
-Last-Update: 2024-02-04
---- a/tests/test_core.py
-+++ b/tests/test_core.py
-@@ -202,7 +202,7 @@
-         feature_mf['Second'] = ['No', 'Yes', 'Noes', 'Noooo', 'Yep']
- 
-         # it is redundant, but the mapping file should remain untouched
--        pd.util.testing.assert_frame_equal(feature_mf, emp.feature_mf,
-+        pd.testing.assert_frame_equal(feature_mf, emp.feature_mf,
-                                            check_names=False)
- 
-         self.assertEqual(emp.base_url, 'https://cdn.rawgit.com/biocore/emperor'
-@@ -223,7 +223,7 @@
-                                        'f.PC.481', 'f.PC.354'])
-         empty_mf['all'] = 'All elements'
- 
--        pd.util.testing.assert_frame_equal(empty_mf, emp.feature_mf,
-+        pd.testing.assert_frame_equal(empty_mf, emp.feature_mf,
-                                            check_names=False)
- 
-         self.assertEqual(emp.base_url, 'https://cdn.rawgit.com/biocore/emperor'
-@@ -291,7 +291,7 @@
- 
-             expected.loc['PC.634'] = ['This element has no metadata'] * 3
- 
--            pd.util.testing.assert_frame_equal(expected.sort_index(),
-+            pd.testing.assert_frame_equal(expected.sort_index(),
-                                                emp.mf.sort_index(),
-                                                check_names=False)
- 
-@@ -313,7 +313,7 @@
- 
-             expected.loc['f.PC.636'] = ['This element has no metadata'] * 2
- 
--            pd.util.testing.assert_frame_equal(expected.sort_index(),
-+            pd.testing.assert_frame_equal(expected.sort_index(),
-                                                emp.feature_mf.sort_index(),
-                                                check_names=False)
- 
---- a/tests/test_pandas.py
-+++ b/tests/test_pandas.py
-@@ -66,9 +66,9 @@
-         self.assertTrue(isinstance(emp, Emperor))
-         self.assertEqual(emp.dimensions, 4)
- 
--        pd.util.testing.assert_frame_equal(self.df, emp.mf)
-+        pd.testing.assert_frame_equal(self.df, emp.mf)
- 
--        pd.util.testing.assert_frame_equal(emp.ordination.samples,
-+        pd.testing.assert_frame_equal(emp.ordination.samples,
-                                            self.samples)
- 
-     def test_scatterplot_reordered(self):
-@@ -80,11 +80,11 @@
-         self.assertEqual(emp.base_url, 'https://cdn.rawgit.com/biocore/'
-                          'emperor/new-api/emperor/support_files')
- 
--        pd.util.testing.assert_frame_equal(self.df, emp.mf)
-+        pd.testing.assert_frame_equal(self.df, emp.mf)
- 
-         reordered = self.samples[['num_3', 'num_2', 'num_1', 'num_4']].copy()
- 
--        pd.util.testing.assert_frame_equal(emp.ordination.samples,
-+        pd.testing.assert_frame_equal(emp.ordination.samples,
-                                            reordered)
- 
-     def test_bad_column_names(self):
---- a/tests/test_util.py
-+++ b/tests/test_util.py
-@@ -282,7 +282,7 @@
-         mf = pd.DataFrame(data=MAPPING_FILE_DATA, columns=columns)
-         obs = validate_and_process_custom_axes(mf, ['DOB'])
-         exp = pd.DataFrame(data=MAPPING_FILE_DATA_CONVERTED, columns=columns)
--        pd.util.testing.assert_frame_equal(obs, exp)
-+        pd.testing.assert_frame_equal(obs, exp)
- 
-     def test_custom_axes_non_existent_names(self):
-         columns = ['SampleID', 'BarcodeSequence', 'LinkerPrimerSequence',


=====================================
debian/patches/python3.12,patch
=====================================
@@ -4,7 +4,7 @@ Last-Update: Fri, 15 Dec 2023 22:10:49 +0100
 
 --- a/tests/test_core.py
 +++ b/tests/test_core.py
-@@ -235,7 +235,7 @@ class TopLevelTests(TestCase):
+@@ -237,7 +237,7 @@
          self.ord_res.proportion_explained = \
              self.ord_res.proportion_explained[:1].copy()
  
@@ -13,7 +13,7 @@ Last-Update: Fri, 15 Dec 2023 22:10:49 +0100
                                       "two dimensions are not supported"):
              Emperor(self.ord_res, self.mf, remote=False)
  
-@@ -243,7 +243,7 @@ class TopLevelTests(TestCase):
+@@ -245,7 +245,7 @@
          mf = self.mf.copy()
          mf.drop(['PC.354', 'PC.355', 'PC.356', 'PC.481', 'PC.607', 'PC.636'],
                  inplace=True)
@@ -22,7 +22,7 @@ Last-Update: Fri, 15 Dec 2023 22:10:49 +0100
                                       "included in the sample mapping file. "
                                       "Override this error by using the "
                                       "`ignore_missing_samples` argument. "
-@@ -255,7 +255,7 @@ class TopLevelTests(TestCase):
+@@ -257,7 +257,7 @@
      def test_initial_unbalanced(self):
          mf = self.mf.copy()
          mf.drop(['PC.354'], inplace=True)
@@ -31,7 +31,7 @@ Last-Update: Fri, 15 Dec 2023 22:10:49 +0100
                                       "included in the sample mapping file. "
                                       "Override this error by using the "
                                       "`ignore_missing_samples` argument. "
-@@ -265,7 +265,7 @@ class TopLevelTests(TestCase):
+@@ -267,7 +267,7 @@
          # test feature metadata
          fmf = self.feature_mf.copy()
          fmf.drop(['f.PC.636'], inplace=True)
@@ -40,7 +40,7 @@ Last-Update: Fri, 15 Dec 2023 22:10:49 +0100
                                       "included in the feature mapping file. "
                                       "Override this error by using the "
                                       "`ignore_missing_samples` argument. "
-@@ -321,7 +321,7 @@ class TopLevelTests(TestCase):
+@@ -323,7 +323,7 @@
          mf = self.mf.copy()
          mf.index = mf.index + '.not'
  
@@ -49,7 +49,7 @@ Last-Update: Fri, 15 Dec 2023 22:10:49 +0100
                                       'identifiers match between the metadata '
                                       'and the coordinates. Verify that you are'
                                       ' using metadata and coordinates '
-@@ -331,7 +331,7 @@ class TopLevelTests(TestCase):
+@@ -333,7 +333,7 @@
          fmf = self.feature_mf.copy()
          fmf.index = fmf.index + '.not'
  


=====================================
debian/patches/series
=====================================
@@ -4,4 +4,3 @@ EditSectionTitle.patch
 # ignore_one_failing_test.patch
 no_future_dependency.patch
 python3.12,patch
-pandas-2.patch


=====================================
debian/rules
=====================================
@@ -16,8 +16,7 @@ export PYBUILD_BEFORE_INSTALL=rm -rvf {build_dir}/emperor.egg* \
 %:
 	dh $@ --with sphinxdoc --buildsystem=pybuild
 
-override_dh_installdocs:
-	dh_installdocs
+execute_after_dh_installdocs:
 	p="debian/python3-emperor-doc/usr/share/doc/python3-emperor/jsdoc" ; \
 	if [ -d "$$p" ]; then \
 	  echo "I: Removing date from jsdoc signature line for reproducible builds in $$p" ; \
@@ -38,8 +37,7 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	PYTHONPATH=.pybuild/`find .pybuild -name cpython3*_emperor -type d|head -n 1`/build pytest-3
 endif
 
-override_dh_auto_clean:
-	dh_auto_clean
+execute_after_dh_auto_clean:
 	cd $(CURDIR)/doc && make clean
 	rm -fr tests/javascript_tests/qunit
 	# since packaging seems problematic


=====================================
doc/source/conf.py
=====================================
@@ -58,10 +58,10 @@ copyright = u'2014, Emperor Development Team'
 # built documents.
 #
 # The short X.Y version.
-version = '1.0.4'
+version = '1.0.5'
 
 # The full version, including alpha/beta/rc tags.
-release = '1.0.4'
+release = '1.0.5'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.


=====================================
emperor/__init__.py
=====================================
@@ -6,8 +6,8 @@
 # The full license is in the file LICENSE.md, distributed with this software.
 # ----------------------------------------------------------------------------
 
-import pkg_resources
-__version__ = pkg_resources.get_distribution('emperor').version  # noqa
+from importlib.metadata import version
+__version__ = version('emperor')  # noqa
 
 from emperor.core import Emperor
 from emperor._pandas import scatterplot


=====================================
emperor/util.py
=====================================
@@ -186,9 +186,9 @@ def preprocess_coords_file(coords_header, coords_data, coords_eigenvals,
 
     # prevent obscure and obfuscated errors
     if is_comparison:
-        assert type(coords_data) == list, ("Cannot process a comparison with "
-                                           "the data from a single "
-                                           "coordinates file")
+        assert isinstance(coords_data, list), \
+            ("Cannot process a comparison with the data from a single "
+             "coordinates file")
 
     mapping_file = [mapping_header] + mapping_data
     coords_file = [coords_header, coords_data]
@@ -196,12 +196,12 @@ def preprocess_coords_file(coords_header, coords_data, coords_eigenvals,
     # number PCoA files; zero for any case except for comparison plots
     clones = 0
 
-    if custom_axes and type(coords_data) == np.ndarray:
+    if custom_axes and isinstance(coords_data, np.ndarray):
         # sequence ported from qiime/scripts/make_3d_plots.py @ 9115351
         get_custom_coords(custom_axes, mapping_file, coords_file)
         remove_nans(coords_file)
         scale_custom_coords(custom_axes, coords_file)
-    elif type(coords_data) == list and not is_comparison:
+    elif isinstance(coords_data, list) and not is_comparison:
         # take the first pcoa file as the master set of coordinates
         master_pcoa = [coords_header[0], coords_data[0],
                        coords_eigenvals[0], coords_pct[0]]
@@ -212,7 +212,7 @@ def preprocess_coords_file(coords_header, coords_data, coords_eigenvals,
                          coords_data, coords_eigenvals, coords_pct)]
 
         # do not apply procrustes, at least not for now
-        coords_data, coords_low, coords_high, eigenvalues_average,\
+        coords_data, coords_low, coords_high, eigenvalues_average, \
             identifiers = summarize_pcoas(master_pcoa, support_pcoas,
                                           method=jackknifing_method,
                                           apply_procrustes=False)
@@ -243,10 +243,10 @@ def preprocess_coords_file(coords_header, coords_data, coords_eigenvals,
             master_pcoa[3] = master_pcoa[3]*100
 
         # return a value containing coords_low and coords_high
-        return identifiers, coords_data, eigenvalues_average, master_pcoa[3],\
+        return identifiers, coords_data, eigenvalues_average, master_pcoa[3], \
             coords_low, coords_high, clones
     # comparison plots are processed almost individually
-    elif type(coords_data) == list and is_comparison:
+    elif isinstance(coords_data, list) and is_comparison:
 
         # indicates the number of files that were totally processed so other
         # functions/APIs are aware of how many times to replicate the metadata
@@ -285,8 +285,8 @@ def preprocess_coords_file(coords_header, coords_data, coords_eigenvals,
 
     # if no coords summary is applied, return None in the corresponding values
     # note that the value of clones will be != 0 for a comparison plot
-    return coords_file[0], coords_file[1], coords_eigenvals, coords_pct, None,\
-        None, clones
+    return coords_file[0], coords_file[1], coords_eigenvals, coords_pct, \
+        None, None, clones
 
 
 def validate_and_process_custom_axes(mf, custom_axes):


=====================================
setup.py
=====================================
@@ -9,7 +9,7 @@
 
 from setuptools import setup, find_packages
 
-__version__ = "1.0.4"
+__version__ = "1.0.5"
 __maintainer__ = "Emperor development team"
 __email__ = "yoshiki89 at gmail.com"
 


=====================================
tests/test_core.py
=====================================
@@ -204,8 +204,8 @@ class TopLevelTests(TestCase):
         feature_mf['Second'] = ['No', 'Yes', 'Noes', 'Noooo', 'Yep']
 
         # it is redundant, but the mapping file should remain untouched
-        pd.util.testing.assert_frame_equal(feature_mf, emp.feature_mf,
-                                           check_names=False)
+        pd.testing.assert_frame_equal(feature_mf, emp.feature_mf,
+                                      check_names=False)
 
         self.assertEqual(emp.base_url, 'https://cdn.rawgit.com/biocore/emperor'
                                        '/new-api/emperor/support_files')
@@ -225,8 +225,8 @@ class TopLevelTests(TestCase):
                                        'f.PC.481', 'f.PC.354'])
         empty_mf['all'] = 'All elements'
 
-        pd.util.testing.assert_frame_equal(empty_mf, emp.feature_mf,
-                                           check_names=False)
+        pd.testing.assert_frame_equal(empty_mf, emp.feature_mf,
+                                      check_names=False)
 
         self.assertEqual(emp.base_url, 'https://cdn.rawgit.com/biocore/emperor'
                                        '/new-api/emperor/support_files')
@@ -293,9 +293,9 @@ class TopLevelTests(TestCase):
 
             expected.loc['PC.634'] = ['This element has no metadata'] * 3
 
-            pd.util.testing.assert_frame_equal(expected.sort_index(),
-                                               emp.mf.sort_index(),
-                                               check_names=False)
+            pd.testing.assert_frame_equal(expected.sort_index(),
+                                          emp.mf.sort_index(),
+                                          check_names=False)
 
         expected = self.feature_mf.copy()
 
@@ -315,9 +315,9 @@ class TopLevelTests(TestCase):
 
             expected.loc['f.PC.636'] = ['This element has no metadata'] * 2
 
-            pd.util.testing.assert_frame_equal(expected.sort_index(),
-                                               emp.feature_mf.sort_index(),
-                                               check_names=False)
+            pd.testing.assert_frame_equal(expected.sort_index(),
+                                          emp.feature_mf.sort_index(),
+                                          check_names=False)
 
     def test_no_overlap(self):
         mf = self.mf.copy()


=====================================
tests/test_pandas.py
=====================================
@@ -66,10 +66,10 @@ class TopLevelTests(TestCase):
         self.assertTrue(isinstance(emp, Emperor))
         self.assertEqual(emp.dimensions, 4)
 
-        pd.util.testing.assert_frame_equal(self.df, emp.mf)
+        pd.testing.assert_frame_equal(self.df, emp.mf)
 
-        pd.util.testing.assert_frame_equal(emp.ordination.samples,
-                                           self.samples)
+        pd.testing.assert_frame_equal(emp.ordination.samples,
+                                      self.samples)
 
     def test_scatterplot_reordered(self):
         emp = scatterplot(self.df, x='num_3', y='num_2', z='num_1',
@@ -80,12 +80,12 @@ class TopLevelTests(TestCase):
         self.assertEqual(emp.base_url, 'https://cdn.rawgit.com/biocore/'
                          'emperor/new-api/emperor/support_files')
 
-        pd.util.testing.assert_frame_equal(self.df, emp.mf)
+        pd.testing.assert_frame_equal(self.df, emp.mf)
 
         reordered = self.samples[['num_3', 'num_2', 'num_1', 'num_4']].copy()
 
-        pd.util.testing.assert_frame_equal(emp.ordination.samples,
-                                           reordered)
+        pd.testing.assert_frame_equal(emp.ordination.samples,
+                                      reordered)
 
     def test_bad_column_names(self):
         np.testing.assert_raises(ValueError, scatterplot, self.df, x=':L')


=====================================
tests/test_util.py
=====================================
@@ -121,7 +121,7 @@ class TopLevelTests(TestCase):
         """Check correct processing is applied to the coords"""
 
         # case with custom axes
-        out_coords_header, out_coords_data, out_eigenvals, out_pcts,\
+        out_coords_header, out_coords_data, out_eigenvals, out_pcts, \
             out_coords_low, out_coords_high, o_clones = preprocess_coords_file(
                 self.coords_header, self.coords_data, self.coords_eigenvalues,
                 self.coords_pct, self.mapping_file_headers_gradient,
@@ -147,7 +147,7 @@ class TopLevelTests(TestCase):
                 self.assertAlmostEqual(out_el_sub, exp_el_sub)
 
         # case for jackknifing, based on qiime/tests/test_util.summarize_pcoas
-        out_coords_header, out_coords_data, out_eigenvals, out_pcts,\
+        out_coords_header, out_coords_data, out_eigenvals, out_pcts, \
             out_coords_low, out_coords_high, o_clones = preprocess_coords_file(
                 self.jk_coords_header, self.jk_coords_data,
                 self.jk_coords_eigenvalues, self.jk_coords_pcts,
@@ -170,7 +170,7 @@ class TopLevelTests(TestCase):
                                    [0.04787136, 0.025, 0.07071068]]))
 
         # test custom axes and jackknifed plots
-        out_coords_header, out_coords_data, out_eigenvals, out_pcts,\
+        out_coords_header, out_coords_data, out_eigenvals, out_pcts, \
             out_coords_low, out_coords_high, o_clones = preprocess_coords_file(
                 self.jk_coords_header_gradient, self.jk_coords_data_gradient,
                 self.jk_coords_eigenvalues_gradient,
@@ -209,7 +209,7 @@ class TopLevelTests(TestCase):
         self.assertEqual(o_clones, 0)
 
         # test that pct_variation_below_one is working
-        out_coords_header, out_coords_data, out_eigenvals, out_pcts,\
+        out_coords_header, out_coords_data, out_eigenvals, out_pcts, \
             out_coords_low, out_coords_high, o_clones = preprocess_coords_file(
                 self.jk_coords_header_gradient, self.jk_coords_data_gradient,
                 self.jk_coords_eigenvalues_gradient,
@@ -238,7 +238,7 @@ class TopLevelTests(TestCase):
             self.coords_pct, self.mapping_file_headers_gradient,
             self.mapping_file_data_gradient, None, None, True)
 
-        out_coords_header, out_coords_data, out_eigenvals, out_pcts,\
+        out_coords_header, out_coords_data, out_eigenvals, out_pcts, \
             out_coords_low, out_coords_high, o_clones = preprocess_coords_file(
                 self.jk_coords_header, self.jk_coords_data,
                 self.jk_coords_eigenvalues, self.jk_coords_pcts,
@@ -282,7 +282,7 @@ class TopLevelTests(TestCase):
         mf = pd.DataFrame(data=MAPPING_FILE_DATA, columns=columns)
         obs = validate_and_process_custom_axes(mf, ['DOB'])
         exp = pd.DataFrame(data=MAPPING_FILE_DATA_CONVERTED, columns=columns)
-        pd.util.testing.assert_frame_equal(obs, exp)
+        pd.testing.assert_frame_equal(obs, exp)
 
     def test_custom_axes_non_existent_names(self):
         columns = ['SampleID', 'BarcodeSequence', 'LinkerPrimerSequence',



View it on GitLab: https://salsa.debian.org/med-team/emperor/-/compare/23762617502d4afeeb613d4c17d0baeba1e5c074...2d25ac918c2f18fc553908d9db1da2f6fcb96b56

-- 
View it on GitLab: https://salsa.debian.org/med-team/emperor/-/compare/23762617502d4afeeb613d4c17d0baeba1e5c074...2d25ac918c2f18fc553908d9db1da2f6fcb96b56
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/20260111/40f0d5c3/attachment-0001.htm>


More information about the debian-med-commit mailing list