shirabe-profiling 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.
Files changed (103) hide show
  1. shirabe_profiling-0.1.0/.env.example +2 -0
  2. shirabe_profiling-0.1.0/.envrc +4 -0
  3. shirabe_profiling-0.1.0/.github/CODEOWNERS +4 -0
  4. shirabe_profiling-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +31 -0
  5. shirabe_profiling-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +24 -0
  6. shirabe_profiling-0.1.0/.github/pull_request_template.md +22 -0
  7. shirabe_profiling-0.1.0/.gitignore +28 -0
  8. shirabe_profiling-0.1.0/.python-version +1 -0
  9. shirabe_profiling-0.1.0/.reuse/templates/template.jinja2 +6 -0
  10. shirabe_profiling-0.1.0/CHANGELOG.md +34 -0
  11. shirabe_profiling-0.1.0/CONTRIBUTING.md +109 -0
  12. shirabe_profiling-0.1.0/LICENSE +202 -0
  13. shirabe_profiling-0.1.0/LICENSES/Apache-2.0.txt +202 -0
  14. shirabe_profiling-0.1.0/LICENSES/ISC.txt +7 -0
  15. shirabe_profiling-0.1.0/LICENSES/MIT.txt +18 -0
  16. shirabe_profiling-0.1.0/LICENSES/OFL-1.1-RFN.txt +43 -0
  17. shirabe_profiling-0.1.0/LICENSES/OFL-1.1-no-RFN.txt +43 -0
  18. shirabe_profiling-0.1.0/PKG-INFO +213 -0
  19. shirabe_profiling-0.1.0/README.md +173 -0
  20. shirabe_profiling-0.1.0/REUSE.toml +53 -0
  21. shirabe_profiling-0.1.0/assets/logo/favicon.svg +1 -0
  22. shirabe_profiling-0.1.0/assets/logo/wordmark-inline.svg +1 -0
  23. shirabe_profiling-0.1.0/assets/logo/wordmark-on-dark.svg +7 -0
  24. shirabe_profiling-0.1.0/assets/logo/wordmark-on-light.svg +7 -0
  25. shirabe_profiling-0.1.0/cliff.toml +31 -0
  26. shirabe_profiling-0.1.0/docs/report-columns.png +0 -0
  27. shirabe_profiling-0.1.0/docs/report-correlations.png +0 -0
  28. shirabe_profiling-0.1.0/docs/report-guide.png +0 -0
  29. shirabe_profiling-0.1.0/docs/report-overview-dark.png +0 -0
  30. shirabe_profiling-0.1.0/docs/report-overview.png +0 -0
  31. shirabe_profiling-0.1.0/docs/report-target.png +0 -0
  32. shirabe_profiling-0.1.0/flake.lock +61 -0
  33. shirabe_profiling-0.1.0/flake.nix +30 -0
  34. shirabe_profiling-0.1.0/justfile +283 -0
  35. shirabe_profiling-0.1.0/pyproject.toml +118 -0
  36. shirabe_profiling-0.1.0/scripts/add_commas.py +245 -0
  37. shirabe_profiling-0.1.0/scripts/annotate_from_reuse.py +388 -0
  38. shirabe_profiling-0.1.0/scripts/check_package.py +185 -0
  39. shirabe_profiling-0.1.0/scripts/docs_check.py +80 -0
  40. shirabe_profiling-0.1.0/scripts/readme_images.py +441 -0
  41. shirabe_profiling-0.1.0/src/shirabe_profiling/__init__.py +284 -0
  42. shirabe_profiling-0.1.0/src/shirabe_profiling/alerts.py +312 -0
  43. shirabe_profiling-0.1.0/src/shirabe_profiling/analyzers/__init__.py +155 -0
  44. shirabe_profiling-0.1.0/src/shirabe_profiling/analyzers/boolean.py +58 -0
  45. shirabe_profiling-0.1.0/src/shirabe_profiling/analyzers/categorical.py +211 -0
  46. shirabe_profiling-0.1.0/src/shirabe_profiling/analyzers/datetime.py +166 -0
  47. shirabe_profiling-0.1.0/src/shirabe_profiling/analyzers/numeric.py +211 -0
  48. shirabe_profiling-0.1.0/src/shirabe_profiling/analyzers/text.py +60 -0
  49. shirabe_profiling-0.1.0/src/shirabe_profiling/config.py +112 -0
  50. shirabe_profiling-0.1.0/src/shirabe_profiling/correlations.py +640 -0
  51. shirabe_profiling-0.1.0/src/shirabe_profiling/dataset_overview.py +278 -0
  52. shirabe_profiling-0.1.0/src/shirabe_profiling/ingest.py +79 -0
  53. shirabe_profiling-0.1.0/src/shirabe_profiling/interactions.py +290 -0
  54. shirabe_profiling-0.1.0/src/shirabe_profiling/py.typed +0 -0
  55. shirabe_profiling-0.1.0/src/shirabe_profiling/relationships.py +292 -0
  56. shirabe_profiling-0.1.0/src/shirabe_profiling/report/__init__.py +4 -0
  57. shirabe_profiling-0.1.0/src/shirabe_profiling/report/charts.py +428 -0
  58. shirabe_profiling-0.1.0/src/shirabe_profiling/report/html.py +858 -0
  59. shirabe_profiling-0.1.0/src/shirabe_profiling/report/templates/favicon.svg +1 -0
  60. shirabe_profiling-0.1.0/src/shirabe_profiling/report/templates/fonts/IBMPlexSans-LICENSE.txt +92 -0
  61. shirabe_profiling-0.1.0/src/shirabe_profiling/report/templates/fonts/IBMPlexSans-Regular-Latin1.woff +0 -0
  62. shirabe_profiling-0.1.0/src/shirabe_profiling/report/templates/fonts/IBMPlexSans-SemiBold-Latin1.woff +0 -0
  63. shirabe_profiling-0.1.0/src/shirabe_profiling/report/templates/fonts/Lilex-OFL.txt +93 -0
  64. shirabe_profiling-0.1.0/src/shirabe_profiling/report/templates/fonts/Lilex-Regular.woff +0 -0
  65. shirabe_profiling-0.1.0/src/shirabe_profiling/report/templates/icons.j2 +54 -0
  66. shirabe_profiling-0.1.0/src/shirabe_profiling/report/templates/report.css +1734 -0
  67. shirabe_profiling-0.1.0/src/shirabe_profiling/report/templates/report.html.j2 +2018 -0
  68. shirabe_profiling-0.1.0/src/shirabe_profiling/reproduction.py +79 -0
  69. shirabe_profiling-0.1.0/src/shirabe_profiling/skew.py +224 -0
  70. shirabe_profiling-0.1.0/src/shirabe_profiling/tables.py +161 -0
  71. shirabe_profiling-0.1.0/src/shirabe_profiling/target.py +549 -0
  72. shirabe_profiling-0.1.0/src/shirabe_profiling/type_inference.py +131 -0
  73. shirabe_profiling-0.1.0/tests/__init__.py +0 -0
  74. shirabe_profiling-0.1.0/tests/conftest.py +273 -0
  75. shirabe_profiling-0.1.0/tests/test_add_commas.py +185 -0
  76. shirabe_profiling-0.1.0/tests/test_alerts.py +377 -0
  77. shirabe_profiling-0.1.0/tests/test_analyzer_boolean.py +149 -0
  78. shirabe_profiling-0.1.0/tests/test_analyzer_categorical.py +388 -0
  79. shirabe_profiling-0.1.0/tests/test_analyzer_datetime.py +259 -0
  80. shirabe_profiling-0.1.0/tests/test_analyzer_numeric.py +424 -0
  81. shirabe_profiling-0.1.0/tests/test_analyzer_text.py +153 -0
  82. shirabe_profiling-0.1.0/tests/test_chart_renderer.py +320 -0
  83. shirabe_profiling-0.1.0/tests/test_check_package.py +54 -0
  84. shirabe_profiling-0.1.0/tests/test_column_polish.py +894 -0
  85. shirabe_profiling-0.1.0/tests/test_comments.py +87 -0
  86. shirabe_profiling-0.1.0/tests/test_config.py +106 -0
  87. shirabe_profiling-0.1.0/tests/test_correlations.py +819 -0
  88. shirabe_profiling-0.1.0/tests/test_dataset_overview.py +118 -0
  89. shirabe_profiling-0.1.0/tests/test_dataset_overview_extended.py +133 -0
  90. shirabe_profiling-0.1.0/tests/test_html_report.py +1088 -0
  91. shirabe_profiling-0.1.0/tests/test_ingest.py +143 -0
  92. shirabe_profiling-0.1.0/tests/test_interactions.py +366 -0
  93. shirabe_profiling-0.1.0/tests/test_licenses.py +86 -0
  94. shirabe_profiling-0.1.0/tests/test_profile_report.py +325 -0
  95. shirabe_profiling-0.1.0/tests/test_relationships.py +345 -0
  96. shirabe_profiling-0.1.0/tests/test_report_controls.py +296 -0
  97. shirabe_profiling-0.1.0/tests/test_reproduction.py +103 -0
  98. shirabe_profiling-0.1.0/tests/test_sample_tabs.py +136 -0
  99. shirabe_profiling-0.1.0/tests/test_skew.py +483 -0
  100. shirabe_profiling-0.1.0/tests/test_tables.py +82 -0
  101. shirabe_profiling-0.1.0/tests/test_target.py +546 -0
  102. shirabe_profiling-0.1.0/tests/test_type_inference.py +178 -0
  103. shirabe_profiling-0.1.0/uv.lock +1682 -0
