Skip to content

Commit b16f88d

Browse files
Intermediate release 0.12.2 (#94)
* added change fragment for #91 * added change fragment for #92 * explicit exception propagation per flake8 B904 * switched email to matterminers * added changes to release
1 parent a1a3010 commit b16f88d

File tree

8 files changed

+39
-13
lines changed

8 files changed

+39
-13
lines changed

.github/workflows/unittests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ jobs:
2121
pip install .[contrib]
2222
- name: Test with pytest
2323
run: |
24-
pytest --cov=./
24+
pytest -v --cov=./
2525
- name: Upload coverage to Codecov
2626
uses: codecov/codecov-action@v1

docs/source/changelog.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
.. Created by log.py at 2020-04-15, command
2-
'/Users/mfischer/PycharmProjects/cobald/venv/lib/python3.7/site-packages/change/__main__.py log docs/source/changes compile --output docs/source/changelog.rst'
1+
.. Created by log.py at 2021-09-15, command
2+
'/Users/mfischer/PycharmProjects/cobald/venv/lib/python3.9/site-packages/change/__main__.py log docs/source/changes compile --output docs/source/changelog.rst'
33
based on the format of 'https://keepachangelog.com/'
44
#########
55
ChangeLog
@@ -8,6 +8,12 @@ ChangeLog
88
0.12 Series
99
===========
1010

11+
Version [0.12.2] - 2021-09-15
12+
+++++++++++++++++++++++++++++
13+
14+
* **[Fixed]** pipeline configuration may combine ``__type__`` and ``!yaml`` style
15+
* **[Fixed]** pipeline configuration no longer suppresses ``TypeError``
16+
1117
Version [0.12.1] - 2020-04-15
1218
+++++++++++++++++++++++++++++
1319

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
category: fixed
2+
summary: "pipeline configuration no longer suppresses ``TypeError``"
3+
description: |
4+
The configuration processing previously decided between two paths depending
5+
on whether some operation raised a ``TypeError``. This erroneously silenced
6+
any unrelated ``TypeError`` from misconfigurations.
7+
pull requests:
8+
- 91
9+
version: 0.12.2
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
category: fixed
2+
summary: "pipeline configuration may combine ``__type__`` and ``!yaml`` style"
3+
description: |
4+
Mixing the ``__type__`` and ``!yaml`` configuration styles could previously
5+
lead to partially initialised pipelines. Such configurations are now correctly
6+
digested and checked for success.
7+
pull requests:
8+
- 92
9+
version: 0.12.2

docs/source/changes/versions.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- semver: 0.12.2
2+
date: '2021-09-15'
13
- semver: 0.12.1
24
date: '2020-04-15'
35
- semver: 0.12.0

src/cobald/__about__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
__summary__ = "COBalD - the Opportunistic Balancing Daemon"
1515
__url__ = "https://github.com/MatterMiners/cobald"
1616

17-
__version__ = "0.12.1"
17+
__version__ = "0.12.2"
1818
__author__ = "Eileen Kuehn, Max Fischer"
19-
__email__ = "[email protected]"
20-
__copyright__ = "2018 - 2020 %s" % __author__
19+
__email__ = "[email protected]"
20+
__copyright__ = "2018 - 2021 %s" % __author__
2121
__keywords__ = "opportunistic scheduling scheduler demand feedback-loop cobald"

src/cobald/daemon/config/mapping.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ def translate_hierarchy(
6767
return structure
6868
except ConfigurationError as err:
6969
if err.where is None:
70-
raise ConfigurationError(what=err.what, where=where)
70+
raise ConfigurationError(what=err.what, where=where) from err
7171
raise
7272
except Exception as err:
73-
raise ConfigurationError(where=where, what=err)
73+
raise ConfigurationError(where=where, what=err) from err
7474

7575
def construct(self, mapping: dict, **kwargs):
7676
"""
@@ -96,15 +96,15 @@ def load_name(absolute_name: str):
9696
try:
9797
obj = sys.modules[path[0]]
9898
except KeyError:
99-
raise ImportError("No module named %r" % path[0])
99+
raise ImportError("No module named %r" % path[0]) from None
100100
else:
101101
for component in path[1:]:
102102
try:
103103
obj = getattr(obj, component)
104104
except AttributeError as err:
105105
raise ConfigurationError(
106-
what="no such object %r: %s" % (absolute_name, err)
107-
)
106+
what="no such object %r" % absolute_name
107+
) from err
108108
return obj
109109
else: # ImportError is not raised if ``absolute_name`` points to a valid module
110110
return sys.modules[absolute_name]
@@ -204,7 +204,7 @@ def load_configuration(
204204
if plugin.required:
205205
raise ConfigurationError(
206206
where="root", what="missing section %r" % plugin.section
207-
)
207+
) from None
208208
else:
209209
# invoke the plugin and store possible output
210210
# to avoid it being garbage collected

src/cobald/daemon/core/logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def initialise_logging(level: str, target: str, short_format: bool):
2121
raise SystemExit(
2222
"invalid log level %r, expected any of 'DEBUG',"
2323
"'INFO', 'WARNING', 'ERROR' or 'CRITICAL'" % level
24-
)
24+
) from None
2525
handler = create_handler(target=target)
2626
logging.basicConfig(
2727
level=log_level,

0 commit comments

Comments
 (0)