baleia-openmetadata 0.1.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.
- baleia_openmetadata-0.1.0/.github/dependabot.yml +25 -0
- baleia_openmetadata-0.1.0/.github/workflows/ci.yml +53 -0
- baleia_openmetadata-0.1.0/.github/workflows/integration.yml +64 -0
- baleia_openmetadata-0.1.0/.github/workflows/release.yml +72 -0
- baleia_openmetadata-0.1.0/.gitignore +12 -0
- baleia_openmetadata-0.1.0/.release-please-config.json +21 -0
- baleia_openmetadata-0.1.0/.release-please-manifest.json +1 -0
- baleia_openmetadata-0.1.0/AGENTS.md +67 -0
- baleia_openmetadata-0.1.0/CHANGELOG.md +34 -0
- baleia_openmetadata-0.1.0/LICENSE +201 -0
- baleia_openmetadata-0.1.0/PKG-INFO +295 -0
- baleia_openmetadata-0.1.0/README.md +268 -0
- baleia_openmetadata-0.1.0/docker/Dockerfile +13 -0
- baleia_openmetadata-0.1.0/pyproject.toml +62 -0
- baleia_openmetadata-0.1.0/scripts/check-image.sh +32 -0
- baleia_openmetadata-0.1.0/scripts/openmetadata.sh +80 -0
- baleia_openmetadata-0.1.0/src/baleia_openmetadata/__init__.py +3 -0
- baleia_openmetadata-0.1.0/src/baleia_openmetadata/client.py +175 -0
- baleia_openmetadata-0.1.0/src/baleia_openmetadata/config.py +129 -0
- baleia_openmetadata-0.1.0/src/baleia_openmetadata/entities.py +150 -0
- baleia_openmetadata-0.1.0/src/baleia_openmetadata/lineage.py +131 -0
- baleia_openmetadata-0.1.0/src/baleia_openmetadata/py.typed +0 -0
- baleia_openmetadata-0.1.0/src/baleia_openmetadata/source.py +295 -0
- baleia_openmetadata-0.1.0/tests/__init__.py +0 -0
- baleia_openmetadata-0.1.0/tests/catalog.py +60 -0
- baleia_openmetadata-0.1.0/tests/conftest.py +67 -0
- baleia_openmetadata-0.1.0/tests/integration/__init__.py +0 -0
- baleia_openmetadata-0.1.0/tests/integration/conftest.py +105 -0
- baleia_openmetadata-0.1.0/tests/integration/test_openmetadata.py +175 -0
- baleia_openmetadata-0.1.0/tests/test_client.py +146 -0
- baleia_openmetadata-0.1.0/tests/test_config.py +53 -0
- baleia_openmetadata-0.1.0/tests/test_entities.py +78 -0
- baleia_openmetadata-0.1.0/tests/test_lineage.py +119 -0
- baleia_openmetadata-0.1.0/tests/test_source.py +285 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# One grouped pull request per ecosystem and month keeps dependency updates in
|
|
2
|
+
# step with the one-PR-at-a-time flow (AGENTS.md).
|
|
3
|
+
version: 2
|
|
4
|
+
updates:
|
|
5
|
+
- package-ecosystem: github-actions
|
|
6
|
+
directory: /
|
|
7
|
+
schedule:
|
|
8
|
+
interval: monthly
|
|
9
|
+
groups:
|
|
10
|
+
actions:
|
|
11
|
+
patterns: ["*"]
|
|
12
|
+
commit-message:
|
|
13
|
+
prefix: chore
|
|
14
|
+
include: scope
|
|
15
|
+
|
|
16
|
+
- package-ecosystem: uv
|
|
17
|
+
directory: /
|
|
18
|
+
schedule:
|
|
19
|
+
interval: monthly
|
|
20
|
+
groups:
|
|
21
|
+
python:
|
|
22
|
+
patterns: ["*"]
|
|
23
|
+
commit-message:
|
|
24
|
+
prefix: chore
|
|
25
|
+
include: scope
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ci-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
name: Lint
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v7
|
|
21
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
22
|
+
- run: uv run --only-group lint ruff check .
|
|
23
|
+
- run: uv run --only-group lint ruff format --check .
|
|
24
|
+
|
|
25
|
+
test:
|
|
26
|
+
# The connector runs inside OpenMetadata's ingestion image, so it is tested
|
|
27
|
+
# against each supported openmetadata-ingestion release, not a range.
|
|
28
|
+
name: Test (Python ${{ matrix.python }}, OpenMetadata ${{ matrix.openmetadata }})
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
strategy:
|
|
31
|
+
fail-fast: false
|
|
32
|
+
matrix:
|
|
33
|
+
python: ["3.11", "3.12", "3.13", "3.14"]
|
|
34
|
+
openmetadata: ["2.0.9.0", "2.1.0.2"]
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v7
|
|
37
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
38
|
+
with:
|
|
39
|
+
python-version: ${{ matrix.python }}
|
|
40
|
+
- name: Install
|
|
41
|
+
run: |
|
|
42
|
+
uv venv
|
|
43
|
+
uv pip install -e . "openmetadata-ingestion==${{ matrix.openmetadata }}" --group test
|
|
44
|
+
- run: uv run --no-sync pytest
|
|
45
|
+
|
|
46
|
+
build:
|
|
47
|
+
name: Build
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/checkout@v7
|
|
51
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
52
|
+
- run: uv build
|
|
53
|
+
- run: uvx twine check --strict dist/*
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Integration
|
|
2
|
+
|
|
3
|
+
# The connector against real OpenMetadata servers (#5): each supported release
|
|
4
|
+
# is started from its pinned quickstart, and the suite runs the ingestion
|
|
5
|
+
# workflow three times against a stand-in for Baleia's BI gateway. A second job
|
|
6
|
+
# installs the wheel into each official ingestion image (#6). Heavyweight, so
|
|
7
|
+
# it runs nightly and on demand, not on every pull request.
|
|
8
|
+
on:
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: "0 6 * * *"
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
openmetadata:
|
|
18
|
+
name: OpenMetadata ${{ matrix.server }}
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
timeout-minutes: 45
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
include:
|
|
25
|
+
- server: "2.0.9"
|
|
26
|
+
ingestion: "2.0.9.0"
|
|
27
|
+
- server: "2.1.0"
|
|
28
|
+
ingestion: "2.1.0.2"
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v7
|
|
31
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
32
|
+
with:
|
|
33
|
+
python-version: "3.12"
|
|
34
|
+
- name: Start OpenMetadata ${{ matrix.server }}
|
|
35
|
+
run: echo "OPENMETADATA_URL=$(scripts/openmetadata.sh up ${{ matrix.server }})" >> "$GITHUB_ENV"
|
|
36
|
+
- name: Install
|
|
37
|
+
run: |
|
|
38
|
+
uv venv
|
|
39
|
+
uv pip install -e . "openmetadata-ingestion==${{ matrix.ingestion }}" --group test
|
|
40
|
+
- name: Integration suite
|
|
41
|
+
run: uv run --no-sync pytest tests/integration -v
|
|
42
|
+
- name: OpenMetadata logs on failure
|
|
43
|
+
if: failure()
|
|
44
|
+
run: docker compose -p baleia-om-it-$(echo ${{ matrix.server }} | tr . -) logs --tail=200 openmetadata-server || true
|
|
45
|
+
- name: Stop OpenMetadata
|
|
46
|
+
if: always()
|
|
47
|
+
run: scripts/openmetadata.sh down ${{ matrix.server }}
|
|
48
|
+
|
|
49
|
+
image:
|
|
50
|
+
name: Ingestion image ${{ matrix.server }}
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
timeout-minutes: 30
|
|
53
|
+
strategy:
|
|
54
|
+
fail-fast: false
|
|
55
|
+
matrix:
|
|
56
|
+
server: ["2.0.9", "2.1.0"]
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@v7
|
|
59
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
60
|
+
# The ingestion image is 7 to 8 GB; the runner needs the room.
|
|
61
|
+
- name: Free disk space
|
|
62
|
+
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
|
|
63
|
+
- name: Install the connector into the official ingestion image
|
|
64
|
+
run: scripts/check-image.sh ${{ matrix.server }}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# A release is cut only from a commit whose CI passed on main. Publishing uses
|
|
4
|
+
# PyPI Trusted Publishing (OIDC): no API token is stored in this repository.
|
|
5
|
+
on:
|
|
6
|
+
workflow_run:
|
|
7
|
+
workflows: [CI]
|
|
8
|
+
types: [completed]
|
|
9
|
+
branches: [main]
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
tag:
|
|
13
|
+
description: "Existing release tag to (re)publish, e.g. v0.1.0"
|
|
14
|
+
required: true
|
|
15
|
+
type: string
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
release-please:
|
|
22
|
+
if: >-
|
|
23
|
+
${{ github.event_name == 'workflow_run'
|
|
24
|
+
&& github.event.workflow_run.event == 'push'
|
|
25
|
+
&& github.event.workflow_run.conclusion == 'success' }}
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
permissions:
|
|
28
|
+
contents: write
|
|
29
|
+
pull-requests: write
|
|
30
|
+
outputs:
|
|
31
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
32
|
+
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
33
|
+
steps:
|
|
34
|
+
- uses: googleapis/release-please-action@v5
|
|
35
|
+
id: release
|
|
36
|
+
with:
|
|
37
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
38
|
+
config-file: .release-please-config.json
|
|
39
|
+
manifest-file: .release-please-manifest.json
|
|
40
|
+
|
|
41
|
+
build:
|
|
42
|
+
needs: release-please
|
|
43
|
+
if: ${{ always() && (github.event_name == 'workflow_dispatch' || needs.release-please.outputs.release_created == 'true') }}
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v7
|
|
47
|
+
with:
|
|
48
|
+
ref: ${{ inputs.tag || needs.release-please.outputs.tag_name }}
|
|
49
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
50
|
+
- run: uv build
|
|
51
|
+
- run: uvx twine check --strict dist/*
|
|
52
|
+
- uses: actions/upload-artifact@v7
|
|
53
|
+
with:
|
|
54
|
+
name: dist
|
|
55
|
+
path: dist/
|
|
56
|
+
if-no-files-found: error
|
|
57
|
+
|
|
58
|
+
publish:
|
|
59
|
+
needs: build
|
|
60
|
+
if: ${{ always() && needs.build.result == 'success' }}
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
environment:
|
|
63
|
+
name: pypi
|
|
64
|
+
url: https://pypi.org/project/baleia-openmetadata/
|
|
65
|
+
permissions:
|
|
66
|
+
id-token: write
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/download-artifact@v8
|
|
69
|
+
with:
|
|
70
|
+
name: dist
|
|
71
|
+
path: dist/
|
|
72
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
|
|
3
|
+
"packages": {
|
|
4
|
+
".": {
|
|
5
|
+
"release-type": "python",
|
|
6
|
+
"package-name": "baleia-openmetadata",
|
|
7
|
+
"initial-version": "0.1.0",
|
|
8
|
+
"bump-minor-pre-major": true,
|
|
9
|
+
"extra-files": ["src/baleia_openmetadata/__init__.py"]
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"changelog-sections": [
|
|
13
|
+
{ "type": "feat", "section": "Features" },
|
|
14
|
+
{ "type": "fix", "section": "Bug Fixes" },
|
|
15
|
+
{ "type": "docs", "section": "Documentation" },
|
|
16
|
+
{ "type": "chore", "section": "Miscellaneous" },
|
|
17
|
+
{ "type": "refactor", "section": "Miscellaneous" },
|
|
18
|
+
{ "type": "perf", "section": "Miscellaneous" },
|
|
19
|
+
{ "type": "test", "section": "Miscellaneous" }
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{".":"0.1.0"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Guidance for agents and contributors working in this repository.
|
|
4
|
+
|
|
5
|
+
## Scope
|
|
6
|
+
|
|
7
|
+
This package is an OpenMetadata ingestion connector for Baleia's semantic
|
|
8
|
+
catalog. It runs inside OpenMetadata's ingestion framework and only reads from
|
|
9
|
+
Baleia's semantic catalog API. Physical metadata belongs to OpenMetadata's stock
|
|
10
|
+
Trino connector through Baleia's BI gateway; never duplicate it here.
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
| Command | What it does |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `uv venv && uv pip install -e ".[ingestion]" --group test --group lint` | Set up a development environment. |
|
|
17
|
+
| `uv run --no-sync pytest` | Run the tests. |
|
|
18
|
+
| `uv run --no-sync ruff check .` | Lint. |
|
|
19
|
+
| `uv run --no-sync ruff format --check .` | Check formatting. |
|
|
20
|
+
| `uv build && uvx twine check --strict dist/*` | Build and check the distribution. |
|
|
21
|
+
| `OPENMETADATA_URL="$(scripts/openmetadata.sh up 2.1.0)" uv run --no-sync pytest tests/integration` | Integration suite against a real OpenMetadata (match `openmetadata-ingestion` to the server; `scripts/openmetadata.sh down 2.1.0` afterwards). Nightly in the `Integration` workflow. |
|
|
22
|
+
|
|
23
|
+
Definition of done: lint, format check, tests and build pass. CI runs the
|
|
24
|
+
tests against every supported `openmetadata-ingestion` release (2.0.x and
|
|
25
|
+
2.1.x) on Python 3.11, 3.12, 3.13 and 3.14.
|
|
26
|
+
|
|
27
|
+
The Python range follows OpenMetadata, because the connector runs in its
|
|
28
|
+
ingestion environment: the version in OpenMetadata's official ingestion images
|
|
29
|
+
(3.12 today) is always tested, versions past their end of life are dropped, and
|
|
30
|
+
newer versions are added when `openmetadata-ingestion` installs and the tests
|
|
31
|
+
pass on them. When OpenMetadata changes its images or its tested range, update
|
|
32
|
+
the CI matrix, `requires-python`, the classifiers, ruff's `target-version` and
|
|
33
|
+
the README compatibility table together.
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
|
|
37
|
+
- `openmetadata-ingestion` is never a runtime dependency (see `pyproject.toml`).
|
|
38
|
+
Code must work with every supported release; branch on capabilities, not on
|
|
39
|
+
version strings, when releases differ.
|
|
40
|
+
- The BI key is a password credential. Never log it, never put it in an entity
|
|
41
|
+
description or URL, and treat it as a secret in the connection configuration.
|
|
42
|
+
- One bad Baleia item never aborts a run: yield `Either(left=StackTraceError(...))`
|
|
43
|
+
for it and continue.
|
|
44
|
+
- Deleted Baleia items are soft-deleted in OpenMetadata, never hard-deleted.
|
|
45
|
+
|
|
46
|
+
## Pull requests
|
|
47
|
+
|
|
48
|
+
Work is sequential: one PR at a time, from the latest `main`, until it is merged.
|
|
49
|
+
|
|
50
|
+
1. Write every PR, issue, comment, commit message, code comment and doc in
|
|
51
|
+
English.
|
|
52
|
+
2. Run the definition of done before opening the PR, and reference the issues
|
|
53
|
+
it closes with `Closes #<issue>`.
|
|
54
|
+
3. Trigger CodeRabbit with a `@coderabbitai review` comment. Read every finding,
|
|
55
|
+
fix the valid ones, and resolve each fixed thread.
|
|
56
|
+
4. Merge with a merge commit only: `gh pr merge <n> --merge --delete-branch`.
|
|
57
|
+
5. After merging, switch to `main`, `git pull --ff-only`, and check that every
|
|
58
|
+
`Closes` issue is closed.
|
|
59
|
+
|
|
60
|
+
### Titles, commits and the changelog
|
|
61
|
+
|
|
62
|
+
release-please builds `CHANGELOG.md` from the commits on `main`.
|
|
63
|
+
|
|
64
|
+
- Every commit is atomic and conventional: `type(scope): subject`.
|
|
65
|
+
- The PR title is a plain sentence, not a conventional commit.
|
|
66
|
+
- No two commits of a PR share a subject, and none repeats the PR title. Fold
|
|
67
|
+
fixups into the commit they fix before merging.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2026-11-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **client:** read Baleia's semantic catalog routes ([df47088](https://github.com/maltzsama/baleia-openmetadata/commit/df4708810f7a7a3df23d319e86657b26403c7455))
|
|
9
|
+
* **config:** validate the Baleia connection options ([4044f90](https://github.com/maltzsama/baleia-openmetadata/commit/4044f904f502b6d40bcbb9e64ab940519d766362))
|
|
10
|
+
* **entities:** map Baleia models and metrics to OpenMetadata requests ([702108f](https://github.com/maltzsama/baleia-openmetadata/commit/702108fd74eacedfbbf83254143ed03588d04e9b))
|
|
11
|
+
* **lineage:** resolve Baleia source tables and mark owned edges ([534702b](https://github.com/maltzsama/baleia-openmetadata/commit/534702b3cf0c0a8cb6ef47197bfd379c9cc71df7))
|
|
12
|
+
* **source:** ingest data models and metrics ([34e274e](https://github.com/maltzsama/baleia-openmetadata/commit/34e274e6e866b908294feacbc609c9f196d1d5c5))
|
|
13
|
+
* **source:** link the catalog to its tables and soft-delete removed items ([28961c8](https://github.com/maltzsama/baleia-openmetadata/commit/28961c821086881b09ff08548c87edd9d0e58a4d))
|
|
14
|
+
* **source:** register the Baleia custom dashboard source ([a358c5c](https://github.com/maltzsama/baleia-openmetadata/commit/a358c5c6f283a50b9af54d82c77ae0b003de8017))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **ci:** drop end-of-life Python 3.10 and test 3.11 to 3.14 ([1e7d048](https://github.com/maltzsama/baleia-openmetadata/commit/1e7d048c75d06ecfc57d02a4a055bb1301ea1238))
|
|
20
|
+
* **ci:** pin setup-uv to a released version tag ([25380d8](https://github.com/maltzsama/baleia-openmetadata/commit/25380d8512874a118ef1e4b5ee475b7cdf8a4a8a))
|
|
21
|
+
* **ci:** test on Python 3.12, the version in OpenMetadata's images ([2a24f27](https://github.com/maltzsama/baleia-openmetadata/commit/2a24f27d0f6d5e749543a8f2d2f8c065e5a7d96c))
|
|
22
|
+
* **lineage:** forget deleted edges in the OpenMetadata client cache ([9bd6b6e](https://github.com/maltzsama/baleia-openmetadata/commit/9bd6b6ee314fef097622a7ff55d7ec864411dc2d))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Documentation
|
|
26
|
+
|
|
27
|
+
* prepare the README for the first release ([0fdcfd4](https://github.com/maltzsama/baleia-openmetadata/commit/0fdcfd4a976427f4b7d2c4bccb8d31688155c9eb))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Miscellaneous
|
|
31
|
+
|
|
32
|
+
* bootstrap the connector repository ([1382917](https://github.com/maltzsama/baleia-openmetadata/commit/1382917e131d4c2071ed548ae496258dc2a3a6d3))
|
|
33
|
+
* disable the OpenMetadata 2.0 pytest plugin ([309b951](https://github.com/maltzsama/baleia-openmetadata/commit/309b9517759db965c95e2485c9532559be99eb52))
|
|
34
|
+
* **integration:** run the connector against real OpenMetadata servers ([994a1c7](https://github.com/maltzsama/baleia-openmetadata/commit/994a1c7106ffb32918298dd8156fbc78b8d7761a))
|
|
@@ -0,0 +1,201 @@
|
|
|
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
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|