Skip to content

Commit 13f6379

Browse files
authored
Merge pull request #161 from xsuite/release/v0.6.7
Release 0.6.7
2 parents e02a743 + 51e70d5 commit 13f6379

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "xcoll"
3-
version = "0.6.6"
3+
version = "0.6.7"
44
description = "Xsuite collimation package"
55
authors = [
66
{name="Frederik F. Van der Veken", email="[email protected]"},
@@ -25,7 +25,7 @@ dependencies = [
2525
"xobjects>=0.5.3",
2626
"xdeps>=0.10.6",
2727
"xpart>=0.23.1",
28-
"xtrack>=0.90.2",
28+
"xtrack>=0.93.0",
2929
]
3030

3131
[project.optional-dependencies]
@@ -46,7 +46,7 @@ exclude = ["xcoll/lib", "xcoll/config"]
4646

4747
[poetry.group.dev.dependencies]
4848
pytest = ">=7.3"
49-
xaux = ">=0.3.6"
49+
xaux = ">=0.3.7"
5050

5151
[build-system]
5252
# Needed for pip install -e (BTW: need pip version 22)

tests/test_version.py

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

88
def test_version():
9-
assert __version__ == '0.6.6'
9+
assert __version__ == '0.6.7'

xcoll/colldb.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _dict_keys_to_lower(dct):
3636
else:
3737
return dct
3838

39-
39+
# TODO: need better handling of beam argument (not hardcoded 'b1' and 'b2' strings)
4040
def _get_coll_dct_by_beam(coll, beam):
4141
# The dictionary can be a CollimatorDatabase for a single beam (beam=None)
4242
# or for both beams (beam='b1' or beam='b2)
@@ -51,7 +51,7 @@ def _get_coll_dct_by_beam(coll, beam):
5151
raise ValueError("Need to specify a beam, because the given dict is for both beams!")
5252
return coll[beam]
5353

54-
elif len(beam_in_db) == 1:
54+
elif len(beam_in_db) == 1 and beam_in_db[0].lower() in ['b1','b2']:
5555
if beam is None:
5656
beam = beam_in_db[0].lower()
5757
elif beam != beam_in_db[0].lower():
@@ -551,7 +551,8 @@ def _create_collimator(self, cls, line, name, **kwargs):
551551
prop_dict.update(kwargs)
552552
el = cls(**prop_dict)
553553
el.emittance = [self.nemitt_x, self.nemitt_y]
554-
if 'family' in self[name] and self[name]['family'].lower() != 'unknown':
554+
if 'family' in self[name] and self[name]['family'] \
555+
and self[name]['family'].lower() != 'unknown':
555556
if self[name]['family'] == name:
556557
raise ValueError(f"Collimator {name} has the same name as its family!")
557558
el.family = self[name]['family']

xcoll/general.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
# ======================
1313
# Do not change
1414
# ======================
15-
__version__ = '0.6.6'
15+
__version__ = '0.6.7'
1616
# ======================

0 commit comments

Comments
 (0)