Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.14']
python-version: ['3.10', '3.14']
steps:
- uses: actions/checkout@v5
with:
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,86 +31,86 @@ jobs:
matrix:
include:
- os: ubuntu-latest
tox_env: py39
tox_env: py310
galaxy_version: dev
galaxy_python_version: '3.9'
- os: ubuntu-latest
tox_env: py39
tox_env: py310
galaxy_version: release_25.1
galaxy_python_version: '3.9'
- os: ubuntu-latest
tox_env: py39
tox_env: py310
galaxy_version: release_25.0
galaxy_python_version: '3.9'
- os: ubuntu-latest
tox_env: py39
tox_env: py310
galaxy_version: release_24.2
galaxy_python_version: '3.8'
- os: ubuntu-latest
tox_env: py39
tox_env: py310
galaxy_version: release_24.1
galaxy_python_version: '3.8'
- os: ubuntu-latest
tox_env: py39
tox_env: py310
galaxy_version: release_24.0
galaxy_python_version: '3.8'
# Python 3.7 is not available via setup-python on ubuntu >=24.04
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_23.2
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_23.1
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_23.0
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_22.05
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_22.01
galaxy_python_version: '3.7'
# The minimum Python supported version by the following releases is
# 3.6, but it is EOL
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_21.09
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_21.05
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_21.01
galaxy_python_version: '3.7'
# The minimum Python supported version by the following releases is
# 3.5, but it is EOL
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_20.09
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_20.05
galaxy_python_version: '3.7'
# The minimum Python supported version by the following releases is
# 2.7, but it is EOL
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_20.01
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_19.09
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py39
tox_env: py310
galaxy_version: release_19.05
galaxy_python_version: '3.7'
- os: ubuntu-latest
Expand All @@ -120,7 +120,7 @@ jobs:
# Cannot test on macOS because service containers are not supported
# yet: https://github.community/t/github-actions-services-available-on-others-vms/16916
# - os: macos-latest
# tox_env: py39
# tox_env: py310
# galaxy_version: dev
# galaxy_python_version: '3.8'
steps:
Expand Down
2 changes: 1 addition & 1 deletion ABOUT.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ interacting with the `Galaxy`_ API.

BioBlend is supported and tested on:

- Python 3.9 - 3.14
- Python 3.10 - 3.14
- Galaxy release 19.05 and later.

BioBlend's goal is to make it easier to script and automate the running of
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## BioBlend v

* Dropped support for Python 3.9.

## BioBlend v1.7.0 - 2025-11-07

* Deprecation: this is the last release to support end-of-life Python 3.9.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ How to run BioBlend tests

1. Clone Galaxy to a directory outside of BioBlend source directory via `git clone https://github.com/galaxyproject/galaxy.git`

2. Change directory to your BioBlend source and run the tests via `./run_bioblend_tests.sh -g GALAXY_PATH [-r GALAXY_REV] [-e TOX_ENV]` where `GALAXY_PATH` is the directory where the galaxy repository was cloned, `GALAXY_REV` is the branch or commit of Galaxy that you would like to test against (if different from the current state of your galaxy clone), and `TOX_ENV` is used to specify the Python version to use for BioBlend, e.g. `py39` for Python 3.9.
2. Change directory to your BioBlend source and run the tests via `./run_bioblend_tests.sh -g GALAXY_PATH [-r GALAXY_REV] [-e TOX_ENV]` where `GALAXY_PATH` is the directory where the galaxy repository was cloned, `GALAXY_REV` is the branch or commit of Galaxy that you would like to test against (if different from the current state of your galaxy clone), and `TOX_ENV` is used to specify the Python version to use for BioBlend, e.g. `py310` for Python 3.10.

You can also add `2>&1 | tee log.txt` to the command above to contemporarily view the test output and save it to the `log.txt` file.

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BioBlend is a Python library for interacting with the `Galaxy`_ API.

BioBlend is supported and tested on:

- Python 3.9 - 3.14
- Python 3.10 - 3.14
- Galaxy release 19.05 and later.

Full docs are available at https://bioblend.readthedocs.io/ with a quick library
Expand Down
10 changes: 4 additions & 6 deletions bioblend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
import logging.config
import os
import time
from collections.abc import Callable
from typing import (
Callable,
Optional,
TypeVar,
Union,
)

from bioblend.config import (
Expand Down Expand Up @@ -68,7 +66,7 @@ def emit(self, record: logging.LogRecord) -> None:


def set_file_logger(
name: str, filepath: str, level: Union[int, str] = logging.INFO, format_string: Optional[str] = None
name: str, filepath: str, level: int | str = logging.INFO, format_string: str | None = None
) -> None:
global log
if not format_string:
Expand All @@ -83,7 +81,7 @@ def set_file_logger(
log = logger


def set_stream_logger(name: str, level: Union[int, str] = logging.DEBUG, format_string: Optional[str] = None) -> None:
def set_stream_logger(name: str, level: int | str = logging.DEBUG, format_string: str | None = None) -> None:
global log
if not format_string:
format_string = default_format_string
Expand All @@ -107,7 +105,7 @@ class ConnectionError(Exception):
"""

def __init__( # noqa: B042 # https://github.com/PyCQA/flake8-bugbear/issues/525
self, message: str, body: Optional[Union[bytes, str]] = None, status_code: Optional[int] = None
self, message: str, body: bytes | str | None = None, status_code: int | None = None
) -> None:
super().__init__(message)
self.body = body
Expand Down
3 changes: 1 addition & 2 deletions bioblend/_tests/TestGalaxyDatasetCollections.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from inspect import signature
from typing import (
Any,
Union,
)
from zipfile import ZipFile

Expand Down Expand Up @@ -166,7 +165,7 @@ def test_download_dataset_collection(self):
os.mkdir(extract_dir_path)

if archive_type == "zip":
archive: Union[ZipFile, tarfile.TarFile] = ZipFile(archive_path)
archive: ZipFile | tarfile.TarFile = ZipFile(archive_path)
elif archive_type == "tgz":
archive = tarfile.open(archive_path)

Expand Down
7 changes: 3 additions & 4 deletions bioblend/_tests/TestGalaxyObjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
import unittest
import uuid
from collections.abc import (
Callable,
Collection,
Iterable,
)
from ssl import SSLError
from typing import (
Any,
Callable,
Literal,
Union,
)
from urllib.error import URLError
from urllib.request import urlopen
Expand Down Expand Up @@ -128,7 +127,7 @@ def is_reachable(url: str) -> bool:
res = None
try:
res = urlopen(url, timeout=5)
except (SSLError, URLError, socket.timeout):
except (SSLError, URLError, TimeoutError):
return False
if res is not None:
res.close()
Expand Down Expand Up @@ -990,7 +989,7 @@ def tearDown(self):
def _test(self, existing_hist: bool = False, pass_params: bool = False) -> None:
hist_name = f"test_{uuid.uuid4().hex}"
if existing_hist:
hist: Union[str, wrappers.History] = self.gi.histories.create(hist_name)
hist: str | wrappers.History = self.gi.histories.create(hist_name)
else:
hist = hist_name
if pass_params:
Expand Down
3 changes: 1 addition & 2 deletions bioblend/_tests/TestGalaxyWorkflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from typing import (
Any,
Literal,
Optional,
)

import pytest
Expand Down Expand Up @@ -155,7 +154,7 @@ def test_import_other_users_published_workflow(self) -> None:
assert not imported_wf_by_new_user["deleted"]
assert not imported_wf_by_new_user["published"]

def _import_export(self, style: Optional[Literal["ga", "format2"]] = None):
def _import_export(self, style: Literal["ga", "format2"] | None = None):
path = test_util.get_abspath(os.path.join("data", "paste_columns.ga"))
with open(path) as f:
wf_dict = json.load(f)
Expand Down
1 change: 0 additions & 1 deletion bioblend/_tests/TestToolshed.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import unittest

import bioblend
import bioblend.toolshed
from . import test_util

Expand Down
3 changes: 1 addition & 2 deletions bioblend/_tests/pytest_galaxy_test_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import sys
from typing import (
NoReturn,
Optional,
)

try:
Expand All @@ -28,7 +27,7 @@
]


def main(args: Optional[list[str]] = None) -> NoReturn:
def main(args: list[str] | None = None) -> NoReturn:
"""Entry point that delegates to pytest.main."""
if pytest is None:
raise Exception("pytest is required to use this script.")
Expand Down
9 changes: 3 additions & 6 deletions bioblend/_tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
import random
import string
import unittest
from typing import (
Any,
Callable,
Optional,
)
from collections.abc import Callable
from typing import Any

import requests

Expand Down Expand Up @@ -43,7 +40,7 @@ def skip_unless_toolshed() -> Callable:
return lambda f: f


def skip_unless_galaxy(min_release: Optional[str] = None) -> Callable:
def skip_unless_galaxy(min_release: str | None = None) -> Callable:
"""Decorate tests with this to skip the test if Galaxy is not
configured.
"""
Expand Down
3 changes: 1 addition & 2 deletions bioblend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
from typing import (
IO,
Optional,
)

BioBlendConfigPath = "/etc/bioblend.cfg"
Expand All @@ -21,7 +20,7 @@ class Config(configparser.ConfigParser):
* Individual user: ``~/.bioblend`` (which works on both Windows and Unix)
"""

def __init__(self, path: Optional[str] = None, fp: Optional[IO[str]] = None, do_load: bool = True) -> None:
def __init__(self, path: str | None = None, fp: IO[str] | None = None, do_load: bool = True) -> None:
super().__init__({"working_dir": "/mnt/pyami", "debug": "0"})
if do_load:
if path:
Expand Down
12 changes: 5 additions & 7 deletions bioblend/galaxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
A base representation of an instance of Galaxy
"""

from typing import Optional

from bioblend.galaxy import (
config,
container_resolution,
Expand Down Expand Up @@ -36,13 +34,13 @@ class GalaxyInstance(GalaxyClient):
def __init__(
self,
url: str,
key: Optional[str] = None,
email: Optional[str] = None,
password: Optional[str] = None,
key: str | None = None,
email: str | None = None,
password: str | None = None,
*,
token: Optional[str] = None,
token: str | None = None,
verify: bool = True,
user_agent: Optional[str] = None,
user_agent: str | None = None,
) -> None:
"""
A base representation of a connection to a Galaxy instance, identified
Expand Down
Loading