Skip to content

Commit 70e8654

Browse files
authored
Merge pull request #29 from xsuite/release/v0.3.6
Release 0.3.6
2 parents d3c1a82 + a183aed commit 70e8654

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "xaux"
3-
version = "0.3.5"
3+
version = "0.3.6"
44
description = "Support tools for Xsuite packages"
55
authors = ["Frederik F. Van der Veken <[email protected]>",
66
"Thomas Pugnat <[email protected]>",

tests/test_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
from xaux import __version__
77

88
def test_version():
9-
assert __version__ == '0.3.5'
9+
assert __version__ == '0.3.6'
1010

xaux/dev_tools/release_tools.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def _assert_no_open_prs(branch):
203203

204204
def _set_dependencies(package):
205205
# Manually get the xsuite dependencies from the pyproject.toml file (not from PyPi as things might have changed)
206-
xsuite_pkgs = ['xaux', 'xobjects', 'xdeps', 'xtrack', 'xpart', 'xfields', 'xcoll', 'xdyna', 'xboinc']
206+
xsuite_pkgs = ['xaux', 'xobjects', 'xdeps', 'xtrack', 'xpart', 'xfields', 'xcoll', 'xdyna', 'xboinc', 'xwakes']
207207
xsuite_pkgs.remove(package)
208208
latest_version = {}
209209
for pkg in xsuite_pkgs:
@@ -212,10 +212,15 @@ def _set_dependencies(package):
212212
lines = fid.readlines()
213213
with Path("pyproject.toml").open("w") as fid:
214214
for line in lines:
215-
if any([line.startswith(f"{pkg} =") or line.startswith(f"{pkg}=") for pkg in xsuite_pkgs]):
215+
if any([pkg in line and ">=" in line for pkg in xsuite_pkgs]):
216216
for pkg in xsuite_pkgs:
217-
if line.startswith(f"{pkg} ") or line.startswith(f"{pkg}="):
218-
fid.write(f'{pkg} = ">={latest_version[pkg]}"\n')
217+
if pkg in line and ">=" in line:
218+
# Bit of hackery to support both "xtrack>=0.89.3", and xaux = ">=0.3.5"
219+
parts = line.split('>=')
220+
if len(parts) != 2:
221+
raise VersionError(f"Fatal error: could not parse line {line}...")
222+
parts = [parts[0], *parts[1].split('"')]
223+
fid.write('"'.join([f"{parts[0]}>={latest_version[pkg]}", *parts[2:]]))
219224
break
220225
else:
221226
fid.write(line)

xaux/general.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
# ===================
1111
# Do not change
1212
# ===================
13-
__version__ = '0.3.5'
13+
__version__ = '0.3.6'
1414
# ===================

0 commit comments

Comments
 (0)