letify 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. letify-1.0.0/.github/workflows/docs.yml +44 -0
  2. letify-1.0.0/.github/workflows/publish.yml +54 -0
  3. letify-1.0.0/.gitignore +260 -0
  4. letify-1.0.0/.researchtree +4 -0
  5. letify-1.0.0/LICENSE +201 -0
  6. letify-1.0.0/PKG-INFO +505 -0
  7. letify-1.0.0/README.md +480 -0
  8. letify-1.0.0/docs/guide/01-getting-started.md +160 -0
  9. letify-1.0.0/docs/guide/02-providers.md +245 -0
  10. letify-1.0.0/docs/guide/03-execution-modes.md +149 -0
  11. letify-1.0.0/docs/guide/04-environments-and-data.md +156 -0
  12. letify-1.0.0/docs/guide/05-sweeps.md +196 -0
  13. letify-1.0.0/docs/guide/06-cost.md +165 -0
  14. letify-1.0.0/docs/guide/07-troubleshooting.md +272 -0
  15. letify-1.0.0/docs/guide/README.md +59 -0
  16. letify-1.0.0/docs/guide/ko/01-/354/213/234/354/236/221/355/225/230/352/270/260.md +160 -0
  17. letify-1.0.0/docs/guide/ko/02-/355/224/204/353/241/234/353/260/224/354/235/264/353/215/224.md +245 -0
  18. letify-1.0.0/docs/guide/ko/03-/354/213/244/355/226/211-/353/260/251/354/213/235.md +147 -0
  19. letify-1.0.0/docs/guide/ko/04-/355/231/230/352/262/275/352/263/274-/353/215/260/354/235/264/355/204/260.md +156 -0
  20. letify-1.0.0/docs/guide/ko/05-/354/212/244/354/234/225.md +192 -0
  21. letify-1.0.0/docs/guide/ko/06-/353/271/204/354/232/251.md +159 -0
  22. letify-1.0.0/docs/guide/ko/07-/353/254/270/354/240/234-/355/225/264/352/262/260.md +272 -0
  23. letify-1.0.0/docs/guide/ko/README.md +59 -0
  24. letify-1.0.0/docs/locales/README_ko.md +480 -0
  25. letify-1.0.0/docs/mkdocs.yml +69 -0
  26. letify-1.0.0/examples/README.md +16 -0
  27. letify-1.0.0/examples/nvfp4-lora/.letify.example +24 -0
  28. letify-1.0.0/examples/nvfp4-lora/00_smoke.py +66 -0
  29. letify-1.0.0/examples/nvfp4-lora/01_sweep.py +87 -0
  30. letify-1.0.0/examples/nvfp4-lora/02_resume.py +77 -0
  31. letify-1.0.0/examples/nvfp4-lora/03_watch.py +70 -0
  32. letify-1.0.0/examples/nvfp4-lora/README.md +120 -0
  33. letify-1.0.0/examples/nvfp4-lora/README_ko.md +110 -0
  34. letify-1.0.0/examples/nvfp4-lora/common.py +72 -0
  35. letify-1.0.0/examples/nvfp4-lora/recipe.py +207 -0
  36. letify-1.0.0/letify/__init__.py +82 -0
  37. letify-1.0.0/letify/cli.py +281 -0
  38. letify-1.0.0/letify/config/__init__.py +129 -0
  39. letify-1.0.0/letify/config/inventory.py +153 -0
  40. letify-1.0.0/letify/config/login.py +428 -0
  41. letify-1.0.0/letify/config/schema.py +52 -0
  42. letify-1.0.0/letify/config/secrets.py +50 -0
  43. letify-1.0.0/letify/config/writer.py +150 -0
  44. letify-1.0.0/letify/declare/__init__.py +20 -0
  45. letify-1.0.0/letify/declare/env.py +94 -0
  46. letify-1.0.0/letify/declare/function.py +299 -0
  47. letify-1.0.0/letify/declare/instance.py +151 -0
  48. letify-1.0.0/letify/declare/sweep.py +87 -0
  49. letify-1.0.0/letify/errors.py +92 -0
  50. letify-1.0.0/letify/launcher.py +445 -0
  51. letify-1.0.0/letify/protocol/__init__.py +64 -0
  52. letify-1.0.0/letify/protocol/codec.py +152 -0
  53. letify-1.0.0/letify/protocol/driver.py +98 -0
  54. letify-1.0.0/letify/protocol/framing.py +50 -0
  55. letify-1.0.0/letify/protocol/guards.py +44 -0
  56. letify-1.0.0/letify/protocol/handle.py +71 -0
  57. letify-1.0.0/letify/protocol/worker.py +288 -0
  58. letify-1.0.0/letify/providers/__init__.py +56 -0
  59. letify-1.0.0/letify/providers/base.py +427 -0
  60. letify-1.0.0/letify/providers/colab.py +227 -0
  61. letify-1.0.0/letify/providers/elice.py +246 -0
  62. letify-1.0.0/letify/providers/local.py +142 -0
  63. letify-1.0.0/letify/providers/modal.py +215 -0
  64. letify-1.0.0/letify/providers/naming.py +47 -0
  65. letify-1.0.0/letify/providers/shell.py +190 -0
  66. letify-1.0.0/letify/providers/tunnel.py +156 -0
  67. letify-1.0.0/letify/providers/usage.py +131 -0
  68. letify-1.0.0/letify/remoting/__init__.py +28 -0
  69. letify-1.0.0/letify/remoting/capability.py +50 -0
  70. letify-1.0.0/letify/remoting/loader.py +96 -0
  71. letify-1.0.0/letify/remoting/probe.py +127 -0
  72. letify-1.0.0/letify/runtime/__init__.py +24 -0
  73. letify-1.0.0/letify/runtime/bootstrap.py +58 -0
  74. letify-1.0.0/letify/runtime/channel.py +324 -0
  75. letify-1.0.0/letify/runtime/lease.py +70 -0
  76. letify-1.0.0/letify/runtime/pool.py +236 -0
  77. letify-1.0.0/letify/runtime/session.py +298 -0
  78. letify-1.0.0/letify/runtime/telemetry.py +220 -0
  79. letify-1.0.0/letify/store/__init__.py +27 -0
  80. letify-1.0.0/letify/store/backends/__init__.py +60 -0
  81. letify-1.0.0/letify/store/backends/filesystem.py +70 -0
  82. letify-1.0.0/letify/store/backends/layout.py +27 -0
  83. letify-1.0.0/letify/store/backends/objects.py +209 -0
  84. letify-1.0.0/letify/store/cas.py +177 -0
  85. letify-1.0.0/letify/store/volume.py +199 -0
  86. letify-1.0.0/letify-core/.gitignore +1 -0
  87. letify-1.0.0/letify-core/Cargo.lock +44 -0
  88. letify-1.0.0/letify-core/Cargo.toml +18 -0
  89. letify-1.0.0/letify-core/build.py +96 -0
  90. letify-1.0.0/letify-core/letify-agent/Cargo.toml +13 -0
  91. letify-1.0.0/letify-core/letify-agent/src/driver.rs +352 -0
  92. letify-1.0.0/letify-core/letify-agent/src/main.rs +266 -0
  93. letify-1.0.0/letify-core/letify-driver/Cargo.toml +18 -0
  94. letify-1.0.0/letify-core/letify-driver/src/client.rs +142 -0
  95. letify-1.0.0/letify-core/letify-driver/src/exports.rs +471 -0
  96. letify-1.0.0/letify-core/letify-driver/src/lib.rs +89 -0
  97. letify-1.0.0/letify-core/letify-driver/src/status.rs +61 -0
  98. letify-1.0.0/letify-core/letify-driver/src/table.rs +206 -0
  99. letify-1.0.0/letify-core/letify-wire/Cargo.toml +9 -0
  100. letify-1.0.0/letify-core/letify-wire/src/lib.rs +529 -0
  101. letify-1.0.0/letify-core/rust-toolchain.toml +2 -0
  102. letify-1.0.0/pyproject.toml +87 -0
  103. letify-1.0.0/scripts/sync-main.sh +132 -0
  104. letify-1.0.0/tests/conftest.py +695 -0
  105. letify-1.0.0/tests/test_cli.py +612 -0
  106. letify-1.0.0/tests/test_config.py +378 -0
  107. letify-1.0.0/tests/test_core.py +424 -0
  108. letify-1.0.0/tests/test_declare.py +369 -0
  109. letify-1.0.0/tests/test_protocol.py +369 -0
  110. letify-1.0.0/tests/test_providers.py +1154 -0
  111. letify-1.0.0/tests/test_remoting.py +315 -0
  112. letify-1.0.0/tests/test_runtime.py +798 -0
  113. letify-1.0.0/tests/test_store.py +538 -0
@@ -0,0 +1,44 @@
1
+ # Publish the guides to GitHub Pages on every push to main.
2
+ #
3
+ # The site is built from docs/guide with MkDocs, configured in docs/mkdocs.yml. Enable it once in the
4
+ # repository settings: Pages, source GitHub Actions.
5
+ name: docs
6
+
7
+ on:
8
+ push:
9
+ branches: [main]
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ concurrency:
16
+ group: pages
17
+ cancel-in-progress: true
18
+
19
+ jobs:
20
+ build:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - uses: astral-sh/setup-uv@v6
25
+ with:
26
+ python-version: "3.11"
27
+ - name: Build the site
28
+ run: uv run --only-group docs mkdocs build -f docs/mkdocs.yml
29
+ - uses: actions/upload-pages-artifact@v3
30
+ with:
31
+ path: site/
32
+
33
+ deploy:
34
+ needs: build
35
+ runs-on: ubuntu-latest
36
+ permissions:
37
+ pages: write
38
+ id-token: write
39
+ environment:
40
+ name: github-pages
41
+ url: ${{ steps.deployment.outputs.page_url }}
42
+ steps:
43
+ - id: deployment
44
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,54 @@
1
+ # Publish to PyPI when a version tag is pushed.
2
+ #
3
+ # A tag such as v1.2.0 builds the package, checks that the tag agrees with the version in
4
+ # pyproject.toml and letify/__init__.py, and uploads to PyPI. Tests are run before tagging.
5
+ #
6
+ # Upload uses PyPI trusted publishing, so there is no token in this repository. Configure it
7
+ # once on PyPI: project letify, owner DarkPyonix, repository letify, workflow publish.yml,
8
+ # environment pypi.
9
+ name: publish
10
+
11
+ on:
12
+ push:
13
+ tags: ["v*"]
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ build:
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - uses: astral-sh/setup-uv@v6
24
+ - name: Check the tag matches the package version
25
+ run: |
26
+ tag="${GITHUB_REF_NAME#v}"
27
+ project="$(python3 -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
28
+ package="$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' letify/__init__.py)"
29
+ echo "tag=$tag pyproject=$project __version__=$package"
30
+ if [ "$tag" != "$project" ] || [ "$tag" != "$package" ]; then
31
+ echo "::error::tag v$tag does not match pyproject.toml ($project) and letify/__init__.py ($package)"
32
+ exit 1
33
+ fi
34
+ - name: Build
35
+ run: uv build
36
+ - uses: actions/upload-artifact@v4
37
+ with:
38
+ name: dist
39
+ path: dist/
40
+
41
+ publish:
42
+ needs: build
43
+ runs-on: ubuntu-latest
44
+ environment:
45
+ name: pypi
46
+ url: https://pypi.org/project/letify/
47
+ permissions:
48
+ id-token: write
49
+ steps:
50
+ - uses: actions/download-artifact@v4
51
+ with:
52
+ name: dist
53
+ path: dist/
54
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,260 @@
1
+ ############################################
2
+ # Rust Project
3
+ #
4
+
5
+ # Generated by Cargo
6
+ # will have compiled files and executables
7
+ debug
8
+ target
9
+
10
+ # These are backup files generated by rustfmt
11
+ **/*.rs.bk
12
+
13
+ # MSVC Windows builds of rustc generate these, which store debugging information
14
+ *.pdb
15
+
16
+ # Generated by cargo mutants
17
+ # Contains mutation testing data
18
+ **/mutants.out*/
19
+
20
+ # RustRover
21
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
22
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
23
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
24
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
25
+ #.idea/
26
+
27
+
28
+ ############################################
29
+ # Python Project
30
+ #
31
+
32
+ # Byte-compiled / optimized / DLL files
33
+ __pycache__/
34
+ *.py[codz]
35
+ *$py.class
36
+
37
+ # C extensions
38
+ *.so
39
+
40
+ # Distribution / packaging
41
+ .Python
42
+ build/
43
+ develop-eggs/
44
+ dist/
45
+ downloads/
46
+ eggs/
47
+ .eggs/
48
+ lib/
49
+ lib64/
50
+ parts/
51
+ sdist/
52
+ var/
53
+ wheels/
54
+ share/python-wheels/
55
+ *.egg-info/
56
+ .installed.cfg
57
+ *.egg
58
+ MANIFEST
59
+
60
+ # PyInstaller
61
+ # Usually these files are written by a python script from a template
62
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
63
+ *.manifest
64
+ *.spec
65
+
66
+ # Installer logs
67
+ pip-log.txt
68
+ pip-delete-this-directory.txt
69
+
70
+ # Unit test / coverage reports
71
+ htmlcov/
72
+ .tox/
73
+ .nox/
74
+ .coverage
75
+ .coverage.*
76
+ .cache
77
+ nosetests.xml
78
+ coverage.xml
79
+ *.cover
80
+ *.py.cover
81
+ .hypothesis/
82
+ .pytest_cache/
83
+ cover/
84
+
85
+ # Translations
86
+ *.mo
87
+ *.pot
88
+
89
+ # Django stuff:
90
+ *.log
91
+ local_settings.py
92
+ db.sqlite3
93
+ db.sqlite3-journal
94
+
95
+ # Flask stuff:
96
+ instance/
97
+ .webassets-cache
98
+
99
+ # Scrapy stuff:
100
+ .scrapy
101
+
102
+ # Sphinx documentation
103
+ docs/_build/
104
+
105
+ # PyBuilder
106
+ .pybuilder/
107
+ target/
108
+
109
+ # Jupyter Notebook
110
+ .ipynb_checkpoints
111
+
112
+ # IPython
113
+ profile_default/
114
+ ipython_config.py
115
+
116
+ # pyenv
117
+ # For a library or package, you might want to ignore these files since the code is
118
+ # intended to run in multiple environments; otherwise, check them in:
119
+ # .python-version
120
+
121
+ # pipenv
122
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
123
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
124
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
125
+ # install all needed dependencies.
126
+ # Pipfile.lock
127
+
128
+ # UV
129
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
130
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
131
+ # commonly ignored for libraries.
132
+ uv.lock
133
+
134
+ # poetry
135
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
136
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
137
+ # commonly ignored for libraries.
138
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
139
+ # poetry.lock
140
+ # poetry.toml
141
+
142
+ # pdm
143
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
144
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
145
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
146
+ # pdm.lock
147
+ # pdm.toml
148
+ .pdm-python
149
+ .pdm-build/
150
+
151
+ # pixi
152
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
153
+ # pixi.lock
154
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
155
+ # in the .venv directory. It is recommended not to include this directory in version control.
156
+ .pixi
157
+
158
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
159
+ __pypackages__/
160
+
161
+ # Celery stuff
162
+ celerybeat-schedule
163
+ celerybeat.pid
164
+
165
+ # Redis
166
+ *.rdb
167
+ *.aof
168
+ *.pid
169
+
170
+ # RabbitMQ
171
+ mnesia/
172
+ rabbitmq/
173
+ rabbitmq-data/
174
+
175
+ # ActiveMQ
176
+ activemq-data/
177
+
178
+ # SageMath parsed files
179
+ *.sage.py
180
+
181
+ # Environments
182
+ .env
183
+ .envrc
184
+ .venv
185
+ env/
186
+ venv/
187
+ ENV/
188
+ env.bak/
189
+ venv.bak/
190
+
191
+ # Spyder project settings
192
+ .spyderproject
193
+ .spyproject
194
+
195
+ # Rope project settings
196
+ .ropeproject
197
+
198
+ # mkdocs documentation
199
+ /site
200
+
201
+ # mypy
202
+ .mypy_cache/
203
+ .dmypy.json
204
+ dmypy.json
205
+
206
+ # Pyre type checker
207
+ .pyre/
208
+
209
+ # pytype static type analyzer
210
+ .pytype/
211
+
212
+ # Cython debug symbols
213
+ cython_debug/
214
+
215
+ # PyCharm
216
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
217
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
218
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
219
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
220
+ # .idea/
221
+
222
+ # Abstra
223
+ # Abstra is an AI-powered process automation framework.
224
+ # Ignore directories containing user credentials, local state, and settings.
225
+ # Learn more at https://abstra.io/docs
226
+ .abstra/
227
+
228
+ # Visual Studio Code
229
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
230
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
231
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
232
+ # you could uncomment the following to ignore the entire vscode folder
233
+ # .vscode/
234
+ # Temporary file for partial code execution
235
+ tempCodeRunnerFile.py
236
+
237
+ # Ruff stuff:
238
+ .ruff_cache/
239
+
240
+ # PyPI configuration file
241
+ .pypirc
242
+
243
+ # Marimo
244
+ marimo/_static/
245
+ marimo/_lsp/
246
+ __marimo__/
247
+
248
+ # Streamlit
249
+ .streamlit/secrets.toml
250
+
251
+ # AI Agents
252
+ .agents
253
+ .claude
254
+
255
+ # Built shim artifacts, produced by shim/build.py
256
+ letify/remoting/lib/
257
+
258
+ # Artifacts the examples write where they run
259
+ examples/**/sweep-report.json
260
+ examples/**/.letify
@@ -0,0 +1,4 @@
1
+ root: develop
2
+ prefix: feat/
3
+ spec: docs/SPEC.md
4
+ intent: docs/INTENT.md
letify-1.0.0/LICENSE ADDED
@@ -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.