bluecore-graph-toolbox 2.0.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,8 @@
1
+ """Blue Core Graph Toolbox, packaged as an Airflow 3 plugin."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ try:
6
+ __version__ = version("bluecore-graph-toolbox")
7
+ except PackageNotFoundError:
8
+ __version__ = "0.0.0+unknown"
@@ -0,0 +1,100 @@
1
+ """Blue Core Graph Toolbox, served as an Airflow 3 plugin.
2
+
3
+ The plugin registers two things with Airflow:
4
+
5
+ 1. A FastAPI application mounted into the Airflow API server at
6
+ ``/graph-toolbox``, so its routes share Airflow's authentication.
7
+ 2. An external view that adds a "Toolbox" item to the Airflow navigation.
8
+ Because it supplies a ``url_route``, the Airflow UI renders the page in an
9
+ iframe at ``/plugin/graph-toolbox``.
10
+
11
+ Routes, relative to the prefix:
12
+
13
+ - ``GET /``: landing page (signed in)
14
+ - ``GET /health``: ``{"status", "version"}`` (public)
15
+ - ``/static/*`` and ``/static/bluecore/*``: assets (public)
16
+
17
+ Toolbox screens are built out in graph-toolbox #43 and #45-47.
18
+ """
19
+
20
+ from __future__ import annotations
21
+
22
+ import pathlib
23
+
24
+ import bluecore_airflow_common as common
25
+ from airflow.api_fastapi.core_api.security import GetUserDep
26
+ from airflow.plugins_manager import AirflowPlugin
27
+ from fastapi import APIRouter, Depends, FastAPI, Request
28
+ from fastapi.responses import HTMLResponse
29
+
30
+ from bluecore_graph_toolbox import __version__
31
+
32
+ PLUGIN_NAME = "bluecore_graph_toolbox"
33
+ TITLE = "Blue Core Graph Toolbox"
34
+
35
+ # The Airflow nav truncates long labels, so the nav item has its own short name.
36
+ NAV_LABEL = "Toolbox"
37
+
38
+ # Where the FastAPI app is mounted on the Airflow API server, and the path the
39
+ # Airflow UI uses for the iframe that wraps it. The route must be unique across
40
+ # plugins, or Airflow drops the view.
41
+ URL_PREFIX = "/graph-toolbox"
42
+ URL_ROUTE = "graph-toolbox"
43
+
44
+ PACKAGE_DIR = pathlib.Path(__file__).parent
45
+ STATIC_DIR = PACKAGE_DIR / "static"
46
+ TEMPLATES_DIR = PACKAGE_DIR / "templates"
47
+
48
+ app = FastAPI(title=TITLE, docs_url=None, redoc_url=None, openapi_url=None)
49
+ common.mount_static(app, STATIC_DIR)
50
+ templates = common.templates(TEMPLATES_DIR)
51
+
52
+ # Everything on this router needs a signed-in user, so screens added later are
53
+ # protected without each route having to remember to ask.
54
+ pages = APIRouter(dependencies=[Depends(common.requires_login)])
55
+
56
+
57
+ @pages.get("/", response_class=HTMLResponse)
58
+ def index(request: Request, user: GetUserDep) -> HTMLResponse:
59
+ """Render the landing page."""
60
+ return templates.TemplateResponse(
61
+ request=request,
62
+ name="index.html",
63
+ context=common.context(
64
+ URL_PREFIX, title=TITLE, username=user.get_name(), version=__version__
65
+ ),
66
+ )
67
+
68
+
69
+ @app.get("/health")
70
+ def health() -> dict[str, str]:
71
+ """Report that the plugin is loaded. Public, so it carries nothing sensitive."""
72
+ return {"status": "ok", "version": __version__}
73
+
74
+
75
+ app.include_router(pages)
76
+
77
+
78
+ class GraphToolboxPlugin(AirflowPlugin):
79
+ name = PLUGIN_NAME
80
+
81
+ fastapi_apps = [ # noqa: RUF012
82
+ {
83
+ "app": app,
84
+ "url_prefix": URL_PREFIX,
85
+ "name": TITLE,
86
+ }
87
+ ]
88
+
89
+ external_views = [ # noqa: RUF012
90
+ {
91
+ "name": NAV_LABEL,
92
+ "href": f"{common.airflow_root_path()}{URL_PREFIX}/",
93
+ "url_route": URL_ROUTE,
94
+ "destination": "nav",
95
+ # Rendered by the Airflow UI in an <img>, so the icon cannot pick up
96
+ # the nav's text color and each color mode needs its own file.
97
+ "icon": common.static_url(URL_PREFIX, "toolbox.svg"),
98
+ "icon_dark_mode": common.static_url(URL_PREFIX, "toolbox-dark.svg"),
99
+ }
100
+ ]
@@ -0,0 +1,45 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 589.5 162">
3
+ <defs>
4
+ <style>
5
+ .cls-1, .cls-2 {
6
+ fill: #003caf;
7
+ }
8
+
9
+ .cls-3, .cls-4 {
10
+ font-family: Roboto-Medium, Roboto;
11
+ font-weight: 500;
12
+ }
13
+
14
+ .cls-5, .cls-6 {
15
+ font-family: Roboto-Light, Roboto;
16
+ font-weight: 300;
17
+ }
18
+
19
+ .cls-2 {
20
+ font-size: 100px;
21
+ }
22
+
23
+ .cls-7 {
24
+ fill: #fff;
25
+ }
26
+
27
+ .cls-6 {
28
+ letter-spacing: -.06em;
29
+ }
30
+
31
+ .cls-4 {
32
+ letter-spacing: 0em;
33
+ }
34
+ </style>
35
+ </defs>
36
+ <text class="cls-2" transform="translate(151 115.5)"><tspan class="cls-5" x="0" y="0">Blue</tspan><tspan class="cls-6" x="190.28" y="0"> </tspan><tspan class="cls-3" x="208.6" y="0">Co</tspan><tspan class="cls-4" x="330.82" y="0">r</tspan><tspan class="cls-3" x="365.04" y="0">e</tspan></text>
37
+ <g>
38
+ <circle class="cls-1" cx="51.75" cy="110.25" r="29.25"/>
39
+ <circle class="cls-1" cx="102.94" cy="81" r="29.25"/>
40
+ <circle class="cls-1" cx="51.75" cy="51.75" r="29.25"/>
41
+ <path class="cls-7" d="M51.03,81c-2.39,0-4.57-.32-6.59-.89v29.24c0,4.54,3.27,8.21,7.31,8.21s7.31-3.68,7.31-8.21v-29.25c-2.41.57-5.06.9-8.03.9Z"/>
42
+ <path class="cls-7" d="M77.61,96.27c1.19,2.07,2.01,4.12,2.53,6.15l25.32-14.62c3.93-2.27,5.48-6.94,3.46-10.44-2.02-3.5-6.84-4.49-10.77-2.23l-25.33,14.63c1.7,1.8,3.31,3.93,4.8,6.51Z"/>
43
+ <path class="cls-7" d="M56.33,46.05c-3.93-2.27-8.75-1.27-10.77,2.23s-.47,8.17,3.46,10.44l25.33,14.63c.71-2.37,1.75-4.84,3.23-7.41,1.19-2.07,2.57-3.8,4.06-5.27l-25.32-14.62Z"/>
44
+ </g>
45
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"
2
+ fill="none" stroke="#e2e8f0" stroke-width="2" stroke-linecap="round"
3
+ stroke-linejoin="round" role="img" aria-label="Wrench">
4
+ <path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" />
5
+ </svg>
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Graph Toolbox styles, loaded after the shared bluecore.css. Only rules
3
+ * specific to the Toolbox belong here; anything every plugin page needs goes
4
+ * in bluecore-airflow-common instead.
5
+ */
6
+
7
+ .toolbox-logo {
8
+ width: 12rem;
9
+ height: auto;
10
+ }
11
+
12
+ .toolbox-version {
13
+ font-size: 1rem;
14
+ color: var(--bluecore-fg-muted);
15
+ }
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"
2
+ fill="none" stroke="#2d3748" stroke-width="2" stroke-linecap="round"
3
+ stroke-linejoin="round" role="img" aria-label="Wrench">
4
+ <path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" />
5
+ </svg>
@@ -0,0 +1,18 @@
1
+ {% extends "bluecore/base.html" %}
2
+
3
+ {% block head %}
4
+ <link rel="stylesheet" href="{{ static_url('toolbox.css') }}" />
5
+ {% endblock %}
6
+
7
+ {% block body_class %}centered{% endblock %}
8
+
9
+ {% block content %}
10
+ <img
11
+ class="toolbox-logo"
12
+ src="{{ static_url('blue-core-v1.svg') }}"
13
+ alt="Blue Core"
14
+ />
15
+ <h1>{{ title }}</h1>
16
+ <p>Signed in as {{ username }}</p>
17
+ <p class="toolbox-version">Version {{ version }}</p>
18
+ {% endblock %}
@@ -0,0 +1,103 @@
1
+ Metadata-Version: 2.5
2
+ Name: bluecore-graph-toolbox
3
+ Version: 2.0.0
4
+ Summary: Airflow Plugin for Blue Core Toolbox
5
+ Project-URL: Homepage, https://github.com/blue-core-lod/graph-toolbox
6
+ Project-URL: Issues, https://github.com/blue-core-lod/graph-toolbox/issues
7
+ License-Expression: Apache-2.0
8
+ License-File: LICENSE-2.0.txt
9
+ Keywords: airflow,airflow-plugin,bibframe,blue-core,rdf
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Framework :: Apache Airflow
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Requires-Python: ==3.12.*
16
+ Requires-Dist: apache-airflow<4,>=3.2.0
17
+ Requires-Dist: bluecore-airflow-common>=0.1.0
18
+ Requires-Dist: jinja2>=3.1.6
19
+ Description-Content-Type: text/markdown
20
+
21
+ # Blue Core Graph Toolbox
22
+ Web Application for loading and manipulating [Blue Core](https://bcld.info) RDF.
23
+
24
+ The Toolbox is being rebuilt as an [Airflow 3 plugin](#running-as-an-airflow-plugin)
25
+ that runs inside Blue Core Workflows. Until its screens are moved over, the
26
+ original PyScript site lives alongside it in this repo.
27
+
28
+ Through [Pyscript](https://pyscript.net/), the [rdflib](https://rdflib.readthedocs.io/en/stable/) Python package is used
29
+ for loading RDF through Blue Core.
30
+
31
+ ## Existing and Planned Functionality
32
+ - Run SPARQL queries on one or more Blue Core Resources
33
+ - Download RDF in various serializations like Turtle, XML/RDF, and json-ld
34
+ - Chat with Blue Core AI Agents
35
+ - Import and convert MARC to Blue Core BIBFRAME Resources
36
+ - Export Blue Core Constrained Bound Descriptions (CBD) to
37
+ MARC21 records
38
+
39
+ ## Running as an Airflow plugin
40
+
41
+ The `bluecore_graph_toolbox` package registers itself with Airflow through the
42
+ `airflow.plugins` entry point, so installing it into the Airflow environment is
43
+ all that's needed; nothing goes in the plugins folder. Shared helpers, the base
44
+ template and styles come from
45
+ [bluecore-airflow-common](https://github.com/blue-core-lod/bluecore-airflow-common).
46
+
47
+ Requires Python 3.12 and Airflow 3.2 or later (tested against 3.3.2).
48
+
49
+ Releases are published to PyPI as
50
+ [bluecore-graph-toolbox](https://pypi.org/p/bluecore-graph-toolbox)
51
+
52
+ ```sh
53
+ uv build
54
+ uv add bluecore-graph-toolbox
55
+ ```
56
+
57
+ In [bluecore-workflows](https://github.com/blue-core-lod/bluecore-workflows),
58
+ add the pin to `dependencies` in its `pyproject.toml` and run `uv lock`; the
59
+ Docker image installs it from the lockfile, so no wheel is copied in. When a
60
+ new Toolbox release adds screens or API routes, bump that pin and `uv lock`
61
+ again in a Workflows pull request.
62
+
63
+ Once installed, a Toolbox item appears in the Airflow navigation. The UI
64
+ shows it in an iframe at `/plugin/graph-toolbox`; the app itself is mounted at
65
+ `/graph-toolbox`:
66
+
67
+ | Route | Sign-in | Purpose |
68
+ |---|---|---|
69
+ | `GET /graph-toolbox/` | required | Landing page |
70
+ | `GET /graph-toolbox/health` | none | `{"status", "version"}` |
71
+ | `/graph-toolbox/static/…` | none | Toolbox and shared Blue Core assets |
72
+
73
+ Sign-in is Airflow's own: the page uses Airflow's JWT cookie (Keycloak in a
74
+ Blue Core stack), and the Toolbox has no login of its own.
75
+
76
+ All URLs follow [api] base_url, so the same build works with Airflow at the
77
+ root or proxied under a path such as /workflows
78
+ (AIRFLOW__API__BASE_URL=`http://localhost/workflows`), where the routes above
79
+ become `/workflows/graph-toolbox/…`.
80
+
81
+ ## Development
82
+
83
+ ```sh
84
+ uv sync
85
+ uv run ruff check src/bluecore_graph_toolbox tests
86
+ uv run pytest
87
+ ```
88
+
89
+ ## Releasing
90
+
91
+ Releases go to PyPI from
92
+ [`.github/workflows/python-publish.yml`](.github/workflows/python-publish.yml)
93
+ using [trusted publishing](https://docs.pypi.org/trusted-publishers/), so no
94
+ API token is stored in the repo.
95
+
96
+ 1. Bump `version` in `pyproject.toml` (`uv version --bump minor`, say) and
97
+ merge it to `main`.
98
+ 2. Create a GitHub release whose tag is `v` plus that version, e.g. `v2.1.0`.
99
+ 3. Publishing the release runs the workflow: it checks the tag against
100
+ `pyproject.toml`, runs the tests, builds the wheel and sdist, checks that the
101
+ wheel installs as an Airflow plugin, and uploads both to PyPI. Approve the
102
+ `pypi` environment deployment if it asks.
103
+ 4. Bump the pin in bluecore-workflows as described above.
@@ -0,0 +1,12 @@
1
+ bluecore_graph_toolbox/__init__.py,sha256=g8X-8TCHKYHJHkwVITIuxbdbXOMgL6jg3y0oNEVbCwk,247
2
+ bluecore_graph_toolbox/plugin.py,sha256=8xgJO4NrmUUU6ooTdh7YZ1a4H_gdyIvmPRiAfH6x1Vk,3302
3
+ bluecore_graph_toolbox/static/blue-core-v1.svg,sha256=PtOCT0Tbygc70j8L7tGkBGsozzSCgihcqeXQX0OENWE,1652
4
+ bluecore_graph_toolbox/static/toolbox-dark.svg,sha256=xYWZe3YQlbS5QVlHV2Klisg3DVihhPhVMJ4LdjOw7wI,393
5
+ bluecore_graph_toolbox/static/toolbox.css,sha256=zVRRNvtPAflW1_f_dKmdEVaWVF29wz0PCe7ozyYR42M,324
6
+ bluecore_graph_toolbox/static/toolbox.svg,sha256=QiNAk2RyOHolNcKkgw0xDIS6MwvztFjsDBO4upJKBME,393
7
+ bluecore_graph_toolbox/templates/index.html,sha256=6IZWPE0FlU1pIaiOmKjh9foxJ6TezNL5E_Xm-pBPgUc,417
8
+ bluecore_graph_toolbox-2.0.0.dist-info/METADATA,sha256=asxPWYNa1HJGNMtBp4COrzJLBG6L7wodjdQg1wg3K-A,4189
9
+ bluecore_graph_toolbox-2.0.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
10
+ bluecore_graph_toolbox-2.0.0.dist-info/entry_points.txt,sha256=_FW9hSiuh2OSuTKK8aT0yokw4HK46245-4n3e8Jhecc,92
11
+ bluecore_graph_toolbox-2.0.0.dist-info/licenses/LICENSE-2.0.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
12
+ bluecore_graph_toolbox-2.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [airflow.plugins]
2
+ bluecore_graph_toolbox = bluecore_graph_toolbox.plugin:GraphToolboxPlugin
@@ -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.