Skip to content

Commit 47451e5

Browse files
committed
Bump version to 4.0.0
1 parent 5661b7e commit 47451e5

File tree

3 files changed

+10
-25
lines changed

3 files changed

+10
-25
lines changed

pyproject.toml

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ requires-python = "<3.12.*,>=3.9.0"
1313
scripts = {vamb = "vamb.__main__:main"}
1414

1515
[metadata]
16-
authors = [{name="Pau Piera", email="[email protected]"}, {name="Jakob Nybo Nissen", email="[email protected]"}]
16+
authors = [
17+
{name="Jakob Nybo Nissen", email="[email protected]"},
18+
{name="Pau Piera", email="[email protected]"},
19+
{name="Simon Rasmussen", email="[email protected]"}
20+
]
1721
url = "https://github.com/RasmussenLab/vamb"
1822
description = "Variational and Adversarial autoencoders for Metagenomic Binning"
1923
license = "MIT"
2024
[tool.setuptools.dynamic]
2125
version = {attr = "vamb.__version__"}
26+
readme = {file = "README.md"}
2227

2328
[build-system]
2429
requires = ["setuptools ~= 63.0", "Cython ~= 0.29"]

test/ci.py

+3-16
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def validate_init(init):
4747
isinstance(init, tuple)
4848
and len(init) in (3, 4)
4949
and all(isinstance(i, int) for i in init[:3])
50-
and (len(init) == 3 or init[3] == "DEV")
5150
):
5251
raise ValueError("Wrong format of __version__ in __init__.py")
5352

@@ -74,31 +73,20 @@ def head_git_tag():
7473
m = regex.match(st)
7574
if m is None:
7675
raise ValueError("HEADs git tag is not a valid version number")
77-
vnum = tuple(int(i) for i in m.groups()[1:4])
78-
tagname = m.groups()[0]
79-
80-
# Check it's annotated if it exists - then returncode is 0
81-
proc = subprocess.run(["git", "describe", tagname])
82-
is_annotated = proc.returncode == 0
83-
return (vnum, is_annotated)
76+
return tuple(int(i) for i in m.groups()[1:4])
8477

8578

8679
class TestVersions(unittest.TestCase):
8780
@classmethod
8881
def setUpClass(cls):
89-
cls.v_snakemake_readme = readme_vamb_version("../workflow/README.md")
9082
validate_init(vamb.__version__)
9183
cls.v_init = vamb.__version__
9284
cls.v_changelog = changelog_version("../CHANGELOG.md")
9385
cls.last_tag = latest_git_tag()
94-
head_tag, is_annotated = head_git_tag()
86+
head_tag = head_git_tag()
9587
cls.head_tag = head_tag
96-
cls.is_annotated = is_annotated
9788

9889
def test_same_versions(self):
99-
# envs/vamb version, versions in README and last tag must all point to the latest release
100-
self.assertEqual(self.last_tag, self.v_snakemake_readme)
101-
10290
# The version in the changelog must fit the one in __init__
10391
self.assertEqual(self.v_init, self.v_changelog)
10492

@@ -107,9 +95,8 @@ def test_dev_version(self):
10795
# than the latest release.
10896
# If not, it must be the same version as the tag of the current commit,
10997
# i.e. the current commit must be a release version.
110-
if self.v_init[-1] == "DEV":
98+
if len(self.v_init) > 3:
11199
self.assertGreater(self.v_init[:3], self.last_tag)
112100
else:
113101
self.assertEqual(self.v_init, self.head_tag)
114102
self.assertEqual(self.v_init[:3], self.last_tag)
115-
self.assertTrue(self.is_annotated)

vamb/__init__.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,7 @@
1919
7) Split bins using vamb.vambtools
2020
"""
2121

22-
__authors__ = "Jakob Nybo Nissen", "Simon Rasmussen"
23-
__licence__ = "MIT"
24-
__version__ = (4, 0, 0, "DEV")
25-
26-
import sys as _sys
27-
28-
if _sys.version_info[:2] < (3, 9):
29-
raise ImportError("Python version must be >= 3.9")
22+
__version__ = (4, 0, 0)
3023

3124
from . import vambtools
3225
from . import parsebam

0 commit comments

Comments
 (0)