Skip to content

Commit 33cc3ac

Browse files
only use one version in __init__.py (#16)
1 parent 3259cdd commit 33cc3ac

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.bumpversion.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ commit = True
33
tag = True
44
current_version = 0.0.16
55

6-
[bumpversion:file:setup.py]
7-
search = version="{current_version}"
8-
replace = version="{new_version}"
6+
[bumpversion:file:nowcasting_forecast/__init__.py]
7+
search = __version__ = "{current_version}"
8+
replace = __version__ = "{new_version}"

pvnet/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""PVNet"""
2-
__version__ = "0.0.8"
2+
__version__ = "0.0.16"

setup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@
99
install_requires = (this_directory / "requirements.txt").read_text().splitlines()
1010
extras_require = {"all_models": ["pytorch-tabnet", "efficientnet_pytorch"]}
1111

12+
with open("pvnet/__init__.py") as f:
13+
for line in f:
14+
if line.startswith("__version__"):
15+
_, _, version = line.replace("'", "").split()
16+
version = version.replace('"', "")
17+
18+
1219
setup(
1320
name="PVNet",
14-
version="0.0.16",
21+
version=version,
1522
license="MIT",
1623
description="PVNet",
1724
author="Peter Dudfield",

0 commit comments

Comments
 (0)