Skip to content

Commit

Permalink
Intermediate release 0.12.2 (#94)
Browse files Browse the repository at this point in the history
* added change fragment for #91

* added change fragment for #92

* explicit exception propagation per flake8 B904

* switched email to matterminers

* added changes to release
  • Loading branch information
maxfischer2781 authored Sep 16, 2021
1 parent a1a3010 commit b16f88d
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
pip install .[contrib]
- name: Test with pytest
run: |
pytest --cov=./
pytest -v --cov=./
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
10 changes: 8 additions & 2 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. Created by log.py at 2020-04-15, command
'/Users/mfischer/PycharmProjects/cobald/venv/lib/python3.7/site-packages/change/__main__.py log docs/source/changes compile --output docs/source/changelog.rst'
.. Created by log.py at 2021-09-15, command
'/Users/mfischer/PycharmProjects/cobald/venv/lib/python3.9/site-packages/change/__main__.py log docs/source/changes compile --output docs/source/changelog.rst'
based on the format of 'https://keepachangelog.com/'
#########
ChangeLog
Expand All @@ -8,6 +8,12 @@ ChangeLog
0.12 Series
===========

Version [0.12.2] - 2021-09-15
+++++++++++++++++++++++++++++

* **[Fixed]** pipeline configuration may combine ``__type__`` and ``!yaml`` style
* **[Fixed]** pipeline configuration no longer suppresses ``TypeError``

Version [0.12.1] - 2020-04-15
+++++++++++++++++++++++++++++

Expand Down
9 changes: 9 additions & 0 deletions docs/source/changes/91.config_errors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
category: fixed
summary: "pipeline configuration no longer suppresses ``TypeError``"
description: |
The configuration processing previously decided between two paths depending
on whether some operation raised a ``TypeError``. This erroneously silenced
any unrelated ``TypeError`` from misconfigurations.
pull requests:
- 91
version: 0.12.2
9 changes: 9 additions & 0 deletions docs/source/changes/92.mixed_configs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
category: fixed
summary: "pipeline configuration may combine ``__type__`` and ``!yaml`` style"
description: |
Mixing the ``__type__`` and ``!yaml`` configuration styles could previously
lead to partially initialised pipelines. Such configurations are now correctly
digested and checked for success.
pull requests:
- 92
version: 0.12.2
2 changes: 2 additions & 0 deletions docs/source/changes/versions.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- semver: 0.12.2
date: '2021-09-15'
- semver: 0.12.1
date: '2020-04-15'
- semver: 0.12.0
Expand Down
6 changes: 3 additions & 3 deletions src/cobald/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
__summary__ = "COBalD - the Opportunistic Balancing Daemon"
__url__ = "https://github.com/MatterMiners/cobald"

__version__ = "0.12.1"
__version__ = "0.12.2"
__author__ = "Eileen Kuehn, Max Fischer"
__email__ = "mainekuehn@gmail.com"
__copyright__ = "2018 - 2020 %s" % __author__
__email__ = "matterminers@lists.kit.edu"
__copyright__ = "2018 - 2021 %s" % __author__
__keywords__ = "opportunistic scheduling scheduler demand feedback-loop cobald"
12 changes: 6 additions & 6 deletions src/cobald/daemon/config/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ def translate_hierarchy(
return structure
except ConfigurationError as err:
if err.where is None:
raise ConfigurationError(what=err.what, where=where)
raise ConfigurationError(what=err.what, where=where) from err
raise
except Exception as err:
raise ConfigurationError(where=where, what=err)
raise ConfigurationError(where=where, what=err) from err

def construct(self, mapping: dict, **kwargs):
"""
Expand All @@ -96,15 +96,15 @@ def load_name(absolute_name: str):
try:
obj = sys.modules[path[0]]
except KeyError:
raise ImportError("No module named %r" % path[0])
raise ImportError("No module named %r" % path[0]) from None
else:
for component in path[1:]:
try:
obj = getattr(obj, component)
except AttributeError as err:
raise ConfigurationError(
what="no such object %r: %s" % (absolute_name, err)
)
what="no such object %r" % absolute_name
) from err
return obj
else: # ImportError is not raised if ``absolute_name`` points to a valid module
return sys.modules[absolute_name]
Expand Down Expand Up @@ -204,7 +204,7 @@ def load_configuration(
if plugin.required:
raise ConfigurationError(
where="root", what="missing section %r" % plugin.section
)
) from None
else:
# invoke the plugin and store possible output
# to avoid it being garbage collected
Expand Down
2 changes: 1 addition & 1 deletion src/cobald/daemon/core/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def initialise_logging(level: str, target: str, short_format: bool):
raise SystemExit(
"invalid log level %r, expected any of 'DEBUG',"
"'INFO', 'WARNING', 'ERROR' or 'CRITICAL'" % level
)
) from None
handler = create_handler(target=target)
logging.basicConfig(
level=log_level,
Expand Down

0 comments on commit b16f88d

Please sign in to comment.