hyrum 0.0.0__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.
- hyrum-0.0.0/.github/dependabot.yaml +18 -0
- hyrum-0.0.0/.github/workflows/ci.yaml +61 -0
- hyrum-0.0.0/.github/workflows/publish.yaml +43 -0
- hyrum-0.0.0/.github/workflows/zizmor.yaml +21 -0
- hyrum-0.0.0/.github/zizmor.yml +10 -0
- hyrum-0.0.0/.gitignore +31 -0
- hyrum-0.0.0/.pre-commit-config.yaml +54 -0
- hyrum-0.0.0/AGENTS.md +76 -0
- hyrum-0.0.0/CLAUDE.md +1 -0
- hyrum-0.0.0/CONTRIBUTING.md +50 -0
- hyrum-0.0.0/LICENSE.txt +202 -0
- hyrum-0.0.0/PKG-INFO +224 -0
- hyrum-0.0.0/README.md +8 -0
- hyrum-0.0.0/SECURITY.md +35 -0
- hyrum-0.0.0/pyproject.toml +30 -0
- hyrum-0.0.0/src/hyrum/__init__.py +3 -0
- hyrum-0.0.0/src/hyrum/__main__.py +6 -0
- hyrum-0.0.0/src/hyrum/cli.py +9 -0
- hyrum-0.0.0/tox.ini +42 -0
- hyrum-0.0.0/uv.lock +407 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "github-actions"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "monthly" # This is hard-coded to the 1st of the month
|
|
7
|
+
labels:
|
|
8
|
+
- "dependencies"
|
|
9
|
+
cooldown:
|
|
10
|
+
default-days: 7
|
|
11
|
+
- package-ecosystem: "uv"
|
|
12
|
+
directory: "/"
|
|
13
|
+
schedule:
|
|
14
|
+
interval: "monthly"
|
|
15
|
+
labels:
|
|
16
|
+
- "dependencies"
|
|
17
|
+
cooldown:
|
|
18
|
+
default-days: 7
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["**"]
|
|
8
|
+
|
|
9
|
+
permissions: {}
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
name: lint
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
with:
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
26
|
+
with:
|
|
27
|
+
enable-cache: true
|
|
28
|
+
- run: uvx --with tox-uv tox -e lint
|
|
29
|
+
|
|
30
|
+
static:
|
|
31
|
+
name: static (pyright)
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
permissions:
|
|
34
|
+
contents: read
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
with:
|
|
38
|
+
persist-credentials: false
|
|
39
|
+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
40
|
+
with:
|
|
41
|
+
enable-cache: true
|
|
42
|
+
- run: uvx --with tox-uv tox -e static
|
|
43
|
+
|
|
44
|
+
unit:
|
|
45
|
+
name: unit (py${{ matrix.python }})
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
permissions:
|
|
48
|
+
contents: read
|
|
49
|
+
strategy:
|
|
50
|
+
fail-fast: false
|
|
51
|
+
matrix:
|
|
52
|
+
python: ["3.11", "3.12", "3.13"]
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
with:
|
|
56
|
+
persist-credentials: false
|
|
57
|
+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
58
|
+
with:
|
|
59
|
+
enable-cache: true
|
|
60
|
+
- run: uv python install ${{ matrix.python }}
|
|
61
|
+
- run: uvx --with tox-uv --python ${{ matrix.python }} tox -e unit
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ['v*']
|
|
6
|
+
|
|
7
|
+
permissions: {}
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
name: Build distribution
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
20
|
+
with:
|
|
21
|
+
enable-cache: false
|
|
22
|
+
- run: uv build
|
|
23
|
+
- uses: actions/upload-artifact@v4
|
|
24
|
+
with:
|
|
25
|
+
name: dist
|
|
26
|
+
path: dist/
|
|
27
|
+
if-no-files-found: error
|
|
28
|
+
|
|
29
|
+
publish:
|
|
30
|
+
name: Publish to PyPI (trusted publishing)
|
|
31
|
+
needs: build
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
environment:
|
|
34
|
+
name: publish-pypi
|
|
35
|
+
url: https://pypi.org/p/hyrum
|
|
36
|
+
permissions:
|
|
37
|
+
id-token: write
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/download-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
name: dist
|
|
42
|
+
path: dist/
|
|
43
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Caller for the canonical/charm-tech reusable zizmor workflow.
|
|
2
|
+
#
|
|
3
|
+
# Pinned to a commit SHA, not @main, so a change in canonical/charm-tech can't
|
|
4
|
+
# silently alter this repo's CI. The pinned SHA below points at the tip of
|
|
5
|
+
# canonical/charm-tech PR #2 (initial-scaffolding) — once that PR squash-merges
|
|
6
|
+
# to main, retarget to the resulting commit on main.
|
|
7
|
+
name: Workflow static checks
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
push:
|
|
11
|
+
branches: ["main"]
|
|
12
|
+
pull_request:
|
|
13
|
+
branches: ["**"]
|
|
14
|
+
|
|
15
|
+
permissions: {}
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
zizmor:
|
|
19
|
+
uses: canonical/charm-tech/.github/workflows/zizmor.yaml@98bbae0fc022a7da50f9b3fcc02b54a87de26d42 # PR #2 tip
|
|
20
|
+
permissions:
|
|
21
|
+
security-events: write
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# zizmor policy for hyrum. The team convention (per the canonical/charm-tech
|
|
2
|
+
# estate audit) is: SHA-pin all third-party actions, and accept ref pins only
|
|
3
|
+
# for actions owned by GitHub or PyPA.
|
|
4
|
+
rules:
|
|
5
|
+
unpinned-uses:
|
|
6
|
+
config:
|
|
7
|
+
policies:
|
|
8
|
+
"actions/*": ref-pin
|
|
9
|
+
"github/*": ref-pin
|
|
10
|
+
"pypa/*": ref-pin
|
hyrum-0.0.0/.gitignore
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
|
|
11
|
+
# Tooling
|
|
12
|
+
.ruff_cache/
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.mypy_cache/
|
|
15
|
+
.tox/
|
|
16
|
+
.coverage
|
|
17
|
+
coverage.xml
|
|
18
|
+
htmlcov/
|
|
19
|
+
|
|
20
|
+
# Editors
|
|
21
|
+
.idea/
|
|
22
|
+
.vscode/
|
|
23
|
+
*.swp
|
|
24
|
+
.DS_Store
|
|
25
|
+
|
|
26
|
+
# Tool output
|
|
27
|
+
.hyrum-logs/
|
|
28
|
+
results-*.json
|
|
29
|
+
|
|
30
|
+
# uv
|
|
31
|
+
.python-version
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Pre-commit config aligned with canonical/charm-tech templates/pre-commit-config.yaml.
|
|
2
|
+
# ruff, codespell, and zizmor are local hooks run via uv so they use the same
|
|
3
|
+
# versions as CI and manual `tox -e lint` runs.
|
|
4
|
+
repos:
|
|
5
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
6
|
+
rev: v5.0.0
|
|
7
|
+
hooks:
|
|
8
|
+
- id: check-added-large-files
|
|
9
|
+
- id: check-ast
|
|
10
|
+
- id: check-case-conflict
|
|
11
|
+
- id: check-executables-have-shebangs
|
|
12
|
+
- id: check-shebang-scripts-are-executable
|
|
13
|
+
- id: check-merge-conflict
|
|
14
|
+
- id: check-symlinks
|
|
15
|
+
- id: check-json
|
|
16
|
+
- id: check-yaml
|
|
17
|
+
- id: check-toml
|
|
18
|
+
- id: mixed-line-ending
|
|
19
|
+
- id: end-of-file-fixer
|
|
20
|
+
- id: trailing-whitespace
|
|
21
|
+
- id: detect-private-key
|
|
22
|
+
- repo: local
|
|
23
|
+
hooks:
|
|
24
|
+
- id: ruff-check
|
|
25
|
+
name: ruff check
|
|
26
|
+
description: "Run 'ruff check' for extremely fast Python linting"
|
|
27
|
+
entry: uv run ruff check --preview --force-exclude
|
|
28
|
+
language: system
|
|
29
|
+
types_or: [python, pyi, jupyter]
|
|
30
|
+
require_serial: true
|
|
31
|
+
- id: ruff-format
|
|
32
|
+
name: ruff format
|
|
33
|
+
description: "Run 'ruff format' for extremely fast Python formatting"
|
|
34
|
+
entry: uv run ruff format --preview --force-exclude
|
|
35
|
+
language: system
|
|
36
|
+
types_or: [python, pyi, jupyter]
|
|
37
|
+
require_serial: true
|
|
38
|
+
- id: zizmor
|
|
39
|
+
name: zizmor
|
|
40
|
+
description: "Find security issues in GitHub Actions CI/CD setups"
|
|
41
|
+
language: system
|
|
42
|
+
types: [yaml]
|
|
43
|
+
files: (\.github/workflows/.*)|(action\.ya?ml)$
|
|
44
|
+
require_serial: true
|
|
45
|
+
entry: uv run zizmor
|
|
46
|
+
args:
|
|
47
|
+
- "--no-progress"
|
|
48
|
+
- id: codespell
|
|
49
|
+
name: codespell
|
|
50
|
+
description: Checks for common misspellings in text files.
|
|
51
|
+
entry: uv run codespell
|
|
52
|
+
language: system
|
|
53
|
+
types: [text]
|
|
54
|
+
require_serial: true
|
hyrum-0.0.0/AGENTS.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to AI agents when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
`hyrum` bulk-runs a check (typically lint or unit tests) across many charm
|
|
8
|
+
repositories, optionally swapping out one of their dependencies first — for
|
|
9
|
+
example, pointing every charm's `ops` dependency at a development branch of
|
|
10
|
+
the [operator](https://github.com/canonical/operator) repo to see which charms
|
|
11
|
+
it breaks. The runner backend is either `tox` or `make`, auto-detected per
|
|
12
|
+
charm.
|
|
13
|
+
|
|
14
|
+
Named for [Hyrum's law](https://www.hyrumslaw.com/): the tool exists to
|
|
15
|
+
surface the consumers who depend on observable behaviour of an upstream
|
|
16
|
+
dependency before that behaviour changes.
|
|
17
|
+
|
|
18
|
+
## Common Commands
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
tox -e lint # ruff check + ruff format --check + codespell
|
|
22
|
+
tox -e static # pyright (strict)
|
|
23
|
+
tox -e unit # pytest with coverage
|
|
24
|
+
tox -e format # apply ruff formatting
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`uv` is the dependency manager (see `pyproject.toml`'s `[dependency-groups]`).
|
|
28
|
+
Pre-commit hooks mirror the CI checks; install them with `pre-commit install`.
|
|
29
|
+
|
|
30
|
+
## Code and Documentation Style
|
|
31
|
+
|
|
32
|
+
This project follows the Charm Tech team style guides. Read them if more
|
|
33
|
+
clarification is required:
|
|
34
|
+
|
|
35
|
+
- [Documentation and docstring style](https://github.com/canonical/charm-tech/blob/main/STYLE.md)
|
|
36
|
+
- [Python style](https://github.com/canonical/charm-tech/blob/main/python/STYLE.md)
|
|
37
|
+
|
|
38
|
+
Ensure that `pre-commit` is installed (with the user's permission) so that
|
|
39
|
+
style is enforced with every commit. If the user does not permit using
|
|
40
|
+
`pre-commit`, *always* ensure `tox -e lint,static,unit` shows no issues
|
|
41
|
+
before committing.
|
|
42
|
+
|
|
43
|
+
Avoid writing prose documentation: that is a task for humans. When reviewing
|
|
44
|
+
documentation, pay particular attention to consistency with the style guides
|
|
45
|
+
above.
|
|
46
|
+
|
|
47
|
+
## Architecture
|
|
48
|
+
|
|
49
|
+
- Entry point: `hyrum.cli:main` (a single Click command).
|
|
50
|
+
- `enumerate` / `filters` / `frameworks` / `config` — repo selection. Charm
|
|
51
|
+
collection curation is **out of scope**; the tool expects a pre-populated
|
|
52
|
+
cache folder.
|
|
53
|
+
- `patchers/` — `Patcher` protocol, `NullPatcher`, `PatcherStack`,
|
|
54
|
+
`OpsSourcePatcher`. The protocol is deliberately narrow so a future
|
|
55
|
+
charm-library patcher (vendored `lib/charms/…/v<n>/<file>.py` swapped from a
|
|
56
|
+
git source) can slot in without changes elsewhere.
|
|
57
|
+
- `runners/` — `ToxRunner`, `MakeRunner`, `auto()` per-charm with fallback.
|
|
58
|
+
GNU make's missing-target ambiguity is handled by probing with
|
|
59
|
+
`make -nq` and falling back to stderr inspection.
|
|
60
|
+
- `pool` — async worker pool, `Outcome` dataclass with `patcher_error` as a
|
|
61
|
+
status distinct from `failed` (so infrastructure problems don't get
|
|
62
|
+
mis-attributed to the charm).
|
|
63
|
+
- `report` — Rich tally + verbose offender lists.
|
|
64
|
+
|
|
65
|
+
Scope during the 26.10 cycle is **lint and unit tests only**. Do not add
|
|
66
|
+
integration-test support.
|
|
67
|
+
|
|
68
|
+
## Testing
|
|
69
|
+
|
|
70
|
+
- Unit tests live in `tests/` and follow the layout of `src/hyrum/`.
|
|
71
|
+
- Subprocess-driven runners are tested with a `FakeProc` / `FakeSpawner`
|
|
72
|
+
pair (see `tests/test_runners.py`) that monkeypatches
|
|
73
|
+
`asyncio.create_subprocess_exec` — no real subprocesses are spawned in
|
|
74
|
+
the unit suite.
|
|
75
|
+
- The ops-source patcher's lockfile regeneration is monkeypatched out (the
|
|
76
|
+
`_run_lock` helper) so unit tests don't spawn `poetry` / `uv`.
|
hyrum-0.0.0/CLAUDE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
AGENTS.md
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
We welcome contributions to hyrum!
|
|
2
|
+
|
|
3
|
+
Before working on changes, please consider [opening an issue](https://github.com/canonical/hyrum/issues) explaining your use case. If you would like to chat with us about your use cases or proposed implementation, you can reach us at [Matrix](https://matrix.to/#/#charmhub-charmdev:ubuntu.com) or [Discourse](https://discourse.charmhub.io/).
|
|
4
|
+
|
|
5
|
+
# Pull requests
|
|
6
|
+
|
|
7
|
+
Changes are proposed as [pull requests on GitHub](https://github.com/canonical/hyrum/pulls).
|
|
8
|
+
|
|
9
|
+
Pull requests should have a short title that follows the [conventional commit style](https://www.conventionalcommits.org/en/) using one of these types:
|
|
10
|
+
|
|
11
|
+
- chore
|
|
12
|
+
- ci
|
|
13
|
+
- docs
|
|
14
|
+
- feat
|
|
15
|
+
- fix
|
|
16
|
+
- perf
|
|
17
|
+
- refactor
|
|
18
|
+
- revert
|
|
19
|
+
- test
|
|
20
|
+
|
|
21
|
+
Some examples:
|
|
22
|
+
|
|
23
|
+
- feat: add a `make` runner alongside the existing `tox` one
|
|
24
|
+
- fix: restore poetry.lock when patching is aborted by Ctrl-C
|
|
25
|
+
- docs: clarify how `--ops-source-branch` interacts with charm extras
|
|
26
|
+
|
|
27
|
+
We consider this project too small to use scopes, so we don't use them.
|
|
28
|
+
|
|
29
|
+
Note that the commit messages to the PR's branch do not need to follow the conventional commit format, as these will be squashed into a single commit to `main` using the PR title as the commit message.
|
|
30
|
+
|
|
31
|
+
To help us review your changes, please rebase your pull request onto the `main` branch before you request a review. If you need to bring in the latest changes from `main` after the review has started, please use a merge commit.
|
|
32
|
+
|
|
33
|
+
# Tests
|
|
34
|
+
|
|
35
|
+
Changes should include tests. Run them locally with:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
tox -e lint,static,unit
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`unit` is the canonical unit test environment; `lint` covers `ruff check`, `ruff format --check`, and `codespell`; `static` runs `pyright` in strict mode.
|
|
42
|
+
|
|
43
|
+
# Coding style
|
|
44
|
+
|
|
45
|
+
We follow the Charm Tech team style guides:
|
|
46
|
+
|
|
47
|
+
- [Documentation and docstring style](https://github.com/canonical/charm-tech/blob/main/STYLE.md)
|
|
48
|
+
- [Python style](https://github.com/canonical/charm-tech/blob/main/python/STYLE.md)
|
|
49
|
+
|
|
50
|
+
Most of this is enforced by CI checks.
|
hyrum-0.0.0/LICENSE.txt
ADDED
|
@@ -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.
|