[med-svn] [Git][med-team/pyensembl][master] 4 commits: New upstream version 2.6.0
Alexandre Detiste (@detiste-guest)
gitlab at salsa.debian.org
Sat Apr 4 23:24:37 BST 2026
Alexandre Detiste pushed to branch master at Debian Med / pyensembl
Commits:
4ab79130 by Alexandre Detiste at 2026-04-05T00:16:28+02:00
New upstream version 2.6.0
- - - - -
5ffce0a8 by Alexandre Detiste at 2026-04-05T00:16:28+02:00
Update upstream source from tag 'upstream/2.6.0'
Update to upstream version '2.6.0'
with Debian dir f8d1f79d6450ef9f43ba34d1fc5076252d4df294
- - - - -
b829958f by Alexandre Detiste at 2026-04-05T00:23:45+02:00
refresh patch
- - - - -
7277a088 by Alexandre Detiste at 2026-04-05T00:24:10+02:00
commit WIP new release
- - - - -
15 changed files:
- .github/workflows/tests.yml
- CONTRIBUTING.md
- README.md
- debian/changelog
- debian/control
- debian/patches/no_tinytimer_in_requirements.txt
- lint.sh
- pyensembl/ensembl_versions.py
- pyensembl/shell.py
- pyensembl/species.py
- pyensembl/version.py
- + pyproject.toml
- − requirements.txt
- − setup.py
- + tests/test_build_system.py
Changes:
=====================================
.github/workflows/tests.yml
=====================================
@@ -15,22 +15,21 @@ jobs:
strategy:
fail-fast: true
matrix:
- python-version: ["3.9", "3.10", "3.11"]
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout repository
- uses: actions/checkout at v3
+ uses: actions/checkout at v4
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python at v3
+ uses: actions/setup-python at v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
+ cache-dependency-path: "pyproject.toml"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- python -m pip install flake8 pytest pytest-cov coveralls
- pip install -r requirements.txt
- pip install .
+ pip install .[dev]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
=====================================
CONTRIBUTING.md
=====================================
@@ -1,6 +1,6 @@
# Contributing to PyEnsembl
-[PyEnsembl](http://www.github.com/hammerlab/pyensembl) is open source software and
+[PyEnsembl](http://www.github.com/openvax/pyensembl) is open source software and
we welcome your contributions. This document should help you get started
contributing to PyEnsembl.
@@ -8,8 +8,8 @@ contributing to PyEnsembl.
If you find any bugs or problems while using PyEnsembl or have any feature requests, please feel free to file an issue against the project. When doing so, please follow the guidelines below:
-To report any bugs, issues, or feature requests, please [open an issue](https://github.com/hammerlab/pyensembl/issues)
-Please check the [current open issues](https://github.com/hammerlab/pyensembl/issues) to see if the request already exists
+To report any bugs, issues, or feature requests, please [open an issue](https://github.com/openvax/pyensembl/issues)
+Please check the [current open issues](https://github.com/openvax/pyensembl/issues) to see if the request already exists
If you are filing a bug report, please describe the version of PyEnsembl and Python you are using. If your problem involves a particular gene, transcript, or genomic locus, please include that information (e.g. "Missing transcript sequence for BRCA1-002 for Ensembl release 74").
## Coding Guidelines
@@ -21,7 +21,7 @@ If you are filing a bug report, please describe the version of PyEnsembl and Pyt
- If the work is based on an existing issue, please reference the issue in the PR.
- All new code should be accompanied by comprehensive unit tests.
- If the PR fixes or implements an issue, please state "Closes #XYZ" or "Fixes #XYZ", where XYZ is the issue number.
-- Please ensure that your code works under Python >= 3.7.
+- Please ensure that your code works under Python >= 3.9.
## Licensing
=====================================
README.md
=====================================
@@ -25,7 +25,7 @@ exon_ids = data.exon_ids_of_gene_name('HLA-A')
# Installation
-You can install PyEnsembl using [pip](https://pip.pypa.io/en/latest/quickstart.html):
+PyEnsembl requires Python 3.9 or later. You can install PyEnsembl using [pip](https://pip.pypa.io/en/latest/quickstart.html):
```sh
pip install pyensembl
@@ -46,6 +46,27 @@ human reference data from Ensembl releases 75 and 76.
Alternatively, you can create the `EnsemblRelease` object from inside a Python
process and call `ensembl_object.download()` followed by `ensembl_object.index()`.
+## Development Setup
+
+For development, install PyEnsembl in editable mode with development dependencies:
+
+```sh
+git clone https://github.com/openvax/pyensembl.git
+cd pyensembl
+pip install -e .[dev]
+```
+
+This installs the package in development mode along with tools for testing, linting, and building:
+- `pytest` for running tests
+- `ruff` and `flake8` for code linting
+- `pytest-cov` for coverage reporting
+- `build` for package building
+
+Run tests with:
+```sh
+pytest
+```
+
## Cache Location
By default, PyEnsembl uses the platform-specific `Cache` folder
=====================================
debian/changelog
=====================================
@@ -1,9 +1,17 @@
-pyensembl (2.3.13-4) UNRELEASED; urgency=medium
+pyensembl (2.6.0-1) UNRELEASED; urgency=medium
- * d/copyright: Separated copyright for included fragments of
- public databases.
+ * Team Upload
+ * New upstream version 2.6.0 (Closes: #1125842)
+ * Rewrite d/rules with newer & shorter syntax
+ * Drop "Rules-Requires-Root: no": it is the default now
+ * Bump Standards-Version to 4.7.4, drop Priority: tag
+ * New upstream version 2.6.0
- -- Steffen Moeller <moeller at debian.org> Mon, 27 Oct 2025 01:09:08 +0100
+ [ Steffen Moeller ]
+ * d/copyright: Separated copyright for included fragments of
+ public databases.
+
+ -- Alexandre Detiste <tchet at debian.org> Sun, 05 Apr 2026 00:19:45 +0200
pyensembl (2.3.13-3) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -5,6 +5,7 @@ Uploaders: Steffen Moeller <moeller at debian.org>,
Étienne Mollier <emollier at debian.org>
Build-Depends: debhelper-compat (= 13),
dh-sequence-python3,
+ pybuild-plugin-pyproject,
python3-setuptools,
python3-all,
python3-pandas,
@@ -25,7 +26,6 @@ Testsuite: autopkgtest-pkg-pybuild
Package: pyensembl
Architecture: all
Depends:
- python3-pkg-resources,
${python3:Depends},
${misc:Depends},
Description: installs data from the Ensembl genome database
=====================================
debian/patches/no_tinytimer_in_requirements.txt
=====================================
@@ -1,12 +1,10 @@
-Index: pyensembl/requirements.txt
-===================================================================
---- pyensembl.orig/requirements.txt
-+++ pyensembl/requirements.txt
-@@ -1,7 +1,6 @@
- typechecks>=0.0.2,<1.0.0
- datacache>=1.4.0,<2.0.0
- memoized-property>=1.0.2
--tinytimer>=0.0.0,<1.0.0
- gtfparse>=2.5.0,<3.0.0
- serializable>=0.2.1,<1.0.0
- pylint>=2.17.2,<3.0.0
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -24,7 +24,6 @@
+ "typechecks>=0.0.2,<1.0.0",
+ "datacache>=1.4.0,<2.0.0",
+ "memoized-property>=1.0.2",
+- "tinytimer>=0.0.0,<1.0.0",
+ "gtfparse>=2.5.0,<3.0.0",
+ "serializable>=0.2.1,<1.0.0",
+ "numpy>=2.0.0,<3.0.0",
=====================================
lint.sh
=====================================
@@ -1,15 +1,6 @@
#!/bin/bash
set -o errexit
-
-# disabling several categories of errors due to false positives in pylint,
-# see these issues:
-# - https://bitbucket.org/logilab/pylint/issues/701/false-positives-with-not-an-iterable-and
-# - https://bitbucket.org/logilab/pylint/issues/58
-
-find pyensembl -name '*.py' \
- | xargs pylint \
- --errors-only \
- --disable=unsubscriptable-object,not-an-iterable,no-member
-
-echo 'Passes pylint check'
+ruff check pyensembl/ \
+&& \
+echo "Passes ruff check"
=====================================
pyensembl/ensembl_versions.py
=====================================
@@ -11,9 +11,10 @@
# limitations under the License.
MIN_ENSEMBL_RELEASE = 40
-MAX_ENSEMBL_RELEASE = 111
+MAX_ENSEMBL_RELEASE = 115
MAX_PLANTS_ENSEMBL_RELEASE = 58
+
def check_release_number(release):
"""
Check to make sure a release is in the valid range of
@@ -21,7 +22,7 @@ def check_release_number(release):
"""
try:
release = int(release)
- except:
+ except (ValueError, TypeError):
raise ValueError("Invalid Ensembl release: %s" % release)
if release < MIN_ENSEMBL_RELEASE:
=====================================
pyensembl/shell.py
=====================================
@@ -40,7 +40,7 @@ To install a genome from source files:
import argparse
import logging.config
-import pkg_resources
+from importlib import resources
import os
from .ensembl_release import EnsemblRelease
@@ -49,7 +49,7 @@ from .genome import Genome
from .species import Species
from .version import __version__
-logging.config.fileConfig(pkg_resources.resource_filename(__name__, "logging.conf"))
+logging.config.fileConfig(str(resources.files("pyensembl") / "logging.conf"))
logger = logging.getLogger(__name__)
=====================================
pyensembl/species.py
=====================================
@@ -239,7 +239,8 @@ brown_rat = Species.register(
reference_assemblies={
"Rnor_5.0": (75, 79),
"Rnor_6.0": (80, 104),
- "mRatBN7.2": (105, MAX_ENSEMBL_RELEASE),
+ "mRatBN7.2": (105, 113),
+ "GRCr8": (114, MAX_ENSEMBL_RELEASE),
},
)
@@ -369,4 +370,45 @@ rice = Species.register(
"IRGSP-1.0": (40, MAX_PLANTS_ENSEMBL_RELEASE),
},
is_plant=True
-)
\ No newline at end of file
+)
+
+#BALB/c
+mus_musculus_balbc = Species.register(
+ latin_name='mus_musculus_balbcj',
+ synonyms=['mus_balbc', 'BALB/c'],
+ reference_assemblies = {
+ 'BALB_cJ_v1':(76, 113),
+ 'BALB_cJ_v3':(114, MAX_ENSEMBL_RELEASE),
+ })
+#129
+mus_musculus_129 = Species.register(
+ latin_name='mus_musculus_129s1svimj',
+ synonyms=['mus_129', '129'],
+ reference_assemblies = {
+ '129S1_SvImJ_v1':(76, 113),
+ '129S1_SvImJ_v3':(114, MAX_ENSEMBL_RELEASE),
+ })
+#FVB
+mus_musculus_fvb = Species.register(
+ latin_name='mus_musculus_fvbnj',
+ synonyms=['mus_fvb', 'FVB'],
+ reference_assemblies = {
+ 'FVB_NJ_v1':(76, 113),
+ 'FVB_NJ_v3':(114, MAX_ENSEMBL_RELEASE),
+ })
+#NOD
+mus_musculus_nod = Species.register(
+ latin_name='mus_musculus_nodshiltj',
+ synonyms=['mus_nod', 'NOD'],
+ reference_assemblies = {
+ 'NOD_ShiLtJ_v1':(76, 113),
+ 'NOD_ShiLtJ_v3':(114, MAX_ENSEMBL_RELEASE),
+ })
+#6NJ
+mus_musculus_c57bl6nj = Species.register(
+ latin_name='mus_musculus_c57bl6nj',
+ synonyms=['mus_6nj', '6NJ'],
+ reference_assemblies = {
+ 'C57BL_6NJ_v1':(76, 113),
+ 'C57BL_6NJ_v3':(114, MAX_ENSEMBL_RELEASE),
+ })
=====================================
pyensembl/version.py
=====================================
@@ -1,4 +1,4 @@
-__version__ = "2.3.13"
+__version__ = "2.6.0"
def print_version():
print(f"v{__version__}")
=====================================
pyproject.toml
=====================================
@@ -0,0 +1,54 @@
+[build-system]
+requires = ["setuptools>=61.0", "wheel"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "pyensembl"
+dynamic = ["version"]
+description = "Python interface to Ensembl reference genome metadata"
+authors = [
+ {name = "Alex Rubinsteyn", email = "alex.rubinsteyn at unc.edu"}
+]
+license = "Apache-2.0"
+readme = "README.md"
+requires-python = ">=3.9"
+classifiers = [
+ "Development Status :: 4 - Beta",
+ "Environment :: Console",
+ "Operating System :: OS Independent",
+ "Intended Audience :: Science/Research",
+ "Programming Language :: Python",
+ "Topic :: Scientific/Engineering :: Bio-Informatics",
+]
+dependencies = [
+ "typechecks>=0.0.2,<1.0.0",
+ "datacache>=1.4.0,<2.0.0",
+ "memoized-property>=1.0.2",
+ "tinytimer>=0.0.0,<1.0.0",
+ "gtfparse>=2.5.0,<3.0.0",
+ "serializable>=0.2.1,<1.0.0",
+ "numpy>=2.0.0,<3.0.0",
+]
+
+[project.scripts]
+pyensembl = "pyensembl.shell:run"
+
+[project.optional-dependencies]
+dev = [
+ "flake8",
+ "pytest",
+ "pytest-cov",
+ "ruff",
+ "coveralls",
+ "build",
+ "tomli; python_version < '3.11'",
+]
+
+[tool.setuptools]
+packages = ["pyensembl"]
+
+[tool.setuptools.package-data]
+pyensembl = ["logging.conf"]
+
+[tool.setuptools.dynamic]
+version = {attr = "pyensembl.version.__version__"}
=====================================
requirements.txt deleted
=====================================
@@ -1,7 +0,0 @@
-typechecks>=0.0.2,<1.0.0
-datacache>=1.4.0,<2.0.0
-memoized-property>=1.0.2
-tinytimer>=0.0.0,<1.0.0
-gtfparse>=2.5.0,<3.0.0
-serializable>=0.2.1,<1.0.0
-pylint>=2.17.2,<3.0.0
=====================================
setup.py deleted
=====================================
@@ -1,74 +0,0 @@
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from __future__ import print_function
-import os
-import re
-
-# TODO: replace setup.py with pyproject.toml
-from setuptools import setup
-
-package_name = "pyensembl"
-current_directory = os.path.dirname(__file__)
-readme_filename = "README.md"
-readme_path = os.path.join(current_directory, readme_filename)
-github_url = "https://github.com/openvax/%s" % package_name
-
-try:
- with open(readme_path, "r") as f:
- readme_markdown = f.read()
-except IOError as e:
- print(e)
- print("Failed to open %s" % readme_path)
- readme_markdown = ""
-
-
-with open("%s/version.py" % package_name, "r") as f:
- version = re.search(
- r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE
- ).group(1)
-
-if not version:
- raise RuntimeError("Cannot find version information")
-
-if __name__ == "__main__":
- with open("requirements.txt") as f:
- requirements = [l.strip() for l in f]
-
- setup(
- name=package_name,
- version=version,
- description="Python interface to Ensembl reference genome metadata",
- author="Alex Rubinsteyn",
- author_email="alex.rubinsteyn at unc.edu",
- url=github_url,
- license="http://www.apache.org/licenses/LICENSE-2.0.html",
- entry_points={
- "console_scripts": ["pyensembl = %s.shell:run" % package_name],
- },
- classifiers=[
- "Development Status :: 4 - Beta",
- "Environment :: Console",
- "Operating System :: OS Independent",
- "Intended Audience :: Science/Research",
- "License :: OSI Approved :: Apache Software License",
- "Programming Language :: Python",
- "Topic :: Scientific/Engineering :: Bio-Informatics",
- ],
- install_requires=requirements,
- long_description=readme_markdown,
- long_description_content_type="text/markdown",
- packages=[package_name],
- package_data={
- package_name: ["logging.conf", "../requirements.txt"],
- },
- )
=====================================
tests/test_build_system.py
=====================================
@@ -0,0 +1,111 @@
+"""
+Tests for build system configuration and pyproject.toml.
+
+This module verifies that the package build system is properly configured
+with pyproject.toml and that the build process works correctly.
+"""
+
+import subprocess
+import sys
+import os
+from pathlib import Path
+
+
+def test_pyproject_toml_exists():
+ """Test that pyproject.toml exists in the project root."""
+ project_root = Path(__file__).parent.parent
+ pyproject_path = project_root / "pyproject.toml"
+ assert pyproject_path.exists(), "pyproject.toml not found in project root"
+
+
+def test_pyproject_toml_is_valid():
+ """Test that pyproject.toml is valid TOML syntax."""
+ try:
+ import tomllib
+ except ImportError:
+ import tomli as tomllib # Python < 3.11
+
+ project_root = Path(__file__).parent.parent
+ pyproject_path = project_root / "pyproject.toml"
+
+ with open(pyproject_path, "rb") as f:
+ config = tomllib.load(f)
+
+ # Verify required sections exist
+ assert "build-system" in config, "build-system section missing"
+ assert "project" in config, "project section missing"
+
+
+def test_build_system_backend():
+ """Test that build-system uses setuptools backend."""
+ try:
+ import tomllib
+ except ImportError:
+ import tomli as tomllib
+
+ project_root = Path(__file__).parent.parent
+ pyproject_path = project_root / "pyproject.toml"
+
+ with open(pyproject_path, "rb") as f:
+ config = tomllib.load(f)
+
+ assert config["build-system"]["build-backend"] == "setuptools.build_meta"
+
+
+def test_dependencies_correct():
+ """Test that runtime dependencies match specification."""
+ try:
+ import tomllib
+ except ImportError:
+ import tomli as tomllib
+
+ project_root = Path(__file__).parent.parent
+ pyproject_path = project_root / "pyproject.toml"
+
+ with open(pyproject_path, "rb") as f:
+ config = tomllib.load(f)
+
+ expected_deps = {
+ "typechecks>=0.0.2,<1.0.0",
+ "datacache>=1.4.0,<2.0.0",
+ "memoized-property>=1.0.2",
+ "tinytimer>=0.0.0,<1.0.0",
+ "gtfparse>=2.5.0,<3.0.0",
+ "serializable>=0.2.1,<1.0.0",
+ "numpy<2",
+ }
+
+ actual_deps = set(config["project"]["dependencies"])
+
+ assert actual_deps == expected_deps, (
+ f"Dependencies mismatch.\n"
+ f"Expected: {expected_deps}\n"
+ f"Actual: {actual_deps}\n"
+ f"Missing: {expected_deps - actual_deps}\n"
+ f"Extra: {actual_deps - expected_deps}"
+ )
+
+
+def test_no_pylint_in_runtime_deps():
+ """
+ Test that pylint is not in runtime dependencies.
+
+ As per specification, pylint should only be in dev dependencies if at all,
+ not in the main runtime dependencies list.
+ """
+ try:
+ import tomllib
+ except ImportError:
+ import tomli as tomllib
+
+ project_root = Path(__file__).parent.parent
+ pyproject_path = project_root / "pyproject.toml"
+
+ with open(pyproject_path, "rb") as f:
+ config = tomllib.load(f)
+
+ runtime_deps = config["project"]["dependencies"]
+
+ # Check that no dependency starts with "pylint"
+ pylint_deps = [dep for dep in runtime_deps if dep.lower().startswith("pylint")]
+ assert not pylint_deps, f"pylint found in runtime dependencies: {pylint_deps}"
View it on GitLab: https://salsa.debian.org/med-team/pyensembl/-/compare/c96b6bcf6c425ce82219a31db968f96f02218774...7277a088051546b311f1048236627c80935c354a
--
View it on GitLab: https://salsa.debian.org/med-team/pyensembl/-/compare/c96b6bcf6c425ce82219a31db968f96f02218774...7277a088051546b311f1048236627c80935c354a
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/20260404/38c6f0dc/attachment-0001.htm>
More information about the debian-med-commit
mailing list