Skip to content

Commit 9ae0239

Browse files
committed
refactor: update depinfo to version >2
1 parent a2339c5 commit 9ae0239

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

setup.cfg

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parse = (?P<major>\d+)
66
\.(?P<minor>\d+)
77
\.(?P<patch>\d+)
88
(?P<release>[a]*)(?P<num>\d*)
9-
serialize =
9+
serialize =
1010
{major}.{minor}.{patch}{release}{num}
1111
{major}.{minor}.{patch}
1212
tag_name = {new_version}
@@ -15,15 +15,15 @@ tag_name = {new_version}
1515
name = cobra
1616
url = https://opencobra.github.io/cobrapy
1717
download_url = https://pypi.org/project/cobra
18-
project_urls =
18+
project_urls =
1919
Source Code = https://github.com/opencobra/cobrapy
2020
Documentation = https://cobrapy.readthedocs.io
2121
Bug Tracker = https://github.com/opencobra/cobrapy/issues
2222
author = The cobrapy core development team.
2323
author_email = [email protected]
2424
maintainer = Moritz E. Beber
2525
maintainer_email = [email protected]
26-
classifiers =
26+
classifiers =
2727
Development Status :: 5 - Production/Stable
2828
Intended Audience :: Science/Research
2929
License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
@@ -40,7 +40,7 @@ license = LGPL-2.0-or-later OR GPL-2.0-or-later
4040
description = COBRApy is a package for constraint-based modeling of metabolic networks.
4141
long_description = file: README.rst, INSTALL.rst
4242
long_description_content_type = text/x-rst
43-
keywords =
43+
keywords =
4444
metabolism
4545
biology
4646
constraint-based
@@ -52,9 +52,9 @@ keywords =
5252

5353
[options]
5454
zip_safe = True
55-
install_requires =
55+
install_requires =
5656
appdirs ~=1.4
57-
depinfo ~=1.7
57+
depinfo ~=2.2
5858
diskcache ~=5.0
5959
future
6060
httpx ~=0.24
@@ -67,24 +67,24 @@ install_requires =
6767
rich >=8.0
6868
ruamel.yaml ~=0.16
6969
swiglpk
70-
tests_require =
70+
tests_require =
7171
tox
7272
packages = find:
73-
package_dir =
73+
package_dir =
7474
= src
7575

7676
[options.packages.find]
7777
where = src
7878

7979
[options.package_data]
80-
cobra =
80+
cobra =
8181
data/*
8282
io/*.json
8383

8484
[options.extras_require]
85-
array =
85+
array =
8686
scipy
87-
development =
87+
development =
8888
black
8989
bumpversion
9090
isort
@@ -96,7 +96,7 @@ universal = 1
9696
[bumpversion:part:release]
9797
optional_value = placeholder
9898
first_value = placeholder
99-
values =
99+
values =
100100
placeholder
101101
a
102102

src/cobra/util/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import textwrap
44
from typing import Any
55

6-
from depinfo import print_dependencies
6+
from depinfo.application import DisplayApplication
77

88

99
def format_long_string(string: str, max_length: int = 50) -> str:
@@ -59,4 +59,4 @@ def __getitem__(self, item: Any) -> Any:
5959

6060
def show_versions() -> None:
6161
"""Print dependency information."""
62-
print_dependencies("cobra")
62+
DisplayApplication.run("cobra")

tests/test_util/test_util.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ def test_show_versions(capsys) -> None:
3939
show_versions()
4040
captured = capsys.readouterr()
4141
lines = captured.out.split("\n")
42-
assert lines[1].startswith("System Information")
43-
assert lines[2].startswith("==================")
44-
assert lines[3].startswith("OS")
45-
assert lines[4].startswith("OS-release")
46-
assert lines[5].startswith("Python")
47-
48-
assert lines[7].startswith("Package Versions")
49-
assert lines[8].startswith("================")
42+
assert lines[1].startswith("Package Information")
43+
assert lines[2].startswith("------------------")
44+
assert lines[3].startswith("cobra")
45+
46+
assert lines[5].startswith("Dependency Information")
47+
assert lines[6].startswith("------------------")

0 commit comments

Comments
 (0)