Skip to content

Commit 9397a02

Browse files
authored
Merge pull request #19 from xsuite/release/v0.2.2
Release 0.2.2
2 parents e5f1c5b + 08b03b3 commit 9397a02

21 files changed

+330
-92
lines changed

make_release_branch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# Copyright (c) CERN, 2024. #
55
# ######################################### #
66

7-
from xaux.tools import dev_make_release_branch
7+
from xaux.dev_tools import make_release_branch
88
# sys.tracebacklimit = 0
99

1010

11-
dev_make_release_branch("xaux")
11+
make_release_branch("xaux")

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "xaux"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
description = "Support tools for Xsuite packages"
55
authors = ["Frederik F. Van der Veken <[email protected]>",
66
"Thomas Pugnat <[email protected]>",
@@ -12,7 +12,7 @@ include = ["LICENSE", "NOTICE"]
1212

1313

1414
[tool.poetry.dependencies]
15-
python = ">=3.8, <3.12"
15+
python = ">=3.8"
1616

1717
[tool.poetry.dev-dependencies]
1818
pytest = ">=7.3"

release.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# Copyright (c) CERN, 2024. #
55
# ######################################### #
66

7-
from xaux.tools import dev_release
7+
from xaux.dev_tools import make_release
88
# sys.tracebacklimit = 0
99

1010

11-
dev_release("xaux")
11+
make_release("xaux")

rename_release_branch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# Copyright (c) CERN, 2024. #
55
# ######################################### #
66

7-
from xaux.tools import dev_rename_release_branch
7+
from xaux.dev_tools import rename_release_branch
88
# sys.tracebacklimit = 0
99

1010

11-
dev_rename_release_branch("xaux")
11+
rename_release_branch("xaux")

tests/clean.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
for f in example_broken_link.txt example_link.txt
2+
do
3+
if [ -h $f ]
4+
then
5+
rm $f
6+
fi
7+
done
8+
9+
for f in example_file.txt
10+
do
11+
if [ -e $f ]
12+
then
13+
rm $f
14+
fi
15+
done
16+
17+
rm -r /eos/user/s/sixtadm/test_xboinc/*
18+
rm -r /afs/cern.ch/user/s/sixtadm/public/test_xboinc
19+
rm -r level1 level5_res
20+

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ def test_user(request):
4949
+ "your access rights (is your ticket still alive?).\nAlternatively, specify the test "
5050
+ "user account with the option `--user username`\nI Tried the following paths:\n "
5151
+ "\n ".join(eos_paths_tried) + "\nThe relevant EosPath tests will be skipped.")
52-
return {"test_user": test_user, "afs_path": afs_path, "skip_afs": skip_afs, "eos_path": eos_path, "skip_eos": skip_eos}
52+
return {"test_user": test_user, "afs_path": afs_path, "skip_afs": skip_afs, "eos_path": eos_path, "skip_eos": skip_eos}

tests/pytest_all_versions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# files="test_fs.py test_fs_api.py test_fs_afs.py test_fs_eos.py"
44
files=''
55

6-
for i in 8 9 10 11 # 12 13
6+
for i in 8 9 10 11 12 13
77
do
88
source ~/miniforge3/bin/activate python3.$i
99
python -c "import sys; print(f'Testing xaux FS in Python version {sys.version.split()[0]}')"

tests/test_fs.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,41 @@ def test_nested_fs(test_user):
192192
level6.unlink()
193193
level6.symlink_to(level6_res)
194194

195+
for l in [level1, level2, level3, level4, level5, level6]:
196+
assert l.lexists()
197+
assert l.is_symlink()
198+
for d in [level1_res, level2_res, level3_res, level4_res, level5_res, level6_res]:
199+
assert d.exists()
200+
assert d.is_dir()
201+
assert not d.is_symlink()
202+
for l, d in zip([level1, level2, level3, level4, level5, level6],
203+
[level1_res, level2_res, level3_res, level4_res, level5_res, level6_res]):
204+
assert l.resolve() == d
205+
206+
assert isinstance(level1, AfsPath)
207+
assert isinstance(level2, LocalPath)
208+
assert isinstance(level3, EosPath)
209+
assert isinstance(level4, AfsPath)
210+
assert isinstance(level5, EosPath)
211+
assert isinstance(level6, LocalPath)
212+
assert isinstance(level1_res, LocalPath)
213+
assert isinstance(level2_res, EosPath)
214+
assert isinstance(level3_res, AfsPath)
215+
assert isinstance(level4_res, EosPath)
216+
assert isinstance(level5_res, LocalPath)
217+
assert isinstance(level6_res, AfsPath)
218+
195219
path = level1 / "level2" / "level3" / "level4" / "level5" / "level6"
196220
assert isinstance(path, LocalPath)
197221
parents = [f for f in path.parents]
222+
assert len(parents) == 13
198223
expected = [EosPath, AfsPath, EosPath, LocalPath, AfsPath,
199224
AfsPath, AfsPath, AfsPath, AfsPath, AfsPath,
200225
AfsPath, LocalPath, LocalPath]
201226
assert all([isinstance(f, exp) for f, exp in zip(parents, expected)])
202227
assert isinstance(path.resolve(), AfsPath)
203228
parents_res = [f.resolve() for f in path.parents]
229+
assert len(parents_res) == 13
204230
expected_res = [LocalPath, EosPath, AfsPath, EosPath, LocalPath,
205231
AfsPath, AfsPath, AfsPath, AfsPath, AfsPath,
206232
AfsPath, LocalPath, LocalPath]

tests/test_fs_eos.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ def test_eos_components(test_user):
255255
broken_mgm_files.append(f"root:/eoshome.cern.ch/{file_ref}")
256256
broken_mgm_files.append(f"root://afshome.cern.ch/{file_ref}")
257257
for file in broken_mgm_files:
258-
with pytest.raises(ValueError, match="Invalid EOS path specification"):
258+
with pytest.raises(ValueError, match="Invalid EosPath specification"):
259259
path = EosPath(file)
260-
with pytest.raises(ValueError, match="Unknown path specification"):
260+
with pytest.raises(ValueError, match="Unknown EosPath specification"):
261261
path = FsPath(broken_mgm_files[-1])
262262

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.2.1'
9+
assert __version__ == '0.2.2'
1010

0 commit comments

Comments
 (0)