[med-svn] [Git][med-team/python-iow][master] 6 commits: New upstream version

Michael R. Crusoe (@crusoe) gitlab at salsa.debian.org
Wed Sep 3 11:18:41 BST 2025



Michael R. Crusoe pushed to branch master at Debian Med / python-iow


Commits:
49101499 by Michael R. Crusoe at 2025-09-02T18:28:54+02:00
New upstream version

- - - - -
d3048fac by Michael R. Crusoe at 2025-09-02T18:28:55+02:00
New upstream version 1.0.8
- - - - -
208ff7e5 by Michael R. Crusoe at 2025-09-02T18:28:56+02:00
Update upstream source from tag 'upstream/1.0.8'

Update to upstream version '1.0.8'
with Debian dir e488e9f4242dc4b0907b4405659df427ef349d13
- - - - -
428f350c by Michael R. Crusoe at 2025-09-02T18:28:56+02:00
Standards-Version: 4.7.2 (routine-update)

- - - - -
597da854 by Michael R. Crusoe at 2025-09-02T18:30:32+02:00
Refreshed patches.

- - - - -
a0b23a08 by Michael R. Crusoe at 2025-09-03T12:07:42+02:00
routine-update: Ready to upload to unstable

- - - - -


11 changed files:

- .github/workflows/python-package-conda.yml
- .github/workflows/release.yml
- bp/__init__.py
- bp/_io.pyx
- bp/_version.py
- bp/tests/test_io.py
- ci/conda_requirements.txt
- debian/changelog
- debian/control
- debian/patches/no-runtime-cython.patch
- setup.py


Changes:

=====================================
.github/workflows/python-package-conda.yml
=====================================
@@ -8,8 +8,8 @@ on:
 
 env:
   latest_python: "3.12"
-  supported_pythons: '["3.8", "3.9", "3.10", "3.11", "3.12"]'
-  miniforge_version: "22.9.0-2"
+  supported_pythons: '["3.9", "3.10", "3.11", "3.12"]'
+  miniforge_version: "23.11.0-0"
   miniforge_variant: "Mambaforge"
 
 jobs:


=====================================
.github/workflows/release.yml
=====================================
@@ -12,10 +12,10 @@ jobs:
       - uses: actions/checkout at v2
         with:
           submodules: true
-      - name: Set up Python 3.8
+      - name: Set up Python 3.10
         uses: actions/setup-python at v2
         with:
-          python-version: 3.8
+          python-version: '3.10'
       - name: Build distribution
         run: |
           # set version from '${{ github.ref_name }}'


=====================================
bp/__init__.py
=====================================
@@ -11,9 +11,18 @@ from ._conv import to_skbio_treenode, from_skbio_treenode, to_skbio_treearray
 from ._insert import insert_fully_resolved
 
 
+def load(fp, as_treenode=False):
+    data = open(fp).read()
+    tree = parse_newick(data)
+    if as_treenode:
+        return to_skbio_treenode(tree)
+    else:
+        return tree
+
+
 __all__ = ['BP', 'parse_newick', 'to_skbio_treenode', 'from_skbio_treenode',
            'to_skbio_treearray', 'write_newick', 'parse_jplace',
-           'insert_fully_resolved']
+           'insert_fully_resolved', 'load']
 
 from . import _version
 __version__ = _version.get_versions()['version']


=====================================
bp/_io.pyx
=====================================
@@ -148,8 +148,6 @@ cpdef parse_newick(unicode data):
         np.ndarray[np.double_t, ndim=1] lengths
         np.ndarray[np.int32_t, ndim=1] edges
 
-    if data.count(',') == 0:
-        raise ValueError("Only trees with more than 1 node supported")
 
     data = data.strip()
     if not data.endswith(';'):
@@ -157,6 +155,9 @@ cpdef parse_newick(unicode data):
 
     datalen = len(data)
     topology = _newick_to_bp(data)
+    
+    if len(topology.B) <= 2:
+        raise ValueError("Only trees with more than 1 node supported")
 
     names = np.full(len(topology.B), None, dtype=object)
     lengths = np.zeros(len(topology.B), dtype=np.double)


=====================================
bp/_version.py
=====================================
@@ -24,9 +24,9 @@ def get_keywords():
     # setup.py/versioneer.py will grep for the variable names, so they must
     # each be defined on a line of their own. _version.py will just call
     # get_keywords().
-    git_refnames = " (HEAD -> master, tag: 1.0.7)"
-    git_full = "6df7c5c8e1e9bb319e26e3801c41607fec4958da"
-    git_date = "2024-06-26 20:07:04 -0700"
+    git_refnames = " (HEAD -> master, tag: 1.0.8)"
+    git_full = "0ecd00722bc14016e2ac603641a2046fb052f2a2"
+    git_date = "2025-04-18 11:46:43 -0600"
     keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
     return keywords
 


=====================================
bp/tests/test_io.py
=====================================
@@ -105,21 +105,21 @@ class NewickTests(TestCase):
         in_ = '((foo"bar":1,baz:2)x:3)r;'
         exp = skbio.TreeNode.read([in_])
         obs = to_skbio_treenode(parse_newick(in_))
