alertshadow 0.1.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,3 @@
1
+ """Offline Prometheus test shadows of Grafana provisioning rules."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,3 @@
1
+ from .cli import main
2
+
3
+ raise SystemExit(main())
alertshadow/cli.py ADDED
@@ -0,0 +1,59 @@
1
+ """Command-line interface; no network or promtool installation."""
2
+ from __future__ import annotations
3
+
4
+ import argparse
5
+ from pathlib import Path
6
+ import shutil
7
+ import subprocess
8
+ import sys
9
+ import tomllib
10
+ from typing import Any
11
+
12
+ import yaml
13
+
14
+ from .core import Invalid, project_files
15
+
16
+
17
+ def run_tests(root: Path, config: dict[str, Any], files: list[Path]) -> None:
18
+ executable = shutil.which("promtool")
19
+ if executable is None:
20
+ raise Invalid("promtool is required on PATH; install it explicitly")
21
+ fixtures = sorted({path for pattern in config.get("fixtures", []) for path in root.glob(pattern)})
22
+ if not fixtures:
23
+ raise Invalid("no test fixtures matched")
24
+ for args in (["check", "rules", *map(str, files)], ["test", "rules", *map(str, fixtures)]):
25
+ subprocess.run([executable, *args], cwd=root, check=True, timeout=120)
26
+ projected = {r["alert"] for p in files for g in yaml.safe_load(p.read_text())["groups"] for r in g["rules"]}
27
+ tested = {a["alertname"] for p in fixtures for t in yaml.safe_load(p.read_text()).get("tests", []) for a in t.get("alert_rule_test", [])}
28
+ print(f"coverage: {len(projected & tested)}/{len(projected)} projected alert names have assertions")
29
+
30
+
31
+ def main(argv: list[str] | None = None) -> int:
32
+ parser = argparse.ArgumentParser(description=__doc__)
33
+ parser.add_argument("command", choices=["project", "test"])
34
+ parser.add_argument("--root", type=Path, default=Path.cwd())
35
+ parser.add_argument("--config", type=Path, default=Path("alertshadow.toml"))
36
+ parser.add_argument("--no-project", action="store_true", help="test existing marker-owned shadows")
37
+ args = parser.parse_args(argv)
38
+ try:
39
+ root = args.root.resolve()
40
+ with (root / args.config).open("rb") as stream:
41
+ config = tomllib.load(stream)
42
+ if args.no_project:
43
+ if args.command != "test":
44
+ raise Invalid("--no-project requires test")
45
+ out = (root / config.get("out", "generated")).resolve()
46
+ if root not in out.parents:
47
+ raise Invalid("output must be strictly inside root")
48
+ from .core import HEADER
49
+ files = [p for p in out.rglob("*") if p.is_file() and not p.is_symlink() and p.read_bytes().startswith(HEADER.encode())]
50
+ if not files:
51
+ raise Invalid("no marker-owned shadows")
52
+ else:
53
+ files = project_files(root, config)
54
+ if args.command == "test":
55
+ run_tests(root, config, files)
56
+ return 0
57
+ except (Invalid, OSError, ValueError, TypeError, AttributeError, subprocess.SubprocessError) as exc:
58
+ print(f"alertshadow: {exc}", file=sys.stderr)
59
+ return 1
alertshadow/core.py ADDED
@@ -0,0 +1,173 @@
1
+ """Conservative graph projection and owned output management."""
2
+ from __future__ import annotations
3
+
4
+ import math
5
+ import os
6
+ from pathlib import Path
7
+ import re
8
+ from typing import Any
9
+
10
+ import yaml
11
+
12
+ HEADER = "# Generated by alertshadow; test shadow only.\n"
13
+ OPS = {"gt": ">", "lt": "<", "gte": ">=", "lte": "<="}
14
+ NUMBER = r"-?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?"
15
+
16
+
17
+ class Invalid(ValueError):
18
+ pass
19
+
20
+
21
+ def project_rule(rule: dict[str, Any], datasources: dict[str, str]) -> dict[str, Any]:
22
+ data = rule.get("data", [])
23
+ if not isinstance(data, list) or not all(isinstance(d, dict) for d in data):
24
+ raise Invalid("data must be a list of nodes")
25
+ refs = {d.get("refId"): d for d in data}
26
+ if None in refs or len(refs) != len(data):
27
+ raise Invalid("node references must be present and unique")
28
+ queries = [d for d in data if d.get("datasourceUid") not in (None, "__expr__")]
29
+ if len(queries) != 1:
30
+ raise Invalid("exactly one datasource query is required")
31
+ query = queries[0]
32
+ mode = datasources.get(query["datasourceUid"])
33
+ if mode != "prometheus":
34
+ raise Invalid("datasource is skipped" if mode == "skip" else "unknown datasource")
35
+ expr = query.get("model", {}).get("expr")
36
+ if not isinstance(expr, str) or not expr.strip():
37
+ raise Invalid("empty query expression")
38
+ cond = refs.get(rule.get("condition"))
39
+ if cond is None:
40
+ raise Invalid("missing condition node")
41
+ if cond is query:
42
+ if not re.search(rf"(?:<=|>=|<|>)\s*{NUMBER}\s*$", expr):
43
+ raise Invalid("direct query needs a filtering comparison")
44
+ else:
45
+ if cond.get("datasourceUid") != "__expr__":
46
+ raise Invalid("condition is not an expression node")
47
+ model = cond.get("model", {})
48
+ kind = model.get("type")
49
+ if kind == "math":
50
+ match = re.fullmatch(rf"\${re.escape(str(query['refId']))}\s*(<=|>=|<|>)\s*({NUMBER})", str(model.get("expression", "")).strip())
51
+ if not match:
52
+ raise Invalid("unsupported math graph")
53
+ expr = f"({expr}) {match[1]} {match[2]}"
54
+ else:
55
+ conditions = model.get("conditions", [])
56
+ if not isinstance(conditions, list) or len(conditions) != 1:
57
+ raise Invalid("exactly one evaluator is required")
58
+ condition = conditions[0]
59
+ if kind == "classic_conditions":
60
+ if condition.get("query", {}).get("params") != [query["refId"]]:
61
+ raise Invalid("classic condition must consume the query")
62
+ if condition.get("reducer", {}).get("type") != "last":
63
+ raise Invalid("only last reduction is supported")
64
+ elif kind == "threshold":
65
+ reduce = refs.get(model.get("expression"), {}).get("model", {})
66
+ if (reduce.get("type"), reduce.get("reducer"), reduce.get("expression")) != ("reduce", "last", query["refId"]):
67
+ raise Invalid("threshold needs direct reduce-last of query")
68
+ else:
69
+ raise Invalid("unsupported condition type")
70
+ evaluator = condition.get("evaluator", {})
71
+ params = evaluator.get("params", [])
72
+ op = OPS.get(evaluator.get("type"))
73
+ if op is None or len(params) != 1 or isinstance(params[0], bool):
74
+ raise Invalid("unsupported evaluator")
75
+ value = float(params[0])
76
+ if not math.isfinite(value):
77
+ raise Invalid("threshold must be finite")
78
+ # Grafana compares sample values; Prometheus fires on sample presence.
79
+ threshold = str(int(value)) if value.is_integer() else repr(value)
80
+ expr = f"({expr}) {op} {threshold}"
81
+ uid = rule.get("uid")
82
+ if not isinstance(uid, str) or not uid:
83
+ raise Invalid("rule uid is required")
84
+ result = {"alert": uid, "expr": expr}
85
+ for key in ("for", "labels"):
86
+ if key in rule:
87
+ result[key] = rule[key]
88
+ return result
89
+
90
+
91
+ def read_document(path: Path, env_names: list[str]) -> dict[str, Any]:
92
+ if path.stat().st_size > 8 * 1024 * 1024:
93
+ raise Invalid("rule file exceeds 8 MiB")
94
+ text = path.read_text(encoding="utf-8")
95
+ # Expand only allow-listed placeholders, before parsing with the safe loader.
96
+ for name in env_names:
97
+ if not re.fullmatch(r"[A-Za-z_][A-Za-z0-9_]*", name) or name not in os.environ:
98
+ raise Invalid("invalid or unset allow-listed environment variable")
99
+ text = re.sub(r"\$\{" + re.escape(name) + r"\}|\$" + re.escape(name) + r"\b", lambda _: os.environ[name], text)
100
+ try:
101
+ doc = yaml.safe_load(text)
102
+ except yaml.YAMLError as exc:
103
+ raise Invalid(f"invalid YAML in {path}") from exc
104
+ if not isinstance(doc, dict):
105
+ raise Invalid("rule document must be a mapping")
106
+ return doc
107
+
108
+
109
+ def project_files(root: Path, config: dict[str, Any]) -> list[Path]:
110
+ root = root.resolve()
111
+ out = root / config.get("out", "generated")
112
+ if out.is_symlink() or root not in out.resolve().parents:
113
+ raise Invalid("output must be a non-symlink directory strictly inside root")
114
+ if any(p.is_symlink() for p in [out, *out.parents] if p != root and root in p.parents):
115
+ raise Invalid("symlink output ancestry is forbidden")
116
+ out = out.resolve()
117
+ patterns = config.get("rules", [])
118
+ if not isinstance(patterns, list) or not patterns:
119
+ raise Invalid("rules must be a nonempty list of relative globs")
120
+ inputs: set[Path] = set()
121
+ for pattern in patterns:
122
+ if Path(pattern).is_absolute() or ".." in Path(pattern).parts:
123
+ raise Invalid("rule globs must stay inside root")
124
+ inputs.update(root.glob(pattern))
125
+ if not inputs:
126
+ raise Invalid("no rule inputs matched")
127
+ outputs: dict[Path, str] = {}
128
+ for source in sorted(inputs):
129
+ if any(p.is_symlink() for p in [source, *source.parents] if p != root and root in p.parents) or root not in source.resolve().parents or out == source.resolve() or out in source.resolve().parents:
130
+ raise Invalid("input must be outside output and inside root")
131
+ doc = read_document(source, config.get("env", []))
132
+ native = doc.get("kind") == "PrometheusRule"
133
+ groups = doc.get("spec", {}).get("groups") if native else doc.get("groups")
134
+ if not isinstance(groups, list):
135
+ raise Invalid("groups must be a list")
136
+ projected = []
137
+ for group in groups:
138
+ rules = []
139
+ for rule in group.get("rules", []):
140
+ try:
141
+ if native:
142
+ if not rule.get("alert") or not rule.get("expr"):
143
+ raise Invalid("native recording rules are unsupported")
144
+ result = {k: rule[k] for k in ("alert", "expr", "for", "labels") if k in rule}
145
+ else:
146
+ result = project_rule(rule, config.get("datasources", {}))
147
+ rules.append(result)
148
+ except (Invalid, TypeError, ValueError, AttributeError) as exc:
149
+ if config.get("strict", True):
150
+ raise Invalid(f"{source}: {exc}") from exc
151
+ print(f"skipped {rule.get('uid', rule.get('alert', '?'))}: {exc}")
152
+ if rules:
153
+ projected.append({"name": group.get("name", "unnamed"), "rules": rules})
154
+ if projected:
155
+ target = out / source.relative_to(root)
156
+ outputs[target] = HEADER + yaml.safe_dump({"groups": projected}, sort_keys=False)
157
+ if not outputs:
158
+ raise Invalid("no projectable rules")
159
+ # Preflight everything before deleting or writing anything.
160
+ if out.exists():
161
+ for target in out.rglob("*"):
162
+ if target.is_symlink():
163
+ raise Invalid("symlink in output")
164
+ if target in outputs and not target.read_text().startswith(HEADER):
165
+ raise Invalid("refusing to overwrite unowned file")
166
+ for target in list(out.rglob("*")) if out.exists() else []:
167
+ if target.is_file() and target not in outputs and target.read_bytes().startswith(HEADER.encode()):
168
+ target.unlink()
169
+ for target, text in outputs.items():
170
+ target.parent.mkdir(parents=True, exist_ok=True)
171
+ target.write_text(text, encoding="utf-8")
172
+ print(f"projected {len(outputs)} file(s)")
173
+ return sorted(outputs)
@@ -0,0 +1,42 @@
1
+ Metadata-Version: 2.4
2
+ Name: alertshadow
3
+ Version: 0.1.0
4
+ Summary: Offline Prometheus test shadows for Grafana-managed rules
5
+ License-Expression: Apache-2.0
6
+ Requires-Python: >=3.11
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: PyYAML<7,>=6.0.3
10
+ Provides-Extra: test
11
+ Requires-Dist: pytest<10,>=8; extra == "test"
12
+ Dynamic: license-file
13
+
14
+ # alertshadow
15
+
16
+ Test PromQL-backed Grafana-managed provisioning rules offline with Prometheus
17
+ `promtool`. The package projects a disposable **test shadow**, then runs your
18
+ synthetic-series fixtures. Prefer authoring Prometheus-format rules and importing
19
+ them on Grafana 12.1+ where possible; this bridge serves existing native graphs.
20
+
21
+ Python 3.11–3.13. Runtime dependency: PyYAML only. No network, live queries, parser
22
+ subprocess or automatic executable download. Install `promtool` separately to test.
23
+
24
+ ```sh
25
+ python -m pip install --require-hashes -r requirements-ci.txt
26
+ python -m pytest -q
27
+ ruff check alertshadow tests
28
+ mypy --strict alertshadow
29
+ python -m alertshadow project --root examples
30
+ python -m alertshadow test --root examples
31
+ python -m build --no-isolation
32
+ ```
33
+
34
+ The test command requires `promtool` on PATH; end-to-end pytest cases skip cleanly
35
+ when it is absent. CI installs version 2.53.2 and verifies its release checksum.
36
+ After a release, install with `pip install alertshadow`; the console script accepts
37
+ the same arguments as `python -m alertshadow`.
38
+
39
+ See [usage](docs/usage.md), [architecture](docs/architecture.md),
40
+ [contributing](CONTRIBUTING.md), [security](SECURITY.md), [releases](docs/releases.md)
41
+ and [changelog](CHANGELOG.md). Licensed under [Apache-2.0](LICENSE).
42
+ No supported public release yet.
@@ -0,0 +1,10 @@
1
+ alertshadow/__init__.py,sha256=QKzCRI3v09iAekkju82vx8mWYL-wTCpEm0WjH7z_d7A,92
2
+ alertshadow/__main__.py,sha256=k1ocEWawweo1qCJWNFAAvyxz3tcY13dzvCenHszij30,48
3
+ alertshadow/cli.py,sha256=8_ydTcGi4ZUVvcLLbsoCJJKX2CDqAHWdaOqMecyU01g,2704
4
+ alertshadow/core.py,sha256=hY9--Slkg6vod-5Bzti_QH384WeBfyyxWUY2YYR5iCw,8423
5
+ alertshadow-0.1.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
+ alertshadow-0.1.0.dist-info/METADATA,sha256=DBASyqwL9PN_frMExOUth62kb0fOnc4xTQLgRr8cpPY,1686
7
+ alertshadow-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ alertshadow-0.1.0.dist-info/entry_points.txt,sha256=YleQBL7a2Zff-0-GKoOKUUKropOEIPxx0OFuo3OR0Wc,53
9
+ alertshadow-0.1.0.dist-info/top_level.txt,sha256=CZ_hrhD-wzjTowh_P1iKcoy2J8gD_6nhFs_ngk2pbIA,12
10
+ alertshadow-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ alertshadow = alertshadow.cli:main
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1 @@
1
+ alertshadow