@@ -0,0 +1,2 @@
1
+ UV_PUBLISH_TOKEN=
2
+ UV_PUBLISH_TEST_TOKEN=
@@ -0,0 +1,4 @@
1
+ # SPDX-FileCopyrightText: Copyright © 2026 shuretokki
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ use flake
@@ -0,0 +1,4 @@
1
+ # SPDX-FileCopyrightText: Copyright © 2026 shuretokki
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ * @shuretokki
@@ -0,0 +1,31 @@
1
+ ---
2
+ # SPDX-FileCopyrightText: Copyright © 2026 shuretokki
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ name: Bug Report
6
+ about: Report a bug in shirabe-profiling
7
+ labels: bug
8
+ ---
9
+
10
+ ## Description
11
+
12
+ A clear description of the bug.
13
+
14
+ ## Steps to Reproduce
15
+
16
+ ```python
17
+ import polars as pl
18
+ from shirabe_profiling import ProfileReport
19
+
20
+ # minimal code to reproduce
21
+ ```
22
+
23
+ ## Expected Behavior
24
+
25
+ What you expected to happen.
26
+
27
+ ## Actual Behavior
28
+
29
+ What actually happened. Include the full error traceback if applicable.
30
+
31
+ ## Environment
@@ -0,0 +1,24 @@
1
+ ---
2
+ # SPDX-FileCopyrightText: Copyright © 2026 shuretokki
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ name: Feature Request
6
+ about: Suggest an improvement or new feature
7
+ labels: enhancement
8
+ ---
9
+
10
+ ## Problem
11
+
12
+ What problem does this solve? Why is it needed?
13
+
14
+ ## Proposed Solution
15
+
16
+ How should it work? Include a code example if possible:
17
+
18
+ ```python
19
+ # how you'd like to use it
20
+ ```
21
+
22
+ ## Alternatives Considered
23
+
24
+ Any alternative approaches you've thought about.
@@ -0,0 +1,22 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: Copyright © 2026 shuretokki
3
+ SPDX-License-Identifier: Apache-2.0
4
+ -->
5
+
6
+ ## What
7
+
8
+ Brief description of the change.
9
+
10
+ ## Why
11
+
12
+ Motivation — what problem does this solve?
13
+
14
+ ## How
15
+
16
+ Key implementation decisions (if non-obvious).
17
+
18
+ ## Test Plan
19
+
20
+ - [ ] Existing tests pass (`pytest tests/`)
21
+ - [ ] New tests added (if applicable)
22
+ - [ ] Tested manually with a sample dataset
@@ -0,0 +1,28 @@
1
+ # SPDX-FileCopyrightText: Copyright © 2026 shuretokki
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ .local/
5
+ *.local.*
6
+ .direnv/
7
+ result
8
+ __pycache__/
9
+ *.py[cod]
10
+ *.so
11
+ *.egg-info/
12
+ dist/
13
+ build/
14
+ .venv/
15
+ .idea/
16
+ .vscode/
17
+ *.swp
18
+ *.swo
19
+ .DS_Store
20
+ Thumbs.db
21
+ .pytest_cache/
22
+ .coverage
23
+ htmlcov/
24
+ .mypy_cache/
25
+ reports/
26
+ .ipynb_checkpoints/
27
+ .ruff_cache/
28
+ .env
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,6 @@
1
+ {% for copyright_line in copyright_lines -%}
2
+ {{ copyright_line }}
3
+ {% endfor -%}
4
+ {% for expression in spdx_expressions -%}
5
+ SPDX-License-Identifier: {{ expression }}
6
+ {% endfor -%}
@@ -0,0 +1,34 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: Copyright © 2026 shuretokki
3
+ SPDX-License-Identifier: Apache-2.0
4
+ -->
5
+
6
+ # Changelog
7
+
8
+ All notable changes to this project will be documented in this file.
9
+
10
+ The format is based on [Keep a Changelog](https://keepachangelog.com/),
11
+ and this project adheres to [Semantic Versioning](https://semver.org/).
12
+
13
+ ## [0.1.0] - 2026-10-17
14
+
15
+ First release as `shirabe-profiling`. This project is a derivative work based on [dataxid-profiling](https://github.com/dataxid/dataxid-profiling) 0.4.0 (Apache-2.0).
16
+
17
+ ### Changed
18
+
19
+ - The package is now `shirabe-profiling` and the import is `shirabe_profiling`
20
+ - The report has a new design: a dark theme, a light theme, and a compact density for touch screens
21
+ - The report has a new favicon
22
+ - The report uses the official IBM Plex Sans font files
23
+
24
+ ### Added
25
+
26
+ - Guide tab: what each alert means, when the report raises it, possible fixes, and sources
27
+ - Feedback tab: request a feature, report a problem with a prefilled GitHub issue, and copy the reproduction details
28
+ - Skew tabs in Column Details (`log1p`, Yeo-Johnson, and non-zero) with statistics for each version
29
+ - Timeline chart for datetime columns
30
+ - Alert tags and a highlighted row in Column Details for the statistic that raised the alert
31
+ - Random and Most Missing tabs in Sample
32
+ - Download buttons for the correlation matrices
33
+ - A target section and leakage check when you pass `target=`
34
+ - The full text of each license that the package uses, in `LICENSES/`, and a `license` field that lists all of them
@@ -0,0 +1,109 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: Copyright © 2026 shuretokki
3
+ SPDX-License-Identifier: Apache-2.0
4
+ -->
5
+
6
+ # Contributing to shirabe-profiling
7
+
8
+ Thanks for your interest in contributing! Here's how to get started.
9
+
10
+ ## Development Setup
11
+
12
+ ```bash
13
+ git clone https://github.com/shuretokki/shirabe-profiling.git
14
+ cd shirabe-profiling
15
+ uv sync
16
+ ```
17
+
18
+ With [Nix](https://nixos.org) and [direnv](https://direnv.net), `direnv allow` loads a shell that has `uv`, `just`, and `git-cliff`.
19
+ Run `just` to list the recipes.
20
+
21
+ ## Running Tests
22
+
23
+ ```bash
24
+ just test
25
+ ```
26
+
27
+ ## Checks
28
+
29
+ ```bash
30
+ just full-check # lock file, lint, format, basedpyright, README, licenses, and pytest (aliases: check, c, fc)
31
+ just lint --fix # apply safe lint fixes
32
+ just fmt-write # add trailing commas, then format with ruff (aliases: fmt, commas)
33
+ just fmt-check # check the formatting and the commas without changing files
34
+ just typecheck # basedpyright only
35
+ just docs-check # the README code blocks parse, and its images and links exist
36
+ just license-check # every file has a license and a copyright holder (REUSE)
37
+ ```
38
+
39
+ The recipes need `uv`, `git-cliff`, and `gh` on the PATH, and the Nix shell has all three.
40
+
41
+ ## Licenses
42
+
43
+ `REUSE.toml` names the copyright holders and the license of every file, and `LICENSES/` holds one text for each license.
44
+ When you add work from someone else, such as a font or an icon, add an annotation for its files to `REUSE.toml`.
45
+ Then run `uvx reuse download --all` to fetch the license text, and run `just license-check` to make sure that every file is covered.
46
+ Keep the root `LICENSE` and `LICENSES/Apache-2.0.txt` the same text, which a test checks.
47
+
48
+ ## Report logo
49
+
50
+ The report header shows no logo for now, and the README holds the wordmark.
51
+ To show one, copy `assets/logo/wordmark-inline.svg` to `src/shirabe_profiling/report/templates/logo-wordmark.svg`, and the header picks it up without a code change.
52
+ That file uses `currentColor`, so the logo follows the light and the dark theme, and `.brand-wordmark` in `report.css` sets its height.
53
+
54
+ ## Changelog
55
+
56
+ `just changelog` prints a draft for the commits since the last tag.
57
+ It reads Conventional Commit messages (`feat:`, `fix:`, `perf:`, `chore(deps):`).
58
+ Rewrite the draft as plain sentences and put it in `CHANGELOG.md`.
59
+
60
+ ## Releasing
61
+
62
+ 1. `just bump 0.2.0` sets the version in `pyproject.toml`, `__init__.py`, and `uv.lock`, and drafts the `CHANGELOG.md` section from the `feat`, `fix`, and `perf` commits since the last tag.
63
+ 2. Read the section and reword it if needed. `just changelog` prints a fresh draft without changing a file.
64
+ 3. Commit both as `chore(release): 0.2.0`.
65
+ 4. `just release --dry-run` checks everything and prints the release notes, and it changes nothing.
66
+ 5. `just release` does the same, asks for a `y`, then tags `v0.2.0`, pushes main and the tag, and creates the GitHub release from the changelog section.
67
+ 6. `just publish-test` and `just publish` upload to TestPyPI and PyPI.
68
+
69
+ The release stops unless you are on main with a clean tree that is not behind origin.
70
+ It also needs agreeing version files and a changelog section.
71
+ The package must meet the PyPI upload rules, and its version must not be on PyPI yet.
72
+ The full check must pass.
73
+ The uploads read their tokens from a `.env` file, which git ignores.
74
+ Copy `.env.example` to `.env` and fill in `UV_PUBLISH_TEST_TOKEN` for TestPyPI and `UV_PUBLISH_TOKEN` for PyPI.
75
+
76
+ To practice a release, use a pre-release version such as `0.2.0rc1`.
77
+ `just bump` accepts it, and `just release` marks the GitHub release as a pre-release.
78
+ Upload it with `just publish-test` only, and install it with `pip install --pre --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple shirabe-profiling`.
79
+ A PyPI release never changes, so delete the changelog section of the pre-release when you release the final version.
80
+
81
+ ## README Screenshots
82
+
83
+ `just readme-images` makes the pictures in `docs/` again, so run it after a change to the report design.
84
+ It builds a report from a synthetic dataset, crops each view with a headless browser, and needs an internet connection for the report scripts.
85
+ It needs Chrome, Chromium, or Edge, and you can set `BROWSER` to the program if the script cannot find it.
86
+
87
+ ## Code Style
88
+
89
+ - Line length: 99 characters
90
+ - A call or a function signature with two or more arguments has a trailing comma, so each argument sits on its own line (`just fmt` adds the commas, `just check` fails when one is missing)
91
+ - Type hints everywhere, `Any` only for opaque state
92
+ - Minimal comments — code should be self-explanatory, comments explain *why*, not *what*
93
+ - Import order: stdlib → third-party → project (enforced by `ruff`)
94
+ - Polars-native: no NumPy/SciPy/Pandas in core logic
95
+
96
+ ## Pull Requests
97
+
98
+ 1. Fork the repo and create a feature branch
99
+ 2. Make your changes with tests
100
+ 3. Run `just check` before submitting
101
+ 4. Open a PR with a clear description of what and why
102
+
103
+ ## Reporting Issues
104
+
105
+ Use [GitHub Issues](https://github.com/shuretokki/shirabe-profiling/issues) with the provided templates.
106
+
107
+ ## License
108
+
109
+ By contributing, you agree that your contributions will be licensed under the Apache License 2.0.
@@ -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.