-        self.assertEqual(obs.compare_subsets(exp), 0.0)
+        self.assertEqual(obs.compare_rfd(exp), 0.0)
 
     def test_parse_newick_with_commas(self):
         # bug: comma is getting interpreted even if in quotes
         in_ = "(('foo,bar':1,baz:2)x:3)r;"
         exp = skbio.TreeNode.read([in_])
         obs = to_skbio_treenode(parse_newick(in_))
-        self.assertEqual(obs.compare_subsets(exp), 0.0)
+        self.assertEqual(obs.compare_rfd(exp), 0.0)
 
     def test_parse_newick_with_parens(self):
         # bug: parens are getting interpreted even if in quotes
         in_ = "(('foo(b)ar':1,baz:2)x:3)r;"
         exp = skbio.TreeNode.read([in_])
         obs = to_skbio_treenode(parse_newick(in_))
-        self.assertEqual(obs.compare_subsets(exp), 0.0)
+        self.assertEqual(obs.compare_rfd(exp), 0.0)
 
     def test_parse_newick(self):
         in_ = "((a:2,b):1,(c:4,d)y:20,e)r;"
@@ -301,6 +301,21 @@ class JPlaceParseTests(TestCase):
         pdt.assert_frame_equal(obs_df, exp_df)
         self.assertEqual(obs_tree.compare_rfd(exp_tree), 0)
 
+    def test_parse_newick_linear_tree(self):
+        # https://github.com/biocore/improved-octo-waddle/pull/48
+        test = '((b:3)a:2)root:1;'
+
+        # Test that we can parse these edge cases successfully, without
+        # mistaking them for single-node trees
+        topology = parse_newick(test)
+
+        # Convert the tree to a skbio TreeNode to make checking easier
+        skbio_tree = to_skbio_treenode(topology)
+        self.assertEqual(skbio_tree.name, "root")
+        self.assertEqual([n.name for n in skbio_tree.children], ["a"])
+        self.assertEqual([n.name for n in skbio_tree.non_tips()], ["a"])
+        self.assertEqual([n.name for n in skbio_tree.tips()], ["b"])
+
 
 if __name__ == '__main__':
     main()


=====================================
ci/conda_requirements.txt
=====================================
@@ -1,5 +1,5 @@
 pytest
 numpy
 flake8
-cython < 1.0.0
+cython
 scikit-bio


=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+python-iow (1.0.8-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version
+  * Standards-Version: 4.7.2 (routine-update)
+  * Refreshed patches.
+
+ -- Michael R. Crusoe <crusoe at debian.org>  Wed, 03 Sep 2025 12:04:00 +0200
+
 python-iow (1.0.7-1) unstable; urgency=medium
 
   * New upstream version 1.0.7


=====================================
debian/control
=====================================
@@ -1,9 +1,9 @@
 Source: python-iow
-Section: science
-Priority: optional
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Uploaders: Andreas Tille <tille at debian.org>,
            Étienne Mollier <emollier at debian.org>
+Section: science
+Priority: optional
 Build-Depends: debhelper-compat (= 13),
                dh-sequence-python3,
                cython3,
@@ -12,8 +12,8 @@ Build-Depends: debhelper-compat (= 13),
                python3-setuptools,
                python3-numpy,
                python3-pandas <!nocheck>,
-               python3-skbio (>= 0.5.8-3~) <!nocheck>
-Standards-Version: 4.7.0
+               python3-skbio <!nocheck>
+Standards-Version: 4.7.2
 Vcs-Browser: https://salsa.debian.org/med-team/python-iow
 Vcs-Git: https://salsa.debian.org/med-team/python-iow.git
 Homepage: https://github.com/biocore/improved-octo-waddle


=====================================
debian/patches/no-runtime-cython.patch
=====================================
@@ -6,12 +6,11 @@ Also drop runtime dependency on nose, adetiste
 
 --- python-iow.orig/setup.py
 +++ python-iow/setup.py
-@@ -120,8 +120,6 @@
-       package_data={'bp': ['BitArray/*', ]},
+@@ -121,7 +121,6 @@
        install_requires=[
            'numpy >= 1.9.2',
--          'nose >= 1.3.7',
--          'cython >= 0.24.1, < 1.0.0',
+           'pytest',
+-          'cython',
            'pandas',
            'click',
            'scikit-bio >= 0.5.0'],


=====================================
setup.py
=====================================
@@ -120,8 +120,8 @@ setup(name='iow',
       package_data={'bp': ['BitArray/*', ]},
       install_requires=[
           'numpy >= 1.9.2',
-          'nose >= 1.3.7',
-          'cython >= 0.24.1, < 1.0.0',
+          'pytest',
+          'cython',
           'pandas',
           'click',
           'scikit-bio >= 0.5.0'],



View it on GitLab: https://salsa.debian.org/med-team/python-iow/-/compare/8d760e2896a3a1d6c5dc49edf9e8e92a376172a8...a0b23a08326e462c30723100c3129b3a2eaaff04

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-iow/-/compare/8d760e2896a3a1d6c5dc49edf9e8e92a376172a8...a0b23a08326e462c30723100c3129b3a2eaaff04
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/20250903/8e9b6506/attachment-0001.htm>


More information about the debian-med-commit mailing list