Skip to content

Commit 5608f6e

Browse files
committed
versioning updates
1 parent 4287aeb commit 5608f6e

7 files changed

Lines changed: 30 additions & 21 deletions

File tree

.zenodo.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "Python client for HAPI",
33
"license": "other-open",
44
"title": "hapi-server/client-python:",
5-
"version": "v0.2.1",
5+
"version": "0.2.8b1",
66
"upload_type": "software",
77
"publication_date": "2021-10-06",
88
"creators": [
@@ -13,11 +13,6 @@
1313
],
1414
"access_right": "open",
1515
"related_identifiers": [
16-
{
17-
"scheme": "url",
18-
"identifier": "https://github.com/hapi-server/client-python/tree/v0.2.1",
19-
"relation": "isSupplementTo"
20-
},
2116
{
2217
"scheme": "doi",
2318
"identifier": "10.5281/zenodo.5553155",

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,6 @@ v0.2.7b1:
112112
v0.2.7:
113113
2026-05-02 -- Support for Python 2.7 dropped. This is last release with support for 3.5 through 3.8.
114114
v0.2.8b0:
115+
2026-05-02 -- Documentation
116+
v0.2.8b1:
117+
2026-05-02 -- Versioning updates

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ PYTHONVERS=python3.14 python3.13 python3.12 python3.11 python3.10 python3.9 pyth
5050

5151
# VERSION is updated in "make version-update" step and derived
5252
# from CHANGES.txt. Do not edit.
53-
VERSION=0.2.8b0
53+
VERSION=0.2.8b1
5454
SHELL:= /bin/bash
5555

5656
LONG_TESTS=false

hapiclient/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Allow "from hapiclient import HAPIError"
1111
from hapiclient.util import HAPIError
1212

13-
__version__ = '0.2.8b0'
13+
__version__ = '0.2.8b1'
1414

1515
import sys
1616
import platform

hapiclient/hapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def hapiopts():
177177
def hapi(*args, **kwargs):
178178
"""Request data from a HAPI server.
179179
180-
Version: 0.2.8b0
180+
Version: 0.2.8b1
181181
182182
183183
Examples

misc/version.py

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,27 @@
2323
version = version.rstrip()
2424
print("Using version = " + version)
2525

26-
fnames = ["Makefile", "setup.py", "hapiclient/hapi.py", "hapiclient/__init__.py"]
27-
regexes = ["VERSION=(.*)", "version=(.*)", "Version: (.*)", "__version__ = (.*)"]
28-
replaces = ["VERSION=" + version, "version='" + version + "',", "Version: " + version, "__version__ = '" + version + "'"]
29-
for i in range(len(fnames)):
26+
fnames = {
27+
"Makefile": r"^(VERSION=)(.*)$",
28+
"setup.py": r"^(\s*version=')(.*)(',\s*)$",
29+
"hapiclient/hapi.py": r"^(\s*Version: )(.*)$",
30+
"hapiclient/__init__.py": r"^(__version__ = ')(.*)('$)",
31+
".zenodo.json": r'^(\s*"version": ")(.*)(",?\s*)$'
32+
}
33+
34+
def replace_version(match):
35+
prefix = match.group(1)
36+
suffix = match.group(3) if match.lastindex == 3 else ''
37+
return prefix + version + suffix
38+
39+
40+
for fname, regex in fnames.items():
3041
updated = False
3142
lines = ''
32-
fin = open(fnames[i])
33-
print("Scanning " + fnames[i])
43+
fin = open(fname)
44+
print("Scanning " + fname)
3445
for lineo in fin:
35-
line1 = re.sub(regexes[i], replaces[i], lineo)
46+
line1 = re.sub(regex, replace_version, lineo)
3647
if lineo != line1:
3748
print("Original: " + lineo.rstrip())
3849
print("Modified: " + line1.rstrip())
@@ -44,10 +55,10 @@
4455
print(" Version in file was already up-to-date.")
4556
continue
4657

47-
with open(fnames[i] + ".tmp", "w") as fout:
58+
with open(fname + ".tmp", "w") as fout:
4859
fout.write(lines)
49-
print("Wrote " + fnames[i] + ".tmp")
60+
print("Wrote " + fname + ".tmp")
5061

5162
if overwrite:
52-
os.rename(fnames[i] + ".tmp", fnames[i])
53-
print(" Renamed " + fnames[i] + ".tmp" + " to " + fnames[i])
63+
os.rename(fname + ".tmp", fname)
64+
print(" Renamed " + fname + ".tmp" + " to " + fname)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# version is modified by misc/version.py (executed from Makefile). Do not edit.
3333
setup(
3434
name='hapiclient',
35-
version='0.2.8b0',
35+
version='0.2.8b1',
3636
author='Bob Weigel',
3737
author_email='rweigel@gmu.edu',
3838
packages=find_packages(),

0 commit comments

Comments
 (0)