stoms 0.2.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 (64) hide show
  1. stoms-0.2.0/.github/workflows/docs.yml +39 -0
  2. stoms-0.2.0/.gitignore +248 -0
  3. stoms-0.2.0/.pre-commit-config.yaml +13 -0
  4. stoms-0.2.0/AUTHORS +1 -0
  5. stoms-0.2.0/CONTEXT.md +187 -0
  6. stoms-0.2.0/LICENSE +177 -0
  7. stoms-0.2.0/PKG-INFO +125 -0
  8. stoms-0.2.0/README.md +105 -0
  9. stoms-0.2.0/compose.yaml +16 -0
  10. stoms-0.2.0/docs/README.md +32 -0
  11. stoms-0.2.0/docs/adr/0001-separate-ledger-entry-and-record-identity.md +19 -0
  12. stoms-0.2.0/docs/adr/0002-default-units-for-standard-properties.md +11 -0
  13. stoms-0.2.0/docs/api.md +173 -0
  14. stoms-0.2.0/docs/getting-started.md +98 -0
  15. stoms-0.2.0/docs/index.md +55 -0
  16. stoms-0.2.0/docs/limitations.md +38 -0
  17. stoms-0.2.0/docs/postgres.md +90 -0
  18. stoms-0.2.0/docs/researcher-guide.md +260 -0
  19. stoms-0.2.0/docs/use-cases.md +63 -0
  20. stoms-0.2.0/docs/vasp-parser.md +65 -0
  21. stoms-0.2.0/examples/batch_and_transfer.py +93 -0
  22. stoms-0.2.0/examples/demo.py +102 -0
  23. stoms-0.2.0/examples/postgres_transfer.py +31 -0
  24. stoms-0.2.0/mkdocs.yml +15 -0
  25. stoms-0.2.0/pyproject.toml +79 -0
  26. stoms-0.2.0/scripts/release/cut_public.sh +265 -0
  27. stoms-0.2.0/src/stoms/__init__.py +1 -0
  28. stoms-0.2.0/src/stoms/atomsledger/__init__.py +120 -0
  29. stoms-0.2.0/src/stoms/atomsledger/backends/__init__.py +11 -0
  30. stoms-0.2.0/src/stoms/atomsledger/backends/hdf5.py +696 -0
  31. stoms-0.2.0/src/stoms/atomsledger/backends/postgres.py +1783 -0
  32. stoms-0.2.0/src/stoms/atomsledger/backends/sqlite.py +1820 -0
  33. stoms-0.2.0/src/stoms/atomsledger/catalog.py +28 -0
  34. stoms-0.2.0/src/stoms/atomsledger/exceptions.py +123 -0
  35. stoms-0.2.0/src/stoms/atomsledger/model.py +867 -0
  36. stoms-0.2.0/src/stoms/atomsledger/repository.py +110 -0
  37. stoms-0.2.0/src/stoms/atomsledger/serialization.py +501 -0
  38. stoms-0.2.0/src/stoms/atomsledger/service.py +1255 -0
  39. stoms-0.2.0/src/stoms/atomsledger/transfer.py +381 -0
  40. stoms-0.2.0/src/stoms/cli.py +580 -0
  41. stoms-0.2.0/src/stoms/parsers/__init__.py +1 -0
  42. stoms-0.2.0/src/stoms/parsers/vasp.py +748 -0
  43. stoms-0.2.0/src/stoms/py.typed +0 -0
  44. stoms-0.2.0/tests/postgres/conftest.py +46 -0
  45. stoms-0.2.0/tests/postgres/test_concurrency_and_transfer.py +170 -0
  46. stoms-0.2.0/tests/postgres/test_core_records.py +257 -0
  47. stoms-0.2.0/tests/postgres/test_harness.py +16 -0
  48. stoms-0.2.0/tests/postgres/test_stored_queries_and_aggregations.py +162 -0
  49. stoms-0.2.0/tests/test_aggregations.py +219 -0
  50. stoms-0.2.0/tests/test_cli.py +275 -0
  51. stoms-0.2.0/tests/test_cli_iteration.py +8 -0
  52. stoms-0.2.0/tests/test_post_ingestion_tags.py +190 -0
  53. stoms-0.2.0/tests/test_repository_contract.py +6 -0
  54. stoms-0.2.0/tests/test_saved_queries_and_export.py +408 -0
  55. stoms-0.2.0/tests/test_sqlite_backend.py +353 -0
  56. stoms-0.2.0/tests/test_sqlite_catalog.py +125 -0
  57. stoms-0.2.0/tests/test_stored_queries_and_snapshot_members.py +134 -0
  58. stoms-0.2.0/tests/test_strict_selection.py +196 -0
  59. stoms-0.2.0/tests/test_structure_content_validation.py +66 -0
  60. stoms-0.2.0/tests/test_structure_deduplication.py +329 -0
  61. stoms-0.2.0/tests/test_structure_source_spec.py +142 -0
  62. stoms-0.2.0/tests/test_supported_backends.py +13 -0
  63. stoms-0.2.0/tests/test_vasp_parser.py +380 -0
  64. stoms-0.2.0/uv.lock +2729 -0
@@ -0,0 +1,39 @@
1
+ name: Publish documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ concurrency:
14
+ group: pages
15
+ cancel-in-progress: false
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.11"
25
+ - run: pip install "mkdocs>=1.6"
26
+ - run: mkdocs build --strict
27
+ - uses: actions/upload-pages-artifact@v3
28
+ with:
29
+ path: site
30
+
31
+ deploy:
32
+ environment:
33
+ name: github-pages
34
+ url: ${{ steps.deployment.outputs.page_url }}
35
+ needs: build
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - id: deployment
39
+ uses: actions/deploy-pages@v4
stoms-0.2.0/.gitignore ADDED
@@ -0,0 +1,248 @@
1
+
2
+ # Created by https://www.gitignore.io/api/vim,macos,emacs,python,visualstudiocode
3
+ # Edit at https://www.gitignore.io/?templates=vim,macos,emacs,python,visualstudiocode
4
+
5
+ ### Emacs ###
6
+ # -*- mode: gitignore; -*-
7
+ *~
8
+ \#*\#
9
+ /.emacs.desktop
10
+ /.emacs.desktop.lock
11
+ *.elc
12
+ auto-save-list
13
+ tramp
14
+ .\#*
15
+
16
+ # Org-mode
17
+ .org-id-locations
18
+ *_archive
19
+
20
+ # flymake-mode
21
+ *_flymake.*
22
+
23
+ # eshell files
24
+ /eshell/history
25
+ /eshell/lastdir
26
+
27
+ # elpa packages
28
+ /elpa/
29
+
30
+ # reftex files
31
+ *.rel
32
+
33
+ # AUCTeX auto folder
34
+ /auto/
35
+
36
+ # cask packages
37
+ .cask/
38
+ dist/
39
+
40
+ # Flycheck
41
+ flycheck_*.el
42
+
43
+ # server auth directory
44
+ /server/
45
+
46
+ # projectiles files
47
+ .projectile
48
+
49
+ # directory configuration
50
+ .dir-locals.el
51
+
52
+ # network security
53
+ /network-security.data
54
+
55
+
56
+ ### macOS ###
57
+ # General
58
+ .DS_Store
59
+ .AppleDouble
60
+ .LSOverride
61
+
62
+ # Icon must end with two \r
63
+ Icon
64
+
65
+ # Thumbnails
66
+ ._*
67
+
68
+ # Files that might appear in the root of a volume
69
+ .DocumentRevisions-V100
70
+ .fseventsd
71
+ .Spotlight-V100
72
+ .TemporaryItems
73
+ .Trashes
74
+ .VolumeIcon.icns
75
+ .com.apple.timemachine.donotpresent
76
+
77
+ # Directories potentially created on remote AFP share
78
+ .AppleDB
79
+ .AppleDesktop
80
+ Network Trash Folder
81
+ Temporary Items
82
+ .apdisk
83
+
84
+ ### Python ###
85
+ # Byte-compiled / optimized / DLL files
86
+ __pycache__/
87
+ *.py[cod]
88
+ *$py.class
89
+
90
+ # C extensions
91
+ *.so
92
+
93
+ # Distribution / packaging
94
+ .Python
95
+ build/
96
+ develop-eggs/
97
+ downloads/
98
+ eggs/
99
+ .eggs/
100
+ lib/
101
+ lib64/
102
+ parts/
103
+ sdist/
104
+ var/
105
+ wheels/
106
+ pip-wheel-metadata/
107
+ share/python-wheels/
108
+ *.egg-info/
109
+ .installed.cfg
110
+ *.egg
111
+ MANIFEST
112
+
113
+ # PyInstaller
114
+ # Usually these files are written by a python script from a template
115
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
116
+ *.manifest
117
+ *.spec
118
+
119
+ # Installer logs
120
+ pip-log.txt
121
+ pip-delete-this-directory.txt
122
+
123
+ # Unit test / coverage reports
124
+ htmlcov/
125
+ .tox/
126
+ .nox/
127
+ .coverage
128
+ .coverage.*
129
+ .cache
130
+ nosetests.xml
131
+ coverage.xml
132
+ *.cover
133
+ .hypothesis/
134
+ .pytest_cache/
135
+
136
+ # Translations
137
+ *.mo
138
+ *.pot
139
+
140
+ # Django stuff:
141
+ *.log
142
+ local_settings.py
143
+ db.sqlite3
144
+ db.sqlite3-journal
145
+
146
+ # Flask stuff:
147
+ instance/
148
+ .webassets-cache
149
+
150
+ # Scrapy stuff:
151
+ .scrapy
152
+
153
+ # Sphinx documentation
154
+ docs/_build/
155
+
156
+ # PyBuilder
157
+ target/
158
+
159
+ # Jupyter Notebook
160
+ .ipynb_checkpoints
161
+
162
+ # IPython
163
+ profile_default/
164
+ ipython_config.py
165
+
166
+ # pyenv
167
+ .python-version
168
+
169
+ # pipenv
170
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
171
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
172
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
173
+ # install all needed dependencies.
174
+ #Pipfile.lock
175
+
176
+ # celery beat schedule file
177
+ celerybeat-schedule
178
+
179
+ # SageMath parsed files
180
+ *.sage.py
181
+
182
+ # Environments
183
+ .env
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
+ ### Vim ###
210
+ # Swap
211
+ [._]*.s[a-v][a-z]
212
+ [._]*.sw[a-p]
213
+ [._]s[a-rt-v][a-z]
214
+ [._]ss[a-gi-z]
215
+ [._]sw[a-p]
216
+
217
+ # Session
218
+ Session.vim
219
+ Sessionx.vim
220
+
221
+ # Temporary
222
+ .netrwhist
223
+ # Auto-generated tag files
224
+ tags
225
+ # Persistent undo
226
+ [._]*.un~
227
+
228
+ ### VisualStudioCode ###
229
+ .vscode/*
230
+
231
+ ### VisualStudioCode Patch ###
232
+ # Ignore all local history of files
233
+ .history
234
+
235
+ # Weights & Biases
236
+ wandb/
237
+
238
+ # Model checkpoints
239
+ *.pt
240
+ *.pth
241
+ *.ckpt
242
+
243
+ # Scratch files (spikes, local issues)
244
+ # .scratch/
245
+
246
+ # End of https://www.gitignore.io/api/vim,macos,emacs,python,visualstudiocode
247
+
248
+ temp/
@@ -0,0 +1,13 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: end-of-file-fixer
6
+ - id: check-added-large-files
7
+ args: [--maxkb=500000]
8
+ - repo: https://github.com/astral-sh/ruff-pre-commit
9
+ rev: v0.15.22
10
+ hooks:
11
+ - id: ruff-check
12
+ args: [--fix]
13
+ - id: ruff-format
stoms-0.2.0/AUTHORS ADDED
@@ -0,0 +1 @@
1
+ Ralf Wanzenboeck <ralf.wanzenboeck@tuwien.ac.at>
stoms-0.2.0/CONTEXT.md ADDED
@@ -0,0 +1,187 @@
1
+ # STOMS (Storage Tool Of Minor Significance)
2
+
3
+ AtomsLedger is an immutable, provenance-first record store for atomistic
4
+ research data. Every ledger has the same data model and behavior; ledger scopes
5
+ only describe the user's workflow and data-stewardship role.
6
+
7
+ ## Ledger Scopes
8
+
9
+ **Dev-ledger**:
10
+ A SQLite ledger used for local experimentation, prototyping, or scoping. A
11
+ project may use any number of dev-ledgers at any point in its lifecycle.
12
+ _Avoid_: scratch ledger, test ledger
13
+
14
+ **Project-ledger**:
15
+ A SQLite ledger used as the authoritative record for one research project,
16
+ including production results and selected dev data.
17
+ _Avoid_: project namespace, project partition
18
+
19
+ **Research-ledger**:
20
+ A SQLite ledger that holds data from multiple research projects.
21
+ _Avoid_: master ledger, global ledger
22
+
23
+ **Promotion**:
24
+ The additive transfer of records from one ledger into another. It does not have
25
+ scope-specific storage semantics; target ledger-entry IDs are not transferred.
26
+ _Avoid_: sync, merge, move
27
+
28
+ **Ingestion**:
29
+ The creation of immutable ledger records from structures or calculation results
30
+ produced outside the ledger. Record provenance and tags are selected at this
31
+ boundary and cannot be changed afterward.
32
+ _Avoid_: import, tagging, annotation
33
+
34
+ **Tag**:
35
+ A user-defined exact, case-sensitive string. Ingestion tags are attached through
36
+ immutable record provenance; post-ingestion tags are mutable annotations stored
37
+ in SQLite association tables. Namespaced forms such as `project:foo` and
38
+ `split:train` are recommended but not enforced.
39
+ _Avoid_: label, mutable category
40
+
41
+ **Effective tags**:
42
+ The union of immutable ingestion tags and append-only post-ingestion tags. Reads,
43
+ queries, catalog entries, selections, and exports expose effective tags without
44
+ changing provenance or record fingerprints.
45
+ _Avoid_: rewritten provenance tags
46
+
47
+ **Minimum provenance**:
48
+ The required `created_by` and `purpose` values on every ingested structure and
49
+ evaluation. Immutable ingestion tags, notes, and strict JSON `metadata` provide
50
+ optional per-record audit context. Structure-production configuration belongs to
51
+ `StructureSourceSpec`; workflow definitions and parent lineage are outside the
52
+ ledger's scope.
53
+ _Avoid_: workflow specification, provenance registry
54
+
55
+ **Training dataset**:
56
+ An aggregation of selected structures for model training. Evaluations provide
57
+ labels for those structures but are not the dataset itself.
58
+ _Avoid_: saved query, mutable record collection
59
+
60
+ **Dynamic saved query**:
61
+ An immutable saved query whose criteria are evaluated against the ledger when
62
+ used, so matching membership may grow as records are ingested.
63
+ _Avoid_: live table, mutable query
64
+
65
+ **Frozen saved query**:
66
+ An immutable saved query that selects explicit record identities, fixing its
67
+ membership without duplicating record payloads.
68
+ _Avoid_: copied dataset, data snapshot
69
+
70
+ **Saved query**:
71
+ An optional immutable query definition with a user-supplied unique label. STOMS
72
+ does not save ordinary queries automatically and rejects a duplicate label. It
73
+ defines a view over structure criteria and evaluator requirements; listing saved
74
+ queries exposes both selections. Every saved query has exactly one evaluator
75
+ selector.
76
+ _Avoid_: dataset, query version
77
+
78
+ **Strict paired selection**:
79
+ A request for specified structures and evaluator requirements that succeeds
80
+ only when every requested structure has every required evaluation. Missing data
81
+ causes an error rather than producing a partial result.
82
+ _Avoid_: best-effort pairing, partial selection
83
+
84
+ **Catalog**:
85
+ A read-only facility for listing and searching ledger metadata and evaluation
86
+ availability before requesting strict data selections. For every matched
87
+ structure, it exposes available evaluator identities and property names without
88
+ loading numerical result payloads.
89
+ _Avoid_: data browser, mutable index
90
+
91
+ **Evaluator selector**:
92
+ A caller-defined set of exact `MethodSpec` field requirements used to select
93
+ evaluations. The caller chooses its granularity, from one supplied field to a
94
+ complete method specification; the ledger does not infer scientific equivalence.
95
+ For strict selection, it must match exactly one evaluation for every selected
96
+ structure; zero or multiple matches are errors.
97
+ _Avoid_: evaluator equivalence, fuzzy method match
98
+
99
+ **Evaluator label**:
100
+ The human-readable evaluator name stored in `MethodSpec.name`. Version, code,
101
+ model ID, and parameters provide structured disambiguation; tags do not define
102
+ evaluator identity.
103
+ _Avoid_: evaluator tag, method tag
104
+
105
+ **Record retrieval**:
106
+ The default read operation returns complete immutable structure and evaluation
107
+ records. Callers extract numerical properties for their own analysis.
108
+ _Avoid_: plot data, analysis result
109
+
110
+ **Numerical projection**:
111
+ An application-neutral read operation that returns aligned record identities
112
+ and NumPy values for one selected numerical property without computing analysis
113
+ metrics or plots. It retains the original selection query as metadata and fails
114
+ when the selected values have different declared units.
115
+ _Avoid_: parity data, metric result
116
+
117
+ **Default units**:
118
+ The units assigned during ingestion when a standard numerical property has no
119
+ explicit unit. Energy defaults to `eV`, forces to `eV/angstrom`, and node energy
120
+ to `eV`; an explicit unit overrides the corresponding default.
121
+ _Avoid_: implicit units, assumed units
122
+
123
+ **Node energy**:
124
+ A one-dimensional optional output from MACE with one value for every graph node.
125
+ For the current MACE inputs, its shape is `(n,)`, where `n` is the structure's
126
+ atom count. It is not a STOMS-defined per-atom-energy concept.
127
+ _Avoid_: per-atom energy, atomic energy
128
+
129
+ **Standard evaluation properties**:
130
+ The initial property contract comprises total `energy` as a scalar or
131
+ one-element array, optional `forces` with shape `(n, 3)`, and optional MACE
132
+ `node_energy` with shape `(n,)`, where `n` is the structure's atom count.
133
+ _Avoid_: calculator state, analysis result
134
+
135
+ **Export traceability**:
136
+ The structure and evaluation identities, tags, evaluator label, and declared
137
+ units retained with an exported extxyz frame.
138
+ _Avoid_: training metadata, plot metadata
139
+
140
+ **Default extxyz labels**:
141
+ An extxyz training export writes total energy as `REF_energy` in `Atoms.info`
142
+ and forces as `REF_forces` in `Atoms.arrays`. Optional `node_energy` is omitted
143
+ unless explicitly requested; when included, it is `REF_node_energy` in
144
+ `Atoms.arrays`. Callers may override all three labels.
145
+ _Avoid_: ASE calculator results, implicit export mapping
146
+
147
+ ## Record Identity
148
+
149
+ **Ledger-entry ID**:
150
+ A target-owned identifier used to store a record in one ledger. It is local
151
+ bookkeeping and is not part of the immutable record data.
152
+ _Avoid_: record identity, portable ID
153
+
154
+ **Record identity**:
155
+ An opaque UUID minted when an immutable record is first created and preserved
156
+ when that record is promoted to another ledger.
157
+ _Avoid_: primary key, ledger-entry ID
158
+
159
+ **Creation timestamp**:
160
+ A required timezone-aware UTC timestamp recording when an immutable record was
161
+ created. It is preserved during promotion and is not optional provenance.
162
+ _Avoid_: optional metadata, transfer time
163
+
164
+ **Record fingerprint**:
165
+ A deterministic hash of every immutable part of a record except its
166
+ ledger-entry ID. It verifies that a promoted record is unchanged.
167
+ _Avoid_: content hash, primary key
168
+
169
+ **Scientific content equality**:
170
+ Equality of a record's scientific payload independent of provenance, timestamp,
171
+ and record identity. For structures, this is represented by
172
+ `structure_content_hash`, which covers the calculator-free ASE snapshot.
173
+ _Avoid_: record equality, transfer equality
174
+
175
+ **Structure content hash**:
176
+ A deterministic hash of the calculator-free ASE arrays, cell, PBC, `Atoms.info`,
177
+ and constraints stored in a structure record. It identifies scientific
178
+ structure content independently of provenance and record identity.
179
+ _Avoid_: structure record ID, provenance fingerprint
180
+
181
+ **Structure content conflict**:
182
+ An ingestion input whose calculator-free content matches an existing structure
183
+ but whose immutable ingestion provenance differs. Single ingestion reports
184
+ `StructureContentMatch` values without inserting; a conflicting batch is
185
+ rolled back and raises `StructureContentConflictError`, unless the caller opts
186
+ into equivalent-atoms insertion with `allow_equivalent_atoms=True`.
187
+ _Avoid_: duplicate record, equivalent record insertion
stoms-0.2.0/LICENSE ADDED
@@ -0,0 +1,177 @@
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