Skip to content

Commit b863001

Browse files
authored
Merge pull request #445 from biothings/1.1.x
Release v1.1.0
2 parents 2eeb86e + 572048f commit b863001

79 files changed

Lines changed: 1994 additions & 819 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pypi-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
runs-on: ubuntu-latest
2222

2323
steps:
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v5
2525
- name: Set up Python
26-
uses: actions/setup-python@v4
26+
uses: actions/setup-python@v6
2727
with:
2828
python-version: '3.x'
2929
- name: Install dependencies

.github/workflows/run-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ on:
55
pull_request:
66
branches:
77
- master
8-
- 1.0.x
8+
- 1.1.x
99

1010
jobs:
1111
install_and_run_tests:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
16+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14t']
1717

1818
services:
1919
# mongo:
@@ -41,9 +41,9 @@ jobs:
4141
4242
steps:
4343
- name: Checkout source
44-
uses: actions/checkout@v4
44+
uses: actions/checkout@v5
4545
- name: Set up Python ${{ matrix.python-version }}
46-
uses: actions/setup-python@v5
46+
uses: actions/setup-python@v6
4747
with:
4848
python-version: ${{ matrix.python-version }}
4949
- name: Install dependencies

.github/workflows/test-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
14+
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13', '3.14t' ]
1515
steps:
1616
- name: Checkout source
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v5
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
19+
uses: actions/setup-python@v6
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Install dependencies

CHANGES.txt

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,67 @@
11

2+
v1.1.0 (2026/05/27)
3+
Highlights:
4+
- Added Python 3.14 support and dropped Python 3.8 support.
5+
- Reworked biothings CLI configuration, pathing, and dataplugin command organization.
6+
- Added MongoDB build cleanup management APIs and commands.
7+
8+
biothings.hub improvements:
9+
- Added prefix support to DataTransformMDB. ([#411](https://github.com/biothings/biothings.api/pull/411))
10+
- Added TAR and Zstandard file handling. ([#424](https://github.com/biothings/biothings.api/pull/424), [#428](https://github.com/biothings/biothings.api/pull/428))
11+
- Added support for custom local uploader and dumper classes in dataplugin manifests. ([#431](https://github.com/biothings/biothings.api/pull/431))
12+
- Added MongoDB build cleanup validation and deletion tooling. ([#437](https://github.com/biothings/biothings.api/pull/437))
13+
14+
biothings.utils improvements:
15+
- Fixed dict_sweep handling for NaN-like values, including pandas.NA and pandas.NaT. ([#442](https://github.com/biothings/biothings.api/pull/442))
16+
- Centralized orjson usage across the library. ([#435](https://github.com/biothings/biothings.api/pull/435))
17+
18+
biothings.web improvements:
19+
- Removed deprecated Google Analytics event support. ([#439](https://github.com/biothings/biothings.api/pull/439))
20+
- Removed old doc_type and deprecated Elasticsearch compatibility code.
21+
- Improved Elasticsearch exception handling and query response behavior.
22+
- Optimized Elasticsearch memory usage when using scroll API.
23+
24+
biothings.cli improvements:
25+
- Added CLI config and pathing commands. ([#418](https://github.com/biothings/biothings.api/pull/418), [#422](https://github.com/biothings/biothings.api/pull/422))
26+
- Added CLI dump mark-success support. ([#423](https://github.com/biothings/biothings.api/pull/423))
27+
- Fixed Typer/rich_utils loading behavior. ([#426](https://github.com/biothings/biothings.api/pull/426))
28+
29+
Misc improvements:
30+
- Updated dependencies and package metadata for Python 3.9+, including tornado, typer, pymongo, orjson, and zstandard.
31+
- Updated GitHub Actions test, build, and publish workflows.
32+
33+
34+
v1.1.0 (2026/05/27)
35+
Highlights:
36+
- Added Python 3.14 support and dropped Python 3.8 support.
37+
- Reworked biothings CLI configuration, pathing, and dataplugin command organization.
38+
- Added MongoDB build cleanup management APIs and commands.
39+
40+
biothings.hub improvements:
41+
- Added prefix support to DataTransformMDB. ([#411](https://github.com/biothings/biothings.api/pull/411))
42+
- Added TAR and Zstandard file handling. ([#424](https://github.com/biothings/biothings.api/pull/424), [#428](https://github.com/biothings/biothings.api/pull/428))
43+
- Added support for custom local uploader and dumper classes in dataplugin manifests. ([#431](https://github.com/biothings/biothings.api/pull/431))
44+
- Added MongoDB build cleanup validation and deletion tooling. ([#437](https://github.com/biothings/biothings.api/pull/437))
45+
46+
biothings.utils improvements:
47+
- Fixed dict_sweep handling for NaN-like values, including pandas.NA and pandas.NaT. ([#442](https://github.com/biothings/biothings.api/pull/442))
48+
- Centralized orjson usage across the library. ([#435](https://github.com/biothings/biothings.api/pull/435))
49+
50+
biothings.web improvements:
51+
- Removed deprecated Google Analytics event support. ([#439](https://github.com/biothings/biothings.api/pull/439))
52+
- Removed old doc_type and deprecated Elasticsearch compatibility code.
53+
- Improved Elasticsearch exception handling and query response behavior.
54+
- Optimized Elasticsearch memory usage when using scroll API.
55+
56+
biothings.cli improvements:
57+
- Added CLI config and pathing commands. ([#418](https://github.com/biothings/biothings.api/pull/418), [#422](https://github.com/biothings/biothings.api/pull/422))
58+
- Added CLI dump mark-success support. ([#423](https://github.com/biothings/biothings.api/pull/423))
59+
- Fixed Typer/rich_utils loading behavior. ([#426](https://github.com/biothings/biothings.api/pull/426))
60+
61+
Misc improvements:
62+
- Updated dependencies and package metadata for Python 3.9+, including tornado, typer, pymongo, orjson, and zstandard.
63+
- Updated GitHub Actions test, build, and publish workflows.
64+
265
v1.0.2 (2025/10/15)
366
Bugfix:
467
- Fixed an import issue in inspector.py that was causing the mapping inspect to fail.

biothings/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class _version_info(NamedTuple):
88
micro: int
99

1010

11-
version_info = _version_info(1, 0, 2)
11+
version_info = _version_info(1, 1, 0)
1212
__version__ = ".".join(map(str, version_info))
1313

1414

biothings/cli/__init__.py

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,41 @@
22
Entrypoint for the biothings-cli tool
33
"""
44

5+
from typing import Literal
56
import importlib.util
67
import logging
78
import os
89
import sys
910

11+
import typer
12+
from rich.logging import RichHandler
1013

11-
from biothings.cli.settings import (
12-
setup_biothings_configuration,
13-
setup_commandline_configuration,
14-
setup_logging_configuration,
15-
)
14+
from biothings.cli.commands.admin import build_admin_application
15+
from biothings.cli.commands.config import config_application, load_configuration
16+
from biothings.cli.commands.dataplugin import dataplugin_application
17+
from biothings.cli.commands.pathing import path_application
1618

1719

18-
def check_module_import_status(module: str) -> bool:
20+
def setup_logging_configuration(logging_level: Literal[10, 20, 30, 40, 50]) -> None:
1921
"""
20-
Verify that we can import a module prior to proceeding with creating our commandline
21-
tooling that depends on those modules
22+
Configures the logging based off our environment configuration
2223
"""
23-
module_specification = importlib.util.find_spec(module)
24-
status = module_specification is not None
25-
return status
24+
rich_handler = RichHandler(
25+
level=logging_level,
26+
markup=True,
27+
rich_tracebacks=False, # typer creates it already
28+
show_path=False,
29+
tracebacks_suppress=[typer],
30+
)
31+
logging.basicConfig(level=logging_level, format="%(message)s", datefmt="[%X]", handlers=[rich_handler])
2632

2733

2834
def main():
2935
"""
30-
The entrypoint for running the BioThings CLI to test your local data plugin
36+
The entrypoint for running the BioThings CLI
3137
"""
32-
typer_status = check_module_import_status("typer")
38+
module_specification = importlib.util.find_spec("typer")
39+
typer_status = module_specification is not None
3340
if not typer_status:
3441
logging.error(
3542
(
@@ -48,14 +55,14 @@ def main():
4855
cli_debug_flag = os.environ.get("BTCLI_DEBUG", False)
4956
cli_rich_traceback_flag = os.environ.get("BTCLI_RICH_TRACEBACK", False)
5057

51-
cli = setup_commandline_configuration(debug=cli_debug_flag, rich_traceback=cli_rich_traceback_flag)
58+
admin_application = build_admin_application(debug=cli_debug_flag, rich_traceback=cli_rich_traceback_flag)
5259
logging_level = logging.WARNING
5360
if cli_debug_flag:
5461
logging_level = logging.DEBUG
5562
setup_logging_configuration(logging_level)
56-
setup_biothings_configuration()
63+
load_configuration()
5764

58-
from biothings.cli.dataplugin import dataplugin_application
59-
60-
cli.add_typer(dataplugin_application, name="dataplugin")
61-
return cli()
65+
admin_application.add_typer(dataplugin_application, name="dataplugin")
66+
admin_application.add_typer(config_application, name="config")
67+
admin_application.add_typer(path_application, name="path")
68+
return admin_application()

biothings/cli/assistant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class CLIAssistant(BaseAssistant):
3838

3939
plugin_type = "CLI"
4040

41-
def __init__(self, plugin_name: Optional[str] = None, job_manager: "JobManager" = None):
41+
def __init__(self, plugin_name: Optional[str] = None, job_manager: CLIJobManager = None):
4242
from biothings import config
4343
from biothings.hub.databuild.builder import BuilderManager
4444
from biothings.hub.dataindex.indexer import IndexManager

biothings/cli/commands/__init__.py

Whitespace-only changes.

biothings/cli/commands/admin.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
"""
2+
Configuration settings for the biothings-cli tool
3+
4+
> Logging
5+
> Tool Configuration
6+
> Creates a mock config used in the biothings.api backend
7+
"""
8+
9+
import sys
10+
11+
import typer
12+
import typer.rich_utils
13+
14+
15+
def build_admin_application(debug: bool, rich_traceback: bool) -> typer.Typer:
16+
"""
17+
Builds the main administrative command line application for the
18+
biothings-cli application
19+
"""
20+
pretty_exceptions_show_locals = False
21+
pretty_exceptions_enable = False
22+
sys.tracebacklimit = 1
23+
24+
if rich_traceback:
25+
pretty_exceptions_enable = True
26+
sys.tracebacklimit = 1000
27+
28+
if debug:
29+
pretty_exceptions_enable = True
30+
pretty_exceptions_show_locals = True
31+
sys.tracebacklimit = 1000
32+
33+
# prevent dimming the help text from the 2nd line
34+
# see: https://github.com/tiangolo/typer/issues/437#issuecomment-1224149402
35+
typer.rich_utils.STYLE_HELPTEXT = ""
36+
37+
context_settings = {"help_option_names": ["-h", "--help"]}
38+
typer_instance = typer.Typer(
39+
help="[green]BioThings Admin CLI to test your local data plugins. See helps for each command for specific usage.[/green]",
40+
rich_help_panel="Help and Others",
41+
rich_markup_mode="rich",
42+
context_settings=context_settings,
43+
no_args_is_help=True,
44+
pretty_exceptions_show_locals=pretty_exceptions_show_locals,
45+
pretty_exceptions_enable=pretty_exceptions_enable,
46+
)
47+
48+
return typer_instance

0 commit comments

Comments
 (0)