tenzir-test 0.12.0__py3-none-any.whl

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.
@@ -0,0 +1,158 @@
1
+ from __future__ import annotations
2
+
3
+ import subprocess
4
+ import sys
5
+ import typing
6
+ from pathlib import Path
7
+
8
+ from tenzir_test import fixtures as fixture_api
9
+
10
+ from ._utils import get_run_module
11
+ from .ext_runner import ExtRunner
12
+
13
+
14
+ class ShellRunner(ExtRunner):
15
+ def __init__(self) -> None:
16
+ super().__init__(name="shell", ext="sh")
17
+
18
+ def run(self, test: Path, update: bool, coverage: bool = False) -> bool:
19
+ del coverage
20
+ run_mod = get_run_module()
21
+ test_config = run_mod.parse_test_config(test)
22
+ passthrough = run_mod.is_passthrough_enabled()
23
+ inputs_override = typing.cast(str | None, test_config.get("inputs"))
24
+ env, _config_args = run_mod.get_test_env_and_config_args(test, inputs=inputs_override)
25
+ fixtures = typing.cast(tuple[str, ...], test_config.get("fixtures", tuple()))
26
+ timeout = typing.cast(int, test_config["timeout"])
27
+ expect_error = bool(test_config.get("error", False))
28
+
29
+ context_token = fixture_api.push_context(
30
+ fixture_api.FixtureContext(
31
+ test=test,
32
+ config=typing.cast(dict[str, typing.Any], test_config),
33
+ coverage=False,
34
+ env=env,
35
+ config_args=tuple(),
36
+ tenzir_binary=run_mod.TENZIR_BINARY,
37
+ tenzir_node_binary=run_mod.TENZIR_NODE_BINARY,
38
+ )
39
+ )
40
+ try:
41
+ with fixture_api.activate(fixtures) as fixture_env:
42
+ env.update(fixture_env)
43
+ run_mod._apply_fixture_env(env, fixtures)
44
+ shell_bin_dir = run_mod.ROOT / "_shell"
45
+ shell_path_prefix = shell_bin_dir.as_posix()
46
+ if env.get("PATH"):
47
+ env["PATH"] = f"{shell_path_prefix}:{env['PATH']}"
48
+ else:
49
+ env["PATH"] = shell_path_prefix
50
+
51
+ try:
52
+ completed = run_mod.run_subprocess(
53
+ ["sh", "-eu", str(test)],
54
+ env=env,
55
+ timeout=timeout,
56
+ capture_output=not passthrough,
57
+ check=not expect_error,
58
+ text=False,
59
+ cwd=str(run_mod.ROOT),
60
+ )
61
+ except subprocess.CalledProcessError as exc:
62
+ completed = exc # treat like CompletedProcess for diagnostics
63
+ finally:
64
+ fixture_api.pop_context(context_token)
65
+ run_mod.cleanup_test_tmp_dir(env.get(run_mod.TEST_TMP_ENV_VAR))
66
+
67
+ stdout_data = completed.stdout
68
+ if isinstance(stdout_data, str):
69
+ stdout_bytes: bytes = stdout_data.encode()
70
+ else:
71
+ stdout_bytes = stdout_data or b""
72
+
73
+ stderr_data = completed.stderr
74
+ if isinstance(stderr_data, str):
75
+ stderr_bytes: bytes = stderr_data.encode()
76
+ else:
77
+ stderr_bytes = stderr_data or b""
78
+
79
+ good = completed.returncode == 0
80
+ if expect_error == good:
81
+ suppressed = run_mod.should_suppress_failure_output()
82
+ summary_line = run_mod.format_failure_message(
83
+ f"got unexpected exit code {completed.returncode}"
84
+ )
85
+ if passthrough:
86
+ if not suppressed:
87
+ run_mod.report_failure(test, summary_line)
88
+ return False
89
+ if suppressed:
90
+ return False
91
+
92
+ with run_mod.stdout_lock:
93
+ run_mod.fail(test)
94
+ line_prefix = "│ ".encode()
95
+ for line in stdout_bytes.splitlines():
96
+ sys.stdout.buffer.write(line_prefix + line + b"\n")
97
+ if stderr_bytes:
98
+ sys.stdout.write("├─▶ stderr\n")
99
+ detail_prefix = run_mod.DETAIL_COLOR.encode()
100
+ reset_bytes = run_mod.RESET_COLOR.encode()
101
+ for line in stderr_bytes.splitlines():
102
+ sys.stdout.buffer.write(
103
+ line_prefix + detail_prefix + line + reset_bytes + b"\n"
104
+ )
105
+ sys.stdout.write(summary_line + "\n")
106
+ return False
107
+
108
+ if passthrough:
109
+ run_mod.success(test)
110
+ return True
111
+
112
+ root_prefix: bytes = (str(run_mod.ROOT) + "/").encode()
113
+ stdout_bytes = stdout_bytes.replace(root_prefix, b"")
114
+
115
+ stdout_path = test.with_suffix(".txt")
116
+
117
+ combined_bytes = stdout_bytes
118
+ if stderr_bytes:
119
+ if combined_bytes and not combined_bytes.endswith(b"\n"):
120
+ combined_bytes += b"\n"
121
+ combined_bytes += stderr_bytes
122
+
123
+ if update:
124
+ stdout_path.write_bytes(combined_bytes)
125
+ run_mod.success(test)
126
+ return True
127
+
128
+ if combined_bytes:
129
+ if not stdout_path.exists():
130
+ run_mod.report_failure(
131
+ test,
132
+ run_mod.format_failure_message(f'Failed to find ref file: "{stdout_path}"'),
133
+ )
134
+ return False
135
+ run_mod.log_comparison(test, stdout_path, mode="comparing")
136
+ expected_stdout = stdout_path.read_bytes()
137
+ if expected_stdout != combined_bytes:
138
+ if run_mod.interrupt_requested():
139
+ run_mod.report_interrupted_test(test)
140
+ else:
141
+ run_mod.report_failure(test, "")
142
+ run_mod.print_diff(expected_stdout, combined_bytes, stdout_path)
143
+ return False
144
+ elif stdout_path.exists():
145
+ expected_stdout = stdout_path.read_bytes()
146
+ if expected_stdout not in {b"", b"\n"}:
147
+ if run_mod.interrupt_requested():
148
+ run_mod.report_interrupted_test(test)
149
+ else:
150
+ run_mod.report_failure(test, "")
151
+ run_mod.print_diff(expected_stdout, b"", stdout_path)
152
+ return False
153
+
154
+ run_mod.success(test)
155
+ return True
156
+
157
+
158
+ __all__ = ["ShellRunner"]
@@ -0,0 +1,37 @@
1
+ from __future__ import annotations
2
+
3
+ import typing
4
+ from pathlib import Path
5
+
6
+ from ._utils import get_run_module
7
+ from .tql_runner import TqlRunner
8
+
9
+
10
+ class TenzirRunner(TqlRunner):
11
+ def __init__(self) -> None:
12
+ super().__init__(name="tenzir")
13
+
14
+ def run(self, test: Path, update: bool, coverage: bool = False) -> bool | str:
15
+ run_mod = get_run_module()
16
+ test_config = run_mod.parse_test_config(test, coverage=coverage)
17
+ if test_config.get("skip"):
18
+ return typing.cast(
19
+ bool | str,
20
+ run_mod.handle_skip(
21
+ str(test_config["skip"]),
22
+ test,
23
+ update=update,
24
+ output_ext=self.output_ext,
25
+ ),
26
+ )
27
+ return bool(
28
+ run_mod.run_simple_test(
29
+ test,
30
+ update=update,
31
+ output_ext=self.output_ext,
32
+ coverage=coverage,
33
+ )
34
+ )
35
+
36
+
37
+ __all__ = ["TenzirRunner"]
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+
3
+ from .ext_runner import ExtRunner
4
+
5
+
6
+ class TqlRunner(ExtRunner):
7
+ output_ext: str = "txt"
8
+
9
+ def __init__(self, *, name: str) -> None:
10
+ super().__init__(name=name, ext="tql")
11
+
12
+
13
+ __all__ = ["TqlRunner"]
@@ -0,0 +1,81 @@
1
+ Metadata-Version: 2.4
2
+ Name: tenzir-test
3
+ Version: 0.12.0
4
+ Summary: Reusable test execution framework extracted from the Tenzir repository.
5
+ Project-URL: Homepage, https://github.com/tenzir/test
6
+ Project-URL: Repository, https://github.com/tenzir/test
7
+ Project-URL: Bug Tracker, https://github.com/tenzir/test/issues
8
+ Project-URL: Documentation, https://docs.tenzir.com
9
+ Author-email: Tenzir <engineering@tenzir.com>
10
+ Maintainer-email: Tenzir Engineering <engineering@tenzir.com>
11
+ License: Apache-2.0
12
+ License-File: LICENSE
13
+ Keywords: automation,pytest,tenzir,testing
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: Software Development :: Quality Assurance
23
+ Classifier: Topic :: Software Development :: Testing
24
+ Classifier: Typing :: Typed
25
+ Requires-Python: >=3.12
26
+ Requires-Dist: click>=8.1
27
+ Requires-Dist: pyyaml>=6.0
28
+ Description-Content-Type: text/markdown
29
+
30
+ # 🧪 tenzir-test
31
+
32
+ `tenzir-test` is the reusable test harness that powers the
33
+ [Tenzir](https://github.com/tenzir/tenzir) project. It discovers test scenarios
34
+ and Python fixtures, prepares the execution environment, and produces artifacts
35
+ you can diff against established baselines.
36
+
37
+ ## ✨ Highlights
38
+
39
+ - 🔍 Auto-discovers tests, inputs, and configuration across both project and
40
+ package layouts, including linked satellite projects.
41
+ - 🧩 Supports configurable runners and reusable fixtures so you can tailor how
42
+ scenarios execute and share setup logic.
43
+ - 🛠️ Provides a `tenzir-test` CLI for orchestrating suites, updating baselines,
44
+ and inspecting artifacts.
45
+
46
+ ## 📦 Installation
47
+
48
+ Install the latest release from PyPI with `uvx`—`tenzir-test` requires Python
49
+ 3.12 or newer:
50
+
51
+ ```sh
52
+ uvx tenzir-test --help
53
+ ```
54
+
55
+ `uvx` downloads the newest compatible release, runs it in an isolated
56
+ environment, and caches subsequent invocations for fast reuse.
57
+
58
+ ## 📚 Documentation
59
+
60
+ Consult our [user guide](https://docs.tenzir.com/guides/testing/write-tests)
61
+ for an end-to-end walkthrough of writing tests.
62
+
63
+ We also provide a dense [reference](https://docs.tenzir.com/reference/test) that
64
+ explains concepts, configuration, multi-project execution, and CLI details.
65
+
66
+ ## 🧑‍💻 Development
67
+
68
+ Contributor workflows, quality gates, and release procedures live in
69
+ [`DEVELOPMENT.md`](DEVELOPMENT.md). Follow that guide when you work on the
70
+ project locally.
71
+
72
+ ## 🗞️ Releases
73
+
74
+ New versions are published to PyPI through trusted publishing when a GitHub
75
+ release is created. Review the latest release notes on GitHub for details about
76
+ what's new.
77
+
78
+ ## 📜 License
79
+
80
+ `tenzir-test` is available under the Apache License, Version 2.0. See
81
+ [`LICENSE`](LICENSE) for details.
@@ -0,0 +1,29 @@
1
+ tenzir_test/__init__.py,sha256=k7V6Pbjaa8SAy6t4KnaauHTyfnyVEwc1VGtH823MANU,1181
2
+ tenzir_test/_python_runner.py,sha256=LmghMIolsNEC2wUyJdv1h_cefOxTxET1IACrw-_hHuY,2900
3
+ tenzir_test/checks.py,sha256=VhZjU1TExqWzA1KcaW1xOGICpqb_G43AezrJIzw09eM,653
4
+ tenzir_test/cli.py,sha256=kDatxC4drfjAKnYIYFQmjhPJX45KYbm03pX44iqFgOk,5967
5
+ tenzir_test/config.py,sha256=q1_VEXuxL-xsGlnooeGvXxx9cMw652UEB9a1mPzZIQs,1680
6
+ tenzir_test/packages.py,sha256=cTCQdGjCS1XmuKyiwh0ew-z9tHn6J-xZ6nvBP-hU8bc,948
7
+ tenzir_test/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ tenzir_test/run.py,sha256=LE23W07n6O8TnUnkXJArvfwvLI1HYcIu8WCV4lPW70o,125110
9
+ tenzir_test/engine/__init__.py,sha256=5APwy90YDm7rmL_qCZfToAcfbQthcZ8yV2_ExXKqaqE,110
10
+ tenzir_test/engine/operations.py,sha256=OCYjuMHyMAaay4s08u2Sl7oE-PmgeXumylp7R8GYIH4,950
11
+ tenzir_test/engine/registry.py,sha256=LXCr6TGlv1sR1m1eboTk7SrbS2IVErc3PqUuHxGA2xk,594
12
+ tenzir_test/engine/state.py,sha256=Ez-Q27dL5oNqiJE0A4P2OP0p6i7aYKzH4ZyVWNgEezs,889
13
+ tenzir_test/engine/worker.py,sha256=WwIkx1m_ANNveQjNisy5-qpbUZl_DfDXxVIfdxABKjc,140
14
+ tenzir_test/fixtures/__init__.py,sha256=PdkN334btlqagY-4wAwsCyfhHE8kd_RLNoVM_ULii_I,18384
15
+ tenzir_test/fixtures/node.py,sha256=rLEzNff78r048KZmOanzGBCNg-OuJu9lQoKgGCArths,8197
16
+ tenzir_test/runners/__init__.py,sha256=M3p-TsDp231Dy58miDb467bA1kLYzgpa0pqVr_KP1ro,4616
17
+ tenzir_test/runners/_utils.py,sha256=BWv7UEPGa01l4tGTCg5i_22NblIyRw8vjk_5NIf1x_c,467
18
+ tenzir_test/runners/custom_python_fixture_runner.py,sha256=uXbSf18xTttf51k2EbjWf8AqN2R7TfpfSCkLyU5HJx4,7284
19
+ tenzir_test/runners/diff_runner.py,sha256=ah1hr1vvD6BON2PZz61mxwioRFIzHFuaAbJ0DjDSqG4,5151
20
+ tenzir_test/runners/ext_runner.py,sha256=sKL9Mw_ksVVBWnrdIJR2WS5ueVnLKuNYYWZ22FTZIPo,730
21
+ tenzir_test/runners/runner.py,sha256=LtlD8huQOSmD7RyYDnKeCuI4Y6vhxGXMKsHA2qgfWN0,989
22
+ tenzir_test/runners/shell_runner.py,sha256=OuofgHeZN2FaO6xRI3uyqstLBymc6rmWC4HAnSn91AE,6068
23
+ tenzir_test/runners/tenzir_runner.py,sha256=464FFYS_mh6l-ehccc-S8cIUO1MxdapwQL5X3PmMkMI,1006
24
+ tenzir_test/runners/tql_runner.py,sha256=2ZLMf3TIKwcOvaOFrVvvhzK-EcWmGOUZxKkbSoByyQA,248
25
+ tenzir_test-0.12.0.dist-info/METADATA,sha256=VjTW82AKGkRswsZB-0w5wsCWY7MPIrIzZEREINlgZrI,3008
26
+ tenzir_test-0.12.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
27
+ tenzir_test-0.12.0.dist-info/entry_points.txt,sha256=q0eD9RQ_9eMPYvFNpBElo55HQYeaPgLfe9YhLsNwl10,93
28
+ tenzir_test-0.12.0.dist-info/licenses/LICENSE,sha256=ajMbpcBiSTXI8Rr4t17pvowV-On8DktghfZKxY_A22Q,10750
29
+ tenzir_test-0.12.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ check-release = tenzir_test.checks:main
3
+ tenzir-test = tenzir_test.cli:main
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2024 Tenzir
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.