[med-svn] [Git][med-team/python-iow][upstream] New upstream version 1.0.7
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Sat Aug 31 10:54:02 BST 2024
Étienne Mollier pushed to branch upstream at Debian Med / python-iow
Commits:
f473a502 by Étienne Mollier at 2024-08-31T11:31:22+02:00
New upstream version 1.0.7
- - - - -
9 changed files:
- + .github/workflows/python-package-conda.yml
- + .github/workflows/release.yml
- + .travis.yml
- README.md
- bp/_conv.pyx
- bp/_version.py
- + ci/conda_host_env.yml
- ci/conda_requirements.txt
- setup.py
Changes:
=====================================
.github/workflows/python-package-conda.yml
=====================================
@@ -0,0 +1,65 @@
+name: Python Package using Conda
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+env:
+ latest_python: "3.12"
+ supported_pythons: '["3.8", "3.9", "3.10", "3.11", "3.12"]'
+ miniforge_version: "22.9.0-2"
+ miniforge_variant: "Mambaforge"
+
+jobs:
+ conf:
+ # This job is needed to route the global environment variables into
+ # a context that's available for matrix (and name, but that's unimportant)
+ name: Prepare Test Plan
+ runs-on: "ubuntu-latest"
+ outputs:
+ latest_python: ${{ steps.set-vars.outputs.latest_python }}
+ supported_pythons: ${{ steps.set-vars.outputs.supported_pythons }}
+ steps:
+ - name: Report Plan
+ id: set-vars
+ run: |
+ echo "latest_python=$latest_python" >> $GITHUB_OUTPUT
+ echo "supported_pythons=$supported_pythons" >> $GITHUB_OUTPUT
+ build-lint-test:
+ needs: conf
+ strategy:
+ max-parallel: 5
+ fail-fast: true
+ matrix:
+ python_version: ${{ fromJSON(needs.conf.outputs.supported_pythons) }}
+ os: [ubuntu-latest, macos-13, macos-14]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout at v4
+ with:
+ submodules: true
+ - uses: conda-incubator/setup-miniconda at v2
+ with:
+ auto-update-conda: true
+ python-version: ${{ matrix.python_version }}
+ miniforge-version: ${{ env.miniforge_version }}
+ miniforge-variant: ${{ env.miniforge_variant }}
+ environment-file: ci/conda_host_env.yml
+ - name: Install dependencies
+ shell: bash -l {0}
+ run: |
+ conda install --yes -c conda-forge --file ci/conda_requirements.txt
+ - name: Lint with flake8
+ shell: bash -l {0}
+ run: |
+ # stop the build if there are Python syntax errors or undefined names
+ flake8 bp --count --select=E9,F63,F7,F82 --show-source --statistics
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
+ flake8 bp --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
+ - name: Test with pytest
+ shell: bash -l {0}
+ run: |
+ pip install --no-deps -e .
+ pytest
=====================================
.github/workflows/release.yml
=====================================
@@ -0,0 +1,30 @@
+name: Release
+
+on:
+ push:
+ tags:
+ - '*'
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout at v2
+ with:
+ submodules: true
+ - name: Set up Python 3.8
+ uses: actions/setup-python at v2
+ with:
+ python-version: 3.8
+ - name: Build distribution
+ run: |
+ # set version from '${{ github.ref_name }}'
+ export RELEASE_VERSION=${{ github.ref_name }}
+ pip install numpy cython versioneer
+ python setup.py sdist
+ - name: Publish a Python distribution to PyPI
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
+ uses: pypa/gh-action-pypi-publish at release/v1
+ with:
+ user: __token__
+ password: ${{ secrets.PYPI_API_TOKEN }}
=====================================
.travis.yml
=====================================
@@ -0,0 +1,22 @@
+# Check on http://lint.travis-ci.org/ after modifying it! Originally
+# modified from https://gist.github.com/dan-blanchard/7045057
+sudo: false
+language: python
+env:
+ - PYTHON_VERSION=3.6
+before_install:
+ - wget http://repo.continuum.io/miniconda/Miniconda3-3.7.3-Linux-x86_64.sh -O miniconda.sh
+ - chmod +x miniconda.sh
+ - ./miniconda.sh -b
+ - export PATH=/home/travis/miniconda3/bin:$PATH
+ # Update conda itself
+ - conda update --yes conda
+install:
+ - conda create --yes -n env_name python=$PYTHON_VERSION --file ci/conda_requirements.txt
+ - source activate env_name
+ - pip install . --no-deps
+script:
+ - flake8 bp
+ - make test
+after_success:
+ - coveralls
=====================================
README.md
=====================================
@@ -33,6 +33,8 @@ Fragment insertion
BP supports the [jplace format](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0031009). Fragments can be inserted using either fully-resolved or multifurcation mode to resolve multiple placements to the same edge. In fully resolved, the edge placed against is broken N times where N is the number of fragments on the edge. In multifurcation, a new node is constructed as the average of the distal length for the N fragments, and a separate multifurcation node is added which encompasses the placed fragments.
+Important: the multifurcation mode support is GPL licensed code. Support for that mode is in a fork of this repository, see [improved-octo-waddle-gpl](https://github.com/biocore/improved-octo-waddle-gpl).
+
Insertions can be handled by the command line following install:
```
=====================================
bp/_conv.pyx
=====================================
@@ -24,9 +24,9 @@ def to_skbio_treenode(BP bp):
The tree represented as an skbio.TreeNode
"""
cdef int i
-
- nodes = [skbio.TreeNode() for i in range(sum(bp.B))]
-
+
+ nodes = [skbio.TreeNode() for i in range(bp.B.sum())]
+
# skbio.TreeNode.append makes a very expensive call to
# invalidate_caches. Let's remove that from consideration
# temporarily while constructing the tree
@@ -41,7 +41,7 @@ def to_skbio_treenode(BP bp):
root = nodes[0]
- for i in range(sum(bp.B)):
+ for i in range(bp.B.sum()):
node_idx = bp.preorderselect(i)
nodes[i].name = bp.name(node_idx)
nodes[i].length = bp.length(node_idx)
=====================================
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 = " (tag: 1.0.6)"
- git_full = "4d2fa1cc717dc695e014e2abe0713662357ae504"
- git_date = "2022-12-12 16:27:52 -0800"
+ git_refnames = " (HEAD -> master, tag: 1.0.7)"
+ git_full = "6df7c5c8e1e9bb319e26e3801c41607fec4958da"
+ git_date = "2024-06-26 20:07:04 -0700"
keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
return keywords
=====================================
ci/conda_host_env.yml
=====================================
@@ -0,0 +1,6 @@
+# directly adapted from
+# https://github.com/biocore/scikit-bio/blob/31123c6471dc62f45a55bfdff59c61a4850be367/ci/conda_host_env.yml#LL1C1-L9C35
+name: testing
+channels:
+ - conda-forge
+ - defaults
=====================================
ci/conda_requirements.txt
=====================================
@@ -1,5 +1,5 @@
-nose
+pytest
numpy
flake8
-cython
+cython < 1.0.0
scikit-bio
=====================================
setup.py
=====================================
@@ -101,30 +101,30 @@ extensions.extend([Extension("bp._ba",
if USE_CYTHON:
from Cython.Build import cythonize
- extensions = cythonize(extensions)
+ extensions = cythonize(extensions,
+ language_level=3)
setup(name='iow',
version=versioneer.get_version(),
description='Balanced parentheses',
author='Daniel McDonald',
- author_email='d3mcdonald at eng.ucsd.edu',
+ author_email='damcdonald at ucsd.edu',
maintainer='Daniel McDonald',
- maintainer_email='d3mcdonald at eng.ucsd.edu',
+ maintainer_email='damcdonald at ucsd.edu',
url='https://github.com/biocore/improved-octo-waddle',
packages=['bp'],
ext_modules=extensions,
include_dirs=[np.get_include(), bitarr],
setup_requires=['numpy >= 1.9.2'],
- package_data={'bp': ['BitArray/*',
- 'GPL/*']},
+ package_data={'bp': ['BitArray/*', ]},
install_requires=[
'numpy >= 1.9.2',
'nose >= 1.3.7',
- 'cython >= 0.24.1',
+ 'cython >= 0.24.1, < 1.0.0',
'pandas',
'click',
- 'scikit-bio >= 0.5.0, < 0.6.0'],
+ 'scikit-bio >= 0.5.0'],
long_description=long_description,
long_description_content_type='text/markdown',
cmdclass=versioneer.get_cmdclass({'build_py': BitArrayBuild,
View it on GitLab: https://salsa.debian.org/med-team/python-iow/-/commit/f473a502c212dd45268be866cfcddbc7fe3638d8
--
View it on GitLab: https://salsa.debian.org/med-team/python-iow/-/commit/f473a502c212dd45268be866cfcddbc7fe3638d8
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/20240831/e9c85190/attachment-0001.htm>
More information about the debian-med-commit
mailing list