runem 0.7.0__tar.gz → 0.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {runem-0.7.0 → runem-0.7.1}/HISTORY.md +24 -0
- {runem-0.7.0 → runem-0.7.1}/PKG-INFO +1 -1
- runem-0.7.1/runem/VERSION +1 -0
- {runem-0.7.0 → runem-0.7.1}/runem/blocking_print.py +3 -0
- {runem-0.7.0 → runem-0.7.1}/runem/config_parse.py +5 -7
- {runem-0.7.0 → runem-0.7.1}/runem/job_wrapper_python.py +3 -3
- {runem-0.7.0 → runem-0.7.1}/runem.egg-info/PKG-INFO +1 -1
- {runem-0.7.0 → runem-0.7.1}/tests/test_config_parse.py +8 -5
- runem-0.7.0/runem/VERSION +0 -1
- {runem-0.7.0 → runem-0.7.1}/Containerfile +0 -0
- {runem-0.7.0 → runem-0.7.1}/LICENSE +0 -0
- {runem-0.7.0 → runem-0.7.1}/MANIFEST.in +0 -0
- {runem-0.7.0 → runem-0.7.1}/README.md +0 -0
- {runem-0.7.0 → runem-0.7.1}/pyproject.toml +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/__init__.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/__main__.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/base.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/cli/initialise_options.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/cli.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/command_line.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/config.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/config_metadata.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/config_validate.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/files.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/hook_manager.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/informative_dict.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/job.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/job_execute.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/job_filter.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/job_runner_simple_command.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/job_wrapper.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/log.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/py.typed +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/report.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/run_command.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/runem.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/runem_version.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/schema.yml +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/types/__init__.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/types/common.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/types/errors.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/types/filters.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/types/hooks.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/types/options.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/types/runem_config.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/types/types_jobs.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/utils.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/yaml_utils.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem/yaml_validation.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem.egg-info/SOURCES.txt +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem.egg-info/dependency_links.txt +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem.egg-info/entry_points.txt +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem.egg-info/requires.txt +0 -0
- {runem-0.7.0 → runem-0.7.1}/runem.egg-info/top_level.txt +0 -0
- {runem-0.7.0 → runem-0.7.1}/scripts/test_hooks/__init__.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/scripts/test_hooks/json_validators.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/scripts/test_hooks/py.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/scripts/test_hooks/py.typed +0 -0
- {runem-0.7.0 → runem-0.7.1}/scripts/test_hooks/runem_hooks.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/scripts/test_hooks/yarn.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/setup.cfg +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/__init__.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/cli/test_initialise_options.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/conftest.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/data/help_output.3.10.txt +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/data/help_output.3.11.txt +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/intentional_test_error.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/sanitise_reports_footer.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_base.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_blocking_print.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_cli.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_config.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_config_validate.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_files.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_hook_manager.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_informative_dict.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_job.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_job_execute.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_job_filter.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_job_runner_simple_command.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_job_wrapper.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_job_wrapper_python.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_report.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_run_command.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_runem.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_types/__init__.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_types/test_public_api.py +0 -0
- {runem-0.7.0 → runem-0.7.1}/tests/test_yaml_validation.py +0 -0
@@ -4,6 +4,30 @@ Changelog
|
|
4
4
|
|
5
5
|
(unreleased)
|
6
6
|
------------
|
7
|
+
- Merge pull request #85 from lursight/feat/better_function-not-
|
8
|
+
found_error. [Frank Harrison]
|
9
|
+
|
10
|
+
Feat/better function not found error
|
11
|
+
- Feat(function-lookup-error): exits instead of reraising errors looking
|
12
|
+
for functions. [Frank Harrison]
|
13
|
+
- Feat(coloured-function-lookups): colours the function errors. [Frank
|
14
|
+
Harrison]
|
15
|
+
- Merge pull request #84 from lursight/fix/log-wrapping. [Frank
|
16
|
+
Harrison]
|
17
|
+
|
18
|
+
fix(log-wrapping): fixes log wrapping so it does not truncate
|
19
|
+
- Fix(log-wrapping): fixes log wrapping so it does not truncate. [Frank
|
20
|
+
Harrison]
|
21
|
+
|
22
|
+
I used printing of multiple variants to find this switch. This happened
|
23
|
+
because `soft_wrap=True` implies that it is turning on a line-break or
|
24
|
+
similar system *instead of* turning off hard-wrapping, so it should be
|
25
|
+
`hard_wrap=False` or similar.
|
26
|
+
|
27
|
+
|
28
|
+
0.7.0 (2025-04-21)
|
29
|
+
------------------
|
30
|
+
- Release: version 0.7.0 🚀 [Frank Harrison]
|
7
31
|
- Merge pull request #83 from
|
8
32
|
lursight/feat/no_runem_traceback_on_job_fail. [Frank Harrison]
|
9
33
|
|
@@ -0,0 +1 @@
|
|
1
|
+
0.7.1
|
@@ -21,6 +21,9 @@ def _reset_console() -> Console:
|
|
21
21
|
# `highlight` is what colourises string and number in print() calls.
|
22
22
|
# We do not want this to be auto-magic.
|
23
23
|
highlight=False,
|
24
|
+
# `soft_wrap=True` disables word-wrap & cropping by default:
|
25
|
+
# - `soft_wrap` reads like a misnomer to me
|
26
|
+
soft_wrap=True,
|
24
27
|
)
|
25
28
|
return RICH_CONSOLE
|
26
29
|
|
@@ -11,7 +11,7 @@ from runem.job import Job
|
|
11
11
|
from runem.job_wrapper import get_job_wrapper
|
12
12
|
from runem.log import error, log, warn
|
13
13
|
from runem.types.common import JobNames, JobPhases, JobTags, OrderedPhases, PhaseName
|
14
|
-
from runem.types.errors import FunctionNotFound
|
14
|
+
from runem.types.errors import FunctionNotFound, SystemExitBad
|
15
15
|
from runem.types.filters import TagFileFilter, TagFileFilters
|
16
16
|
from runem.types.hooks import HookName
|
17
17
|
from runem.types.runem_config import (
|
@@ -81,9 +81,8 @@ def parse_hook_config(
|
|
81
81
|
f"hook config entry is missing '{err.args[0]}' key. Have {tuple(hook.keys())}"
|
82
82
|
) from err
|
83
83
|
except FunctionNotFound as err:
|
84
|
-
|
85
|
-
|
86
|
-
) from err
|
84
|
+
error(f"Whilst loading hook '{str(hook['hook_name'])}'. {str(err)}")
|
85
|
+
raise SystemExitBad(2) from err
|
87
86
|
|
88
87
|
|
89
88
|
def _parse_job( # noqa: C901
|
@@ -110,9 +109,8 @@ def _parse_job( # noqa: C901
|
|
110
109
|
# try and load the function _before_ we schedule it's execution
|
111
110
|
get_job_wrapper(job, cfg_filepath)
|
112
111
|
except FunctionNotFound as err:
|
113
|
-
|
114
|
-
|
115
|
-
) from err
|
112
|
+
error(f"Whilst loading job '{job['label']}'. {str(err)}")
|
113
|
+
raise SystemExitBad(2) from err
|
116
114
|
|
117
115
|
try:
|
118
116
|
phase_id: PhaseName = job["when"]["phase"]
|
@@ -55,9 +55,9 @@ def _load_python_function_from_module(
|
|
55
55
|
except AttributeError as err:
|
56
56
|
raise FunctionNotFound(
|
57
57
|
(
|
58
|
-
f"
|
59
|
-
f"exists in '{str(module_file_path)}' as expected in "
|
60
|
-
f"your config at '{str(cfg_filepath)}"
|
58
|
+
f"Check that function '[blue]{function_to_load}[/blue]' "
|
59
|
+
f"exists in '[blue]{str(module_file_path)}[/blue]' as expected in "
|
60
|
+
f"your config at '[blue]{str(cfg_filepath)}[/blue]'"
|
61
61
|
)
|
62
62
|
) from err
|
63
63
|
return function
|
@@ -17,7 +17,7 @@ from runem.config_parse import (
|
|
17
17
|
parse_job_config,
|
18
18
|
)
|
19
19
|
from runem.types.common import JobNames, JobPhases, JobTags, OrderedPhases
|
20
|
-
from runem.types.errors import FunctionNotFound
|
20
|
+
from runem.types.errors import FunctionNotFound, SystemExitBad
|
21
21
|
from runem.types.hooks import HookName
|
22
22
|
from runem.types.runem_config import (
|
23
23
|
Config,
|
@@ -726,7 +726,7 @@ def test_parse_job_without_tags(mock_get_job_wrapper: Mock) -> None:
|
|
726
726
|
|
727
727
|
@patch(
|
728
728
|
"runem.config_parse.get_job_wrapper",
|
729
|
-
side_effect=FunctionNotFound,
|
729
|
+
side_effect=FunctionNotFound("a test message"),
|
730
730
|
)
|
731
731
|
def test_parse_job_with_bad_function(mock_get_job_wrapper: Mock) -> None:
|
732
732
|
"""Test case where job_tags is empty or None."""
|
@@ -744,7 +744,7 @@ def test_parse_job_with_bad_function(mock_get_job_wrapper: Mock) -> None:
|
|
744
744
|
phase_order: OrderedPhases = ("phase1", "phase2")
|
745
745
|
|
746
746
|
with io.StringIO() as buf, redirect_stdout(buf):
|
747
|
-
with pytest.raises(
|
747
|
+
with pytest.raises(SystemExitBad):
|
748
748
|
_parse_job(
|
749
749
|
cfg_filepath,
|
750
750
|
job_config,
|
@@ -758,7 +758,10 @@ def test_parse_job_with_bad_function(mock_get_job_wrapper: Mock) -> None:
|
|
758
758
|
|
759
759
|
mock_get_job_wrapper.assert_called_once()
|
760
760
|
|
761
|
-
assert run_command_stdout == [
|
761
|
+
assert run_command_stdout == [
|
762
|
+
"runem: ERROR: Whilst loading job 'Job2'. a test message",
|
763
|
+
"",
|
764
|
+
]
|
762
765
|
assert not in_out_tags
|
763
766
|
|
764
767
|
|
@@ -859,7 +862,7 @@ def test_parse_hook_config_with_bad_function_address() -> None:
|
|
859
862
|
},
|
860
863
|
"hook_name": HookName("on-exit"),
|
861
864
|
}
|
862
|
-
with pytest.raises(
|
865
|
+
with pytest.raises(SystemExitBad):
|
863
866
|
parse_hook_config(hook, cfg_filepath)
|
864
867
|
|
865
868
|
|
runem-0.7.0/runem/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.7.0
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|