Skip to content

Commit 054966e

Browse files
authored
upgrade dependencies and support more modern python versions (#32)
no feature change, but just upgrading deps and supports py39 to py13 instead of current py37 to py39. resolves #31 increment major version to 3 --------- Co-authored-by: Zhuyi Xue <[email protected]>
1 parent 4fe3d2c commit 054966e

File tree

10 files changed

+584
-567
lines changed

10 files changed

+584
-567
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-22.04
1616
strategy:
1717
matrix:
18-
python-version: ["3.7", "3.8", "3.9"]
18+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1919

2020
steps:
2121
- uses: actions/checkout@v2
@@ -25,7 +25,7 @@ jobs:
2525
python-version: ${{ matrix.python-version }}
2626
- name: Install dependencies
2727
run: |
28-
python -m pip install --upgrade pip poetry
28+
python -m pip install --upgrade pip poetry==1.8.5
2929
poetry install
3030
- name: Lint
3131
run: |

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ test: FORCE
2929

3030
lint: black isort mypy pylint
3131

32-
all: lint pytest
32+
all: lint test

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ is like
1212

1313
### Install
1414

15-
ncbitax2lin supports python-3.7, python-3.8, and python-3.9.
15+
ncbitax2lin supports python-3.9 to python-3.13.
1616

1717
```
1818
pip install -U ncbitax2lin
@@ -72,8 +72,7 @@ of a different timestamp.
7272
### Install dependencies
7373

7474
```
75-
poetry shell
76-
poetry install
75+
poetry install --sync
7776
```
7877

7978
### Testing

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[mypy]
2-
python_version = 3.7
2+
python_version = 3.9
33
disallow_untyped_defs = True
44
ignore_missing_imports = True
55
show_column_numbers = True

ncbitax2lin/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def timed_func(*args: Any, **kwargs: Any) -> Any:
2121
"""Returns the timed function"""
2222
start_time = time.time()
2323
result = func(*args, **kwargs)
24-
elapsed_time = datetime.timedelta(seconds=(time.time() - start_time))
24+
elapsed_time = datetime.timedelta(seconds=time.time() - start_time)
2525
_LOGGER.info("time spent on %s: %s", func.__name__, elapsed_time)
2626
return result
2727

poetry.lock

Lines changed: 562 additions & 545 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[MESSAGES CONTROL]
2-
disable=bad-continuation, fixme, duplicate-code
2+
disable=fixme, duplicate-code

pyproject.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
[tool.poetry]
22
name = "ncbitax2lin"
3-
version = "2.4.1"
3+
version = "3.0.0"
44
description = "A tool that converts NCBI taxonomy dump into lineages"
55
authors = ["Zhuyi Xue <[email protected]>"]
66
readme = "README.md"
77
homepage = "https://github.com/zyxue/ncbitax2lin"
88
license = "MIT"
99

1010
[tool.poetry.dependencies]
11-
fire = "^0.3.1"
12-
pandas = "^1.0.3"
13-
python = "^3.7,<3.10"
14-
typing-extensions = "^3.7.4"
11+
fire = "^0.7.1"
12+
pandas = "^2.3.2"
13+
python = "^3.9,<3.14"
14+
typing-extensions = "^4.15.0"
1515

1616
[tool.poetry.dev-dependencies]
1717
autoflake = "^1.3.1"
1818
black = "^22.1.0"
19-
coverage = "^5.4"
19+
coverage = "^7.5.4"
2020
isort = "^5.7.0"
21-
mypy = "^0.941"
22-
pylint = "^2.5.0"
23-
pytest = "^5.2"
21+
mypy = "^1.18.2"
22+
pylint = "^3.3.8"
23+
pytest = "^8.4.2"
2424
pytest-parallel = "^0.1.0"
2525
tox = "^3.21.4"
2626

tests/test_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""tests for utils.py"""
2+
23
# pylint: disable=protected-access, missing-function-docstring
34

45
import os
@@ -28,7 +29,7 @@ def test_maybe_backup_file_when_file_path_exists(
2829
utils.maybe_backup_file(test_input)
2930
expected = "#some_existing_file.1#"
3031

31-
assert mock_exists.has_calls(call(test_input), call(expected))
32+
mock_exists.assert_has_calls([call(test_input), call(expected)])
3233
mock_rename.assert_called_once_with(test_input, expected)
3334

3435

@@ -44,8 +45,8 @@ def test_maybe_backup_file_when_backfile_also_exists(
4445
utils.maybe_backup_file(test_input)
4546
expected = "#some_existing_file.2#"
4647

47-
assert mock_exists.has_calls(
48-
call(test_input), call(intermediary_input), call(expected)
48+
mock_exists.assert_has_calls(
49+
[call(test_input), call(intermediary_input), call(expected)]
4950
)
5051
mock_rename.assert_called_once_with(test_input, expected)
5152

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
isolated_build = True
3-
envlist = py37,py38,py39
3+
envlist = py39,py310,py311,py312,py313
44

55
[testenv]
66
allowlist_externals =

0 commit comments

Comments
 (0)