yardstick-predict 0.4.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.
- yardstick_predict-0.4.0/.gitignore +7 -0
- yardstick_predict-0.4.0/CONTRIBUTING.md +130 -0
- yardstick_predict-0.4.0/LICENSE +202 -0
- yardstick_predict-0.4.0/PKG-INFO +351 -0
- yardstick_predict-0.4.0/README.md +322 -0
- yardstick_predict-0.4.0/SECURITY.md +29 -0
- yardstick_predict-0.4.0/docs/features.md +28 -0
- yardstick_predict-0.4.0/docs/format.md +144 -0
- yardstick_predict-0.4.0/docs/how-it-works.md +161 -0
- yardstick_predict-0.4.0/pyproject.toml +76 -0
- yardstick_predict-0.4.0/schemas/forecast-request.v1.json +139 -0
- yardstick_predict-0.4.0/schemas/forecast-response.v1.json +205 -0
- yardstick_predict-0.4.0/src/yardstick_predict/__init__.py +35 -0
- yardstick_predict-0.4.0/src/yardstick_predict/__main__.py +5 -0
- yardstick_predict-0.4.0/src/yardstick_predict/archives.py +1454 -0
- yardstick_predict-0.4.0/src/yardstick_predict/benchmarks.py +107 -0
- yardstick_predict-0.4.0/src/yardstick_predict/check.py +310 -0
- yardstick_predict-0.4.0/src/yardstick_predict/claude_code.py +1423 -0
- yardstick_predict-0.4.0/src/yardstick_predict/cli.py +2727 -0
- yardstick_predict-0.4.0/src/yardstick_predict/embeddings.py +901 -0
- yardstick_predict-0.4.0/src/yardstick_predict/estimate.py +228 -0
- yardstick_predict-0.4.0/src/yardstick_predict/feature_store.py +704 -0
- yardstick_predict-0.4.0/src/yardstick_predict/features.py +683 -0
- yardstick_predict-0.4.0/src/yardstick_predict/files.py +58 -0
- yardstick_predict-0.4.0/src/yardstick_predict/forecast.py +478 -0
- yardstick_predict-0.4.0/src/yardstick_predict/history.py +145 -0
- yardstick_predict-0.4.0/src/yardstick_predict/llm.py +718 -0
- yardstick_predict-0.4.0/src/yardstick_predict/locks.py +53 -0
- yardstick_predict-0.4.0/src/yardstick_predict/menu.py +185 -0
- yardstick_predict-0.4.0/src/yardstick_predict/model.py +2125 -0
- yardstick_predict-0.4.0/src/yardstick_predict/model_0_3.py +111 -0
- yardstick_predict-0.4.0/src/yardstick_predict/model_types.py +157 -0
- yardstick_predict-0.4.0/src/yardstick_predict/pipeline.py +1002 -0
- yardstick_predict-0.4.0/src/yardstick_predict/prices.json +68 -0
- yardstick_predict-0.4.0/src/yardstick_predict/prices.py +59 -0
- yardstick_predict-0.4.0/src/yardstick_predict/store.py +800 -0
- yardstick_predict-0.4.0/src/yardstick_predict/ui.py +300 -0
- yardstick_predict-0.4.0/tests/builders.py +512 -0
- yardstick_predict-0.4.0/tests/conftest.py +159 -0
- yardstick_predict-0.4.0/tests/fixtures/README.md +38 -0
- yardstick_predict-0.4.0/tests/fixtures/forecasts-0.3.0.json +605 -0
- yardstick_predict-0.4.0/tests/fixtures/make_predictor_0_3_0.py +321 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/dataset.sqlite +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/guess-constants.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/guess-weights.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/model.json +682 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/seconds.direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/seconds.work.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/similar-context-results.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/similar-context-started.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/similar-context-vectors.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/similar-prompt-results.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/similar-prompt-started.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/similar-prompt-vectors.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/similar-prompt_and_context-results.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/similar-prompt_and_context-started.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/similar-prompt_and_context-vectors.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/tokens.direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/tokens.work.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/usd.direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation/usd.work.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/guess-constants.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/guess-weights.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/model.json +704 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/seconds.direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/seconds.work.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-context-results.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-context-started.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-context-vectors.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-llm-results.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-llm-started.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-llm-vectors.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-prompt-results.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-prompt-started.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-prompt-vectors.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-prompt_and_context-results.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-prompt_and_context-started.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/similar-prompt_and_context-vectors.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/tokens.direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/tokens.work.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/usd.direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/conversation-llm/usd.work.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/model.json +270 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/guess-constants.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/guess-weights.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/model.json +660 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/seconds.direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/similar-context-results.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/similar-context-started.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/similar-context-vectors.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/similar-prompt-results.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/similar-prompt-started.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/similar-prompt-vectors.npy +0 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/tokens.direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/tokens.work.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/usd.direct.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/model/plain/usd.work.json +1 -0
- yardstick_predict-0.4.0/tests/fixtures/predictor-0.3.0/predictor.json +56 -0
- yardstick_predict-0.4.0/tests/test_archives.py +1067 -0
- yardstick_predict-0.4.0/tests/test_check.py +681 -0
- yardstick_predict-0.4.0/tests/test_claude_code.py +947 -0
- yardstick_predict-0.4.0/tests/test_cli.py +1192 -0
- yardstick_predict-0.4.0/tests/test_embeddings.py +629 -0
- yardstick_predict-0.4.0/tests/test_estimate.py +204 -0
- yardstick_predict-0.4.0/tests/test_feature_store.py +918 -0
- yardstick_predict-0.4.0/tests/test_features.py +497 -0
- yardstick_predict-0.4.0/tests/test_finish_times.py +182 -0
- yardstick_predict-0.4.0/tests/test_forecast.py +399 -0
- yardstick_predict-0.4.0/tests/test_history.py +137 -0
- yardstick_predict-0.4.0/tests/test_llm.py +363 -0
- yardstick_predict-0.4.0/tests/test_menu.py +98 -0
- yardstick_predict-0.4.0/tests/test_model.py +776 -0
- yardstick_predict-0.4.0/tests/test_model_inputs.py +166 -0
- yardstick_predict-0.4.0/tests/test_predictors.py +855 -0
- yardstick_predict-0.4.0/tests/test_privacy.py +272 -0
- yardstick_predict-0.4.0/tests/test_progress.py +194 -0
- yardstick_predict-0.4.0/tests/test_refresh.py +387 -0
- yardstick_predict-0.4.0/tests/test_setup_problems.py +121 -0
- yardstick_predict-0.4.0/tests/test_upgrade.py +233 -0
- yardstick_predict-0.4.0/uv.lock +1348 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Contributing to yardstick-predict
|
|
2
|
+
|
|
3
|
+
Thanks for helping. This guide says how to report problems and how to send changes.
|
|
4
|
+
|
|
5
|
+
## Set up and run the tests
|
|
6
|
+
|
|
7
|
+
You need [uv](https://docs.astral.sh/uv/). It installs the right Python and every dependency.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://github.com/yusufcemaydin/yardstick-predict
|
|
11
|
+
cd yardstick-predict
|
|
12
|
+
uv sync
|
|
13
|
+
uv run pytest
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The tests never touch your own records, your Voyage key or your password store. They write their own small Claude Code and Codex records and use a stand-in for Voyage that runs on your computer.
|
|
17
|
+
|
|
18
|
+
On a Mac without Homebrew's OpenMP, the tests need to find the copy that scikit-learn carries. Run them the way the automatic tests do:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
export DYLD_FALLBACK_LIBRARY_PATH="$(uv run python -c 'import sklearn, os; print(os.path.join(os.path.dirname(sklearn.__file__), ".dylibs"))')"
|
|
22
|
+
uv run pytest
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
New features and model types can live in a plugin, outside this repo. The front page's "Extend it" section shows how.
|
|
26
|
+
|
|
27
|
+
Before you send a change, check the style too:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv run ruff check src tests
|
|
31
|
+
uv run ruff format src tests
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[How it works](docs/how-it-works.md) explains the data, the model and the test. A change to the model must keep passing the test on real runs, not just the unit tests. Say in your pull request how it did.
|
|
35
|
+
|
|
36
|
+
## Keep private data out
|
|
37
|
+
|
|
38
|
+
The repository is public, so the tests include a privacy check, `tests/test_privacy.py`. It reads every file git tracks, except binary files and `uv.lock`, and fails when one holds:
|
|
39
|
+
|
|
40
|
+
- an email address. GitHub's no-reply addresses, which reach no one, and the example domains `example.com`, `example.org` and `example.net` are fine.
|
|
41
|
+
- a home folder with a real-looking user name, such as `/Users/<name>`, `/home/<name>` or `C:\Users\<name>`. The few made-up names the tests use are fine.
|
|
42
|
+
- text shaped like a secret key: an Anthropic, OpenAI, Voyage, GitHub or AWS key, or a private key file.
|
|
43
|
+
|
|
44
|
+
It names the file and line of each find, never the text itself, so its output is safe to share. It reads files only, not commit messages.
|
|
45
|
+
|
|
46
|
+
Some words must stay private but can't be listed in a public file, such as the names of people, clients or other projects. Keep them in a file on your own computer, outside the repository, one a line. Case doesn't matter, and blank lines and lines that start with `#` are skipped. When the environment variable `YARDSTICK_PRIVATE_TERMS` names that file, the check fails on those words too:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
YARDSTICK_PRIVATE_TERMS=~/private-terms.txt uv run pytest tests/test_privacy.py
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
To run it before every push, give git a pre-push hook: a script git runs before each push, which stops the push when the script fails. Save these two lines as `.git/hooks/pre-push`, then make the file runnable with `chmod +x .git/hooks/pre-push`:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
#!/bin/sh
|
|
56
|
+
YARDSTICK_PRIVATE_TERMS="$HOME/private-terms.txt" uv run pytest -q tests/test_privacy.py
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Predictors and models saved by past releases
|
|
60
|
+
|
|
61
|
+
Each version keeps forecasting with the models the previous release saved, until a refresh trains them again. Anything older is asked to train again first. A version that meets a feature it doesn't know skips it, with a note.
|
|
62
|
+
|
|
63
|
+
The tests check this against what past releases really saved. `tests/fixtures` holds a predictor that 0.3.0's own code made, and what it forecast. When a release changes how predictors or models are saved, add that release's fixture the same way, with tests that this version still reads it. [The fixtures' README](tests/fixtures/README.md) shows how the 0.3.0 one was made. Its model files are plain JSON and plain numbers, as the tool saves them, never pickle files.
|
|
64
|
+
|
|
65
|
+
## Report a problem or suggest an idea
|
|
66
|
+
|
|
67
|
+
Open an issue and pick a form:
|
|
68
|
+
|
|
69
|
+
- **Bug report:** something broke or gave an error.
|
|
70
|
+
- **Forecast was way off:** the predicted time or tokens were far from what really happened.
|
|
71
|
+
- **Idea or request:** a new feature or a change.
|
|
72
|
+
|
|
73
|
+
Search the open issues first. Someone may have reported it already.
|
|
74
|
+
|
|
75
|
+
Security problems are different. Report them privately, as the [security policy](SECURITY.md) explains.
|
|
76
|
+
|
|
77
|
+
## Send a change
|
|
78
|
+
|
|
79
|
+
1. For anything bigger than a small fix, open an issue first. Agreeing on the idea first saves you wasted work.
|
|
80
|
+
2. Fork the repo and make your change on a new branch.
|
|
81
|
+
3. Keep each pull request to one change. Small pull requests get reviewed faster.
|
|
82
|
+
4. Make sure the tests pass.
|
|
83
|
+
5. Open a pull request. Say what it changes and why.
|
|
84
|
+
|
|
85
|
+
A maintainer reads every pull request before it's merged.
|
|
86
|
+
|
|
87
|
+
## Changes that need extra care
|
|
88
|
+
|
|
89
|
+
These changes get a much closer review, and may be turned down:
|
|
90
|
+
|
|
91
|
+
- install steps or build scripts,
|
|
92
|
+
- the automatic checks in the `.github` folder,
|
|
93
|
+
- new dependencies,
|
|
94
|
+
- model files.
|
|
95
|
+
|
|
96
|
+
Model files must use the safetensors format, which holds only numbers. Pull requests that add pickle files will be closed. These usually end in `.pkl`, `.pt` or `.pth`, and they can run code when someone opens them.
|
|
97
|
+
|
|
98
|
+
Code that's minified, obfuscated or generated without its source will be closed too. Every line has to be readable.
|
|
99
|
+
|
|
100
|
+
## AI-written changes
|
|
101
|
+
|
|
102
|
+
You can use AI tools to write your change. You're still responsible for it. Read it, test it, and be ready to explain it.
|
|
103
|
+
|
|
104
|
+
## Releasing
|
|
105
|
+
|
|
106
|
+
Between releases, the version on the main branch ends in `.dev0`, such as `0.4.0.dev0`, which means work toward 0.4.0. To release it, a maintainer:
|
|
107
|
+
|
|
108
|
+
1. Sets the version, such as `0.4.0`, in `pyproject.toml` and `src/yardstick_predict/__init__.py`, and runs `uv lock`.
|
|
109
|
+
2. In `CHANGELOG.md`, renames `## [Unreleased]` to the version and the day, such as `## [0.4.0] - 2026-11-02`, and starts a new, empty `## [Unreleased]` above it.
|
|
110
|
+
3. Merges that change into main once the tests pass.
|
|
111
|
+
4. Tags the merged commit with the version and pushes the tag:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
git tag v0.4.0
|
|
115
|
+
git push origin v0.4.0
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The tag starts the release workflow, `.github/workflows/release.yml`. It checks that the tag matches the version in both files, `v0.4.0` for `0.4.0`, and stops if not. Then it builds the package and publishes it on PyPI, the Python package index. Nothing else starts it: not pull requests, and not pushes to a branch.
|
|
119
|
+
|
|
120
|
+
After the release, set the next version on main, such as `0.5.0.dev0`.
|
|
121
|
+
|
|
122
|
+
Before the first release, set up PyPI once:
|
|
123
|
+
|
|
124
|
+
1. Make an account on [PyPI](https://pypi.org) and turn on two-factor sign-in.
|
|
125
|
+
2. Tell PyPI to trust this repository's release workflow, so it takes the upload with no password or token kept anywhere. PyPI calls this a trusted publisher. Before the project exists on PyPI, add it as a pending publisher, under Your account > Publishing, with the project name `yardstick-predict`, owner `yusufcemaydin`, repository `yardstick-predict`, workflow `release.yml` and environment `pypi`. The first release then creates the project.
|
|
126
|
+
3. On GitHub, under the repository's Settings > Environments, create an environment named `pypi`. To approve each publish yourself, add yourself as a required reviewer. Under deployment branches and tags, allow only tags that match `v*`.
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
|
|
130
|
+
By sending a change, you agree that it's released under the [Apache License 2.0](LICENSE), like the rest of the project.
|
|
@@ -0,0 +1,202 @@
|
|
|
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.
|
|
202
|
+
|