pynxtools-xps 0.0.1__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 (53) hide show
  1. pynxtools-xps-0.0.1/.github/ISSUE_TEMPLATE/bug.yaml +33 -0
  2. pynxtools-xps-0.0.1/.github/workflows/publish.yml +38 -0
  3. pynxtools-xps-0.0.1/.github/workflows/pylint.yml +33 -0
  4. pynxtools-xps-0.0.1/.github/workflows/pytest.yml +44 -0
  5. pynxtools-xps-0.0.1/.gitignore +206 -0
  6. pynxtools-xps-0.0.1/.pre-commit-config.yaml +9 -0
  7. pynxtools-xps-0.0.1/.vscode/settings.json +17 -0
  8. pynxtools-xps-0.0.1/LICENSE +201 -0
  9. pynxtools-xps-0.0.1/PKG-INFO +332 -0
  10. pynxtools-xps-0.0.1/README.md +97 -0
  11. pynxtools-xps-0.0.1/dev-requirements.txt +586 -0
  12. pynxtools-xps-0.0.1/examples/README.md +17 -0
  13. pynxtools-xps-0.0.1/examples/sle/Au_25_mbar_O2_no_align.nxs +0 -0
  14. pynxtools-xps-0.0.1/examples/sle/EX439_S718_Au.sle +0 -0
  15. pynxtools-xps-0.0.1/examples/sle/README.md +12 -0
  16. pynxtools-xps-0.0.1/examples/sle/eln_data_sle.yaml +165 -0
  17. pynxtools-xps-0.0.1/examples/sle/params.yaml +8 -0
  18. pynxtools-xps-0.0.1/examples/xml/README.md +23 -0
  19. pynxtools-xps-0.0.1/pynxtools_xps/__init__.py +17 -0
  20. pynxtools-xps-0.0.1/pynxtools_xps/config/config_sle_specs.json +321 -0
  21. pynxtools-xps-0.0.1/pynxtools_xps/config/config_specs_xy.json +286 -0
  22. pynxtools-xps-0.0.1/pynxtools_xps/config/config_txt_scienta.json +282 -0
  23. pynxtools-xps-0.0.1/pynxtools_xps/config/config_txt_vamas_export.json +259 -0
  24. pynxtools-xps-0.0.1/pynxtools_xps/config/config_vms.json +289 -0
  25. pynxtools-xps-0.0.1/pynxtools_xps/config/config_xml_specs.json +249 -0
  26. pynxtools-xps-0.0.1/pynxtools_xps/config/template.json +251 -0
  27. pynxtools-xps-0.0.1/pynxtools_xps/file_parser.py +148 -0
  28. pynxtools-xps-0.0.1/pynxtools_xps/reader.py +444 -0
  29. pynxtools-xps-0.0.1/pynxtools_xps/reader_utils.py +265 -0
  30. pynxtools-xps-0.0.1/pynxtools_xps/sle/__init__.py +0 -0
  31. pynxtools-xps-0.0.1/pynxtools_xps/sle/sle_specs.py +1892 -0
  32. pynxtools-xps-0.0.1/pynxtools_xps/slh/__init__.py +0 -0
  33. pynxtools-xps-0.0.1/pynxtools_xps/txt/__init__.py +0 -0
  34. pynxtools-xps-0.0.1/pynxtools_xps/txt/txt_scienta.py +574 -0
  35. pynxtools-xps-0.0.1/pynxtools_xps/txt/txt_vamas_export.py +571 -0
  36. pynxtools-xps-0.0.1/pynxtools_xps/vms/__init__.py +0 -0
  37. pynxtools-xps-0.0.1/pynxtools_xps/vms/vamas.py +1035 -0
  38. pynxtools-xps-0.0.1/pynxtools_xps/vms/vamas_data_model.py +125 -0
  39. pynxtools-xps-0.0.1/pynxtools_xps/xml/__init__.py +0 -0
  40. pynxtools-xps-0.0.1/pynxtools_xps/xml/xml_specs.py +755 -0
  41. pynxtools-xps-0.0.1/pynxtools_xps/xy/__init__.py +0 -0
  42. pynxtools-xps-0.0.1/pynxtools_xps/xy/xy_specs.py +809 -0
  43. pynxtools-xps-0.0.1/pynxtools_xps.egg-info/PKG-INFO +332 -0
  44. pynxtools-xps-0.0.1/pynxtools_xps.egg-info/SOURCES.txt +51 -0
  45. pynxtools-xps-0.0.1/pynxtools_xps.egg-info/dependency_links.txt +1 -0
  46. pynxtools-xps-0.0.1/pynxtools_xps.egg-info/entry_points.txt +2 -0
  47. pynxtools-xps-0.0.1/pynxtools_xps.egg-info/requires.txt +16 -0
  48. pynxtools-xps-0.0.1/pynxtools_xps.egg-info/top_level.txt +1 -0
  49. pynxtools-xps-0.0.1/pyproject.toml +88 -0
  50. pynxtools-xps-0.0.1/setup.cfg +4 -0
  51. pynxtools-xps-0.0.1/tests/data/xml/In-situ_PBTTT_XPS_SPECS.xml +11872 -0
  52. pynxtools-xps-0.0.1/tests/data/xml/eln_data.yaml +146 -0
  53. pynxtools-xps-0.0.1/tests/test_reader.py +47 -0
@@ -0,0 +1,33 @@
1
+ name: Bug Report
2
+ description: File a bug report
3
+ title: "[Bug]: "
4
+ labels: ["bug"]
5
+ projects: ["FAIRmat-NFDI/pynxtools_xps"]
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ Thanks for taking the time to fill out this bug report!
11
+ - type: input
12
+ id: contact
13
+ attributes:
14
+ label: Contact Details
15
+ description: How can we get in touch with you if we need more info?
16
+ placeholder: ex. email@example.com
17
+ validations:
18
+ required: false
19
+ - type: textarea
20
+ id: what-happened
21
+ attributes:
22
+ label: What happened?
23
+ description: Also tell us, what did you expect to happen?
24
+ placeholder: Tell us what you see!
25
+ value: "A bug happened!"
26
+ validations:
27
+ required: true
28
+ - type: textarea
29
+ id: logs
30
+ attributes:
31
+ label: Relevant log output
32
+ description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
33
+ render: shell
@@ -0,0 +1,38 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+
15
+ jobs:
16
+ deploy:
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - uses: actions/checkout@v3
21
+ with:
22
+ fetch-depth: 0
23
+ submodules: recursive
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v4
26
+ with:
27
+ python-version: "3.x"
28
+ - name: Install dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install build
32
+ - name: Build package
33
+ run: python -m build
34
+ - name: Publish package
35
+ uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
36
+ with:
37
+ user: __token__
38
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,33 @@
1
+ name: linting
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ linting:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+ - name: Set up Python 3.10
11
+ uses: actions/setup-python@v2
12
+ with:
13
+ python-version: "3.10"
14
+ - name: Install dependencies
15
+ run: |
16
+ git submodule sync --recursive
17
+ git submodule update --init --recursive --jobs=4
18
+ python -m pip install --upgrade pip
19
+ - name: Install package
20
+ run: |
21
+ python -m pip install --no-deps .
22
+ - name: Install dev requirements
23
+ run: |
24
+ python -m pip install -r dev-requirements.txt
25
+ - name: ruff
26
+ run: |
27
+ ruff pynxtools_xps tests
28
+ - name: ruff formatting
29
+ run: |
30
+ ruff format --check pynxtools_xps tests
31
+ - name: mypy
32
+ run: |
33
+ mypy pynxtools_xps tests
@@ -0,0 +1,44 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name: pytest
5
+
6
+ on:
7
+ push:
8
+ branches: [main]
9
+ pull_request:
10
+ branches: [main]
11
+
12
+ jobs:
13
+ pytest:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19
+
20
+ steps:
21
+ - uses: actions/checkout@v3
22
+ with:
23
+ fetch-depth: 0
24
+ submodules: recursive
25
+ - name: Set up Python ${{ matrix.python_version }}
26
+ uses: actions/setup-python@v4
27
+ with:
28
+ python-version: ${{ matrix.python_version }}
29
+ - name: Install dependencies
30
+ run: |
31
+ python -m pip install --upgrade pip
32
+ python -m pip install coverage coveralls
33
+ - name: Install package
34
+ run: |
35
+ pip install ".[dev]"
36
+ - name: Test with pytest
37
+ run: |
38
+ coverage run -m pytest -sv --show-capture=no tests
39
+ - name: Submit to coveralls
40
+ continue-on-error: true
41
+ env:
42
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43
+ run: |
44
+ coveralls --service=github
@@ -0,0 +1,206 @@
1
+ # https://github.com/github/gitignore/blob/main/Global/macOS.gitignore
2
+ # General
3
+ .DS_Store
4
+ .AppleDouble
5
+ .LSOverride
6
+
7
+ # Icon must end with two \r
8
+ Icon
9
+
10
+
11
+ # Thumbnails
12
+ ._*
13
+
14
+ # Files that might appear in the root of a volume
15
+ .DocumentRevisions-V100
16
+ .fseventsd
17
+ .Spotlight-V100
18
+ .TemporaryItems
19
+ .Trashes
20
+ .VolumeIcon.icns
21
+ .com.apple.timemachine.donotpresent
22
+
23
+ # Directories potentially created on remote AFP share
24
+ .AppleDB
25
+ .AppleDesktop
26
+ Network Trash Folder
27
+ Temporary Items
28
+ .apdisk
29
+
30
+ # https://github.com/github/gitignore/blob/main/Python.gitignore
31
+
32
+ # Byte-compiled / optimized / DLL files
33
+ __pycache__/
34
+ *.py[cod]
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
+ !tests/data/dataconverter/readers/mpes/Ref_nexus_mpes.log
92
+ !tests/data/nexus/Ref_nexus_test.log
93
+ local_settings.py
94
+ db.sqlite3
95
+ db.sqlite3-journal
96
+
97
+ # Flask stuff:
98
+ instance/
99
+ .webassets-cache
100
+
101
+ # Scrapy stuff:
102
+ .scrapy
103
+
104
+ # Sphinx documentation
105
+ docs/_build/
106
+
107
+ # PyBuilder
108
+ .pybuilder/
109
+ target/
110
+
111
+ # Jupyter Notebook
112
+ .ipynb_checkpoints
113
+
114
+ # IPython
115
+ profile_default/
116
+ ipython_config.py
117
+
118
+ # pyenv
119
+ # For a library or package, you might want to ignore these files since the code is
120
+ # intended to run in multiple environments; otherwise, check them in:
121
+ # .python-version
122
+
123
+ # pipenv
124
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
125
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
126
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
127
+ # install all needed dependencies.
128
+ #Pipfile.lock
129
+
130
+ # poetry
131
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
132
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
133
+ # commonly ignored for libraries.
134
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
135
+ #poetry.lock
136
+
137
+ # pdm
138
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
139
+ #pdm.lock
140
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
141
+ # in version control.
142
+ # https://pdm.fming.dev/#use-with-ide
143
+ .pdm.toml
144
+
145
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
146
+ __pypackages__/
147
+
148
+ # Celery stuff
149
+ celerybeat-schedule
150
+ celerybeat.pid
151
+
152
+ # SageMath parsed files
153
+ *.sage.py
154
+
155
+ # Environments
156
+ .env
157
+ .venv
158
+ env/
159
+ venv/
160
+ ENV/
161
+ env.bak/
162
+ venv.bak/
163
+
164
+ # Spyder project settings
165
+ .spyderproject
166
+ .spyproject
167
+
168
+ # Rope project settings
169
+ .ropeproject
170
+
171
+ # mkdocs documentation
172
+ /site
173
+
174
+ # mypy
175
+ .mypy_cache/
176
+ .dmypy.json
177
+ dmypy.json
178
+
179
+ # Pyre type checker
180
+ .pyre/
181
+
182
+ # pytype static type analyzer
183
+ .pytype/
184
+
185
+ # Cython debug symbols
186
+ cython_debug/
187
+
188
+ # PyCharm
189
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
190
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
191
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
192
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
193
+ #.idea/
194
+
195
+
196
+ # Custom settings
197
+
198
+ .mypy_cache/
199
+ .pyenv
200
+ *.pyc
201
+ *.txt
202
+ !requirements.txt
203
+ !dev-requirements.txt
204
+ !mkdocs-requirements.txt
205
+ build/
206
+ .python-version
@@ -0,0 +1,9 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ # Ruff version.
4
+ rev: v0.1.7
5
+ hooks:
6
+ # Run the linter.
7
+ - id: ruff
8
+ # Run the formatter.
9
+ - id: ruff-format
@@ -0,0 +1,17 @@
1
+ {
2
+ "editor.rulers": [90],
3
+ "editor.renderWhitespace": "all",
4
+ "editor.tabSize": 4,
5
+ "files.trimTrailingWhitespace": true,
6
+ "[python]": {
7
+ "editor.formatOnSave": true,
8
+ "editor.codeActionsOnSave": {
9
+ "source.fixAll": "explicit",
10
+ "source.organizeImports": "explicit"
11
+ },
12
+ "editor.defaultFormatter": "charliermarsh.ruff"
13
+ },
14
+ "python.testing.pytestArgs": ["tests"],
15
+ "python.testing.unittestEnabled": false,
16
+ "python.testing.pytestEnabled": true
17
+ }
@@ -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.