healthycode 0.2.1__py3-none-any.whl

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.
@@ -0,0 +1,360 @@
1
+ Metadata-Version: 2.4
2
+ Name: healthycode
3
+ Version: 0.2.1
4
+ Summary: Client to generate GrimoireLab metrics for Project Health using the software analytics platform GrimoireLab
5
+ License: GPL-3.0+
6
+ License-File: AUTHORS.rst
7
+ License-File: LICENSES/Apache-2.0.txt
8
+ License-File: LICENSES/BSD-2-Clause-Views.txt
9
+ License-File: LICENSES/GPL-3.0-or-later.txt
10
+ License-File: LICENSES/MIT.txt
11
+ License-File: NOTICE
12
+ Author: Bitergia Developers
13
+ Requires-Python: >=3.11,<4.0
14
+ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: 3.15
21
+ Requires-Dist: click (>=8.1.8,<9.0.0)
22
+ Requires-Dist: grimoirelab-toolkit (>=1.2.8,<2.0.0)
23
+ Requires-Dist: numpy (<2.5.0)
24
+ Requires-Dist: opensearch-py (>=3.0.0,<4.0.0)
25
+ Requires-Dist: requests (>=2.32.3,<3.0.0)
26
+ Requires-Dist: spdx-tools (>=0.8.3,<0.9.0)
27
+ Description-Content-Type: text/markdown
28
+
29
+ # HealthyCode
30
+
31
+ Open source project health metrics and scores, built on an open model and open
32
+ methodology, with open data and open source tools.
33
+
34
+ HealthyCode attempts to tell you how healthy an open source projects is, so you
35
+ can make more informed, data-driven decisions about which packages to adopt,
36
+ upgrade, or replace. HealthyCode collect a project's development history events
37
+ (like commits, contributors, and other activities) and turns these into health
38
+ "metrics". The metrics are then used to compute a health score using a scoring
39
+ procedure where each metrics is weighted, and weights are tuned from a training
40
+ data sets. The score is backed by these metrics, enabling to see why a package
41
+ scored and how, and to set own policy thresholds.
42
+
43
+ HealthyCode uses [GrimoireLab](https://github.com/chaoss/grimoirelab) to collect
44
+ data, [ScanCode.io](https://github.com/aboutcode-org/scancode.io) to run
45
+ pipelines, and [PurlDB](https://github.com/aboutcode-org/purldb) to store and
46
+ access the data.
47
+
48
+ The main entry point is the PurlDB `health/` API endpoint accessed with a PURL.
49
+
50
+ A live demo system is available at: https://health.purldb.io/api/health/
51
+
52
+ Here is an example using `pkg:npm/lodash`: https://health.purldb.io/api/health/?purl=pkg:npm/lodash
53
+
54
+ ## Why project health matters
55
+
56
+ Most software is assembled from open source packages. Security scanners are good
57
+ at flagging a package with a known vulnerability, but they say nothing about a
58
+ package whose last maintainer has quietly moved on...
59
+
60
+ > HealthyCode starts with npm. Other ecosystems will follow.
61
+ >
62
+
63
+ > npm is the largest package registry in the world, and its packages depend on
64
+ > each other heavily. A small library can sit underneath thousands of projects.
65
+ >
66
+ > With npm packages, this risk can spread quickly as the JavaScript developers prefer
67
+ > publishing many smaller packages, and many small unmaintained library can become
68
+ > a single point of failure for everything built on it, and are also easier to
69
+ > take over. When a maintainer's account or email domain expires, an attacker can
70
+ > claim it and publish a malicious release.
71
+
72
+ HealthyCode helps you spot these packages before you depend on them, and helps
73
+ you keep watching the ones you already use as dependencies.
74
+
75
+ ## What's provided
76
+
77
+ For this first iteration, we designed HealthyCode's scoring model to be specific
78
+ to one open source packaging ecosystem, npm. We will extend future support to
79
+ other ecosystems.
80
+
81
+ Given a PURL (Package-URL) for a package, HealthyCode's API returns:
82
+
83
+ - Health metrics from the project's Git history, such as recent commits,
84
+ contributor activity and growth, days since last commit, pony factor (how many
85
+ people do half the work), and the elephant factor (how many organizations do
86
+ half the work). The full list is in [METRICS.md](METRICS.md).
87
+
88
+ - A health score is calculated from the metrics, with a value between 0 and 1
89
+ that is the model's estimate of how likely the project is to be healthy.
90
+ 0 means unhealthy or risky, and 1 means healthier or less risky.
91
+
92
+ - The settings used for the run: time window, thresholds, and the versions of
93
+ HealthyCode and the scoring model.
94
+
95
+ The API results are JSON, so you can pull these into a dashboard, a report, or
96
+ in your software supply processing and management pipelines, including policies
97
+ to allow or block or alert in your own tooling about the health of a software
98
+ project. HealthyCode returns metrics (evidence) and a score (interpretation) and
99
+ you make decisions based you own policies.
100
+
101
+
102
+ Here is a sample result for the `pkg:npm/semver` package:
103
+ ```json
104
+ {
105
+ "purl": "pkg:npm/semver",
106
+ "source_purl": "pkg:github/npm/node-semver",
107
+ "vcs_url": "https://github.com/npm/node-semver.git",
108
+ "scoring_model": "npm-health-0.2",
109
+ "score": 1.0,
110
+ "commit_range": {
111
+ "last_commit": "c45ec23921ef57d82a420cb6f04f28cf12563ab2",
112
+ "first_commit": "ab9e28a582f524e8d40157f3d2b75fcc764d0765",
113
+ "last_commit_date": "2026-10-26T15:48:35-04:00",
114
+ "first_commit_date": "2025-10-30T09:00:25-07:00"
115
+ },
116
+ "run_start_date": "2026-10-27T13:52:38.948855Z",
117
+ "run_end_date": "2026-10-27T13:52:39.721434Z",
118
+ "metrics": {
119
+ "pony_factor": 3,
120
+ "total_commits": 56,
121
+ "recent_commits": 56,
122
+ "active_branches": 16,
123
+ "elephant_factor": 2,
124
+ "file_types_code": 99,
125
+ "commits_per_week": 1.073972602739726,
126
+ "commits_per_year": 56.0,
127
+ "file_types_other": 55,
128
+ "commits_per_month": 4.602739726027398,
129
+ "file_types_binary": 0,
130
+ "message_size_mean": 1803.4464285714287,
131
+ "contributor_growth": 6,
132
+ "found_file_license": 1,
133
+ "message_size_total": 100993,
134
+ "total_contributors": 17,
135
+ "found_file_adopters": 0,
136
+ "message_size_median": 471,
137
+ "recent_contributors": 17,
138
+ "total_organizations": 5,
139
+ "recent_organizations": 5,
140
+ "days_since_last_commit": 0,
141
+ "returning_contributors": 0,
142
+ "commit_size_added_lines": 10619,
143
+ "contributor_growth_rate": 0.8571428571428571,
144
+ "coefficient_of_variation": 1.145922229081032,
145
+ "commit_size_removed_lines": 449,
146
+ "commits_over_periods_rate": 1.0,
147
+ "developer_categories_core": 6,
148
+ "developer_categories_casual": 3,
149
+ "developer_categories_regular": 8,
150
+ "casual_regular_contributors_rate": 0.21428571428571427
151
+ },
152
+ "date_collected": "2026-10-27T13:52:40.041878Z"
153
+ }
154
+
155
+ ```
156
+
157
+ ## Who is HealthyCode for?
158
+
159
+ We designed HealthyCode to support software supply chain(s) decisions making.
160
+ This is for:
161
+
162
+ - Software and engineering teams deciding whether to adopt, upgrade, replace, or
163
+ drop a dependency in their codebases
164
+
165
+ - Open source program offices (OSPO) and software supply chains teams tracking
166
+ the packages used in their organization apps, systems and products
167
+
168
+ - Maintainers who want an outside view of their own project
169
+
170
+ - Researchers studying open source sustainability
171
+
172
+ ## When not to use HealthyCode
173
+
174
+ HealthyCode measures or rather approximates an open source project's health. It
175
+ does not scan for vulnerabilities, check license compliance, or assess a project's
176
+ configuration or security posture. For those, see:
177
+
178
+ - [OpenSSF ScoreCard](https://github.com/ossf/scorecard) for security posture and configuration
179
+ - [VulnerableCode](https://github.com/aboutcode-org/vulnerablecode) for vulnerability lookup
180
+ - [ScanCode.io](https://github.com/aboutcode-org/scancode.io) to orchestrate scans including health scans
181
+ - [ScanCode Toolkit](https://github.com/aboutcode-org/scancode-toolkit) for origin, license, copyright, and dependencies
182
+ - [PurlDB](https://github.com/aboutcode-org/purldb) also hosts the health/API endpoint.
183
+ - [ClearlyDefined](https://github.com/clearlydefined/) that pre-scans and curates open source packages.
184
+
185
+
186
+ ## Getting started
187
+
188
+ You can access health data a package using its PURL with the PurlDB `/health` API: https://health.purldb.io/api/health
189
+
190
+ Here are two examples:
191
+ - https://health.purldb.io/api/health/?purl=pkg:npm/semver
192
+ - https://health.purldb.io/api/health/?purl=pkg:npm/semver&format=json
193
+
194
+
195
+ You call the health API for a package using its PURL (for example,
196
+ `pkg:npm/semver`) and get JSON back. If the package has already been analyzed,
197
+ the answer comes back immediately. If not, you can poll the same PURL until the
198
+ metrics and scores are collected and computed. The request will return first a
199
+ "new" status and then a "submitted" status when the job is processed.
200
+ The results are cached for a week, and the JSON is returned last.
201
+
202
+ The processing goes from PurlDB `/health` API endpoint through ScanCode.io
203
+ `scan_repo_health` pipeline to the HealthyCode npm-health scoring model (for
204
+ now, for npms only), that calls GrimoireLab to collect project metrics.
205
+
206
+ ## Access health data through ScanCode.io pipelines
207
+
208
+ Run HealthyCode using ScanCode.io `scan_repo_health` next to your other scans:
209
+ https://github.com/aboutcode-org/scancode.io/blob/main/scanpipe/pipelines/scan_repo_health.py
210
+
211
+ That pipeline takes a Git repository URL, collects the data with GrimoireLab,
212
+ and saves the metrics and score with the project results. Your ScanCode.io needs
213
+ access to a configured GrimoireLab instance and HealthyCode models.
214
+
215
+ ## Run HealthyCode locally
216
+
217
+ See [Installation guide]/(deploy/README.md).
218
+
219
+ ## High Theory of Operations for HealthyCode
220
+
221
+ - PurlDB health API receives a PURL. If the health score is available in the DB
222
+ the score and metrics are return as-is.
223
+ - Otherwise, PurlDB finds the corresponding Git repository.
224
+ - PurlDB calls is scan worker (ScanCode.io) to run the "scan_repo_health"
225
+ pipeline on that git repo
226
+ - That pipeline calls the HealthyCode script
227
+ - HealthyCode calls GrimoireLab to clone and collect the repository history
228
+ - When the data is ready, HealthyCode computes the metrics over a time window.
229
+ - The npm health model turns those metrics into a score.
230
+ - The metrics, score, and run settings are written to a JSON file
231
+ - That JSON is passed back to ScanCode.io, and then passed back PurlDB
232
+ - PurlDB stores the metrics and score for the PURL and return the API results as JSON
233
+
234
+ #### High-level overview of HealthyCode components
235
+
236
+ ![High-level components of HealthyCode](https://github.com/user-attachments/assets/9fa54e45-a6f9-43b5-8c55-5d7159aa71ed)
237
+
238
+ #### Drilling down on PurlDB and ScanCode.io
239
+
240
+ ![PurlDB and ScanCode.io overview](https://github.com/user-attachments/assets/46d2c199-ddbc-43e0-8963-1a438bdcc20a)
241
+
242
+ #### Drilling down on ScanCode.io + GrimoireLab
243
+
244
+ ![ScanCode.io + GrimoireLab overview](https://github.com/user-attachments/assets/9d5d3bff-1e2d-4be3-8b86-132f02d9151e)
245
+
246
+
247
+ ## Methodology for selecting metrics
248
+
249
+ HealthyCode uses the Goal-Question-Metric (GQM) approach. You start with what
250
+ you care about (the goal), then work out what you need to know (the questions),
251
+ and only then choose what you can measure (the metrics).
252
+
253
+ For example:
254
+
255
+ - Goal: The project stays maintained
256
+ - Question: Would it survive losing its top contributor?
257
+ - Metrics: Pony factor (CHAOSS Contributor Absence Factor aka. "Bus Factor" ),
258
+ e.g., top author's share of commits over the last 12 months.
259
+
260
+ ## Scoring model for health
261
+
262
+ The model was trained on about 1,150 popular npm packages drawn from Census II,
263
+ Census III, and deps.dev. As open source experts, we reviewed about 200 of these
264
+ npm packages and classified them as "healthy" or "unhealthy" to create a training
265
+ dataset. We computed a logistic regression to determine and learn learned which
266
+ metrics best discriminate between the two groups and how much weight each metric
267
+ would get in the score computation.
268
+
269
+ All the backing data, the Jupyter notebook, a workflow diagram, and our expert
270
+ classifications guidelines are in the [model/npm](model/npm) directory for
271
+ reference.
272
+
273
+ This is a first version and the weights and thresholds will be tuned as more
274
+ packages are analyzed; we will define new models fo other ecosystems using the
275
+ same approch; and new questions and metrics will be added, drawing on
276
+ [CHAOSS](https://www.chaoss.community/),
277
+ [OpenSSF Scorecard](https://github.com/ossf/scorecard),
278
+ and foundation maturity models.
279
+
280
+ We plan to enrich back the [OpenSSF
281
+ Scorecard](https://github.com/ossf/scorecard) with these metrics as additionals
282
+ checks.
283
+
284
+
285
+ ## How this project compares to other approaches and alternatives
286
+
287
+ We have published a state-of-the-art review:
288
+ https://aboutcode.org/blog/npm-health-state-of-the-art
289
+
290
+ People have been working on open source health from these three directions:
291
+
292
+ 1. Organizations improving how they reuse and contribute to open source, through
293
+ work such as OpenChain, the FINOS Open Source Maturity Model, the Good
294
+ Governance Initiative, and the TODO Group.
295
+
296
+ 2. Open source Foundations grading their own projects, such as the Apache
297
+ Software Foundation maturity model, the Eclipse Foundation Development Process,
298
+ and the CNCF project lifecycle.
299
+
300
+ 3. Community projects that work across ecosystems, such as the CHAOSS project
301
+ that defines open health metrics and models (and where the GrimoireLab projects
302
+ lives), and the OpenSSF Scorecard that scores security practices, project
303
+ configuration and security posture.
304
+
305
+ Multiple commercial companies also sell or publish open source package health
306
+ scores, but in most cases these are opaque, and you get the score without the
307
+ underlying data or weight calculation, making results hard to review, trace or
308
+ reproduce.
309
+
310
+ ## Most importantly, our results can be audited and traced
311
+
312
+ The code, the collected data, and the model weights are open and public. Each
313
+ score is backed by its supporting metrics; metrics comes from public
314
+ project data and history that can be verified.
315
+
316
+ And you can also rerun the analysis on your own infrastructure to verify, and
317
+ reproduce the results. The metrics follow CHAOSS definitions where they exist,
318
+ and data collection is run by GrimoireLab, a CHAOSS project.
319
+
320
+ ## Project status
321
+
322
+ HealthyCode is under active development with npm as the first supported
323
+ ecosystem. The selected metrics and models will change as more packages are
324
+ analyzed, and if a result looks wrong to you, please open an issue (including the
325
+ PURL used) and what you expected. That feedback will go directly into
326
+ improving the model with new and improved training data!
327
+
328
+ ## HealthyCode in the larger AboutCode context
329
+
330
+ HealthyCode is an initiative that is part of [AboutCode](https://aboutcode.org),
331
+ a family of open source tools, open data, and open standards for healthy and
332
+ safe software supply chains, together with ScanCode, VulnerableCode, PurlDB,
333
+ DejaCode, and PURL.
334
+
335
+ You can get results in the PurlDB health API by PURL, the standard package
336
+ identifier used in SBOMs and vulnerability databases and across software supply
337
+ chains. Exposing the /health endpoint in PurlDB also puts a package's health
338
+ data next to its license and origin data collected in PurlDB from ScanCode,
339
+ eventually delivering better visibility into the packages from multiple angles.
340
+
341
+ HealthyCode is developed by the AboutCode and GrimoireLab community and
342
+ contributors like you!
343
+
344
+ ## Contributing
345
+
346
+ Issues and pull requests are welcome.
347
+ Please follow the [Code of Conduct](CODE_OF_CONDUCT.rst).
348
+
349
+ Join the [AboutCode community Slack](https://join.slack.com/t/aboutcode-org/shared_invite/zt-31uzazd7l-tBHcqKUKkX6jUEPRLswiNw)
350
+ to chat with maintainers, contributors, and users.
351
+
352
+ ## License
353
+
354
+ The code is mainly licensed under GPL-3.0-or-later. See [LICENSES/GPL-3.0-or-later.txt](LICENSES/GPL-3.0-or-later.txt).
355
+
356
+
357
+
358
+ Data produced by HealthyCode is licensed under
359
+ [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).
360
+
@@ -0,0 +1,15 @@
1
+ grimoirelab_metrics/cli.py,sha256=Ko3f1qhJec0Ht-yP4DMVDXtNVxC2R-UKkjmgSBLT5hI,20567
2
+ grimoirelab_metrics/grimoirelab_client.py,sha256=An573yETYELcNq5Tv_6JvbcZRhcXjUEiHNLTRYVzh_U,4876
3
+ grimoirelab_metrics/metrics.py,sha256=vSXd8cGseDgMe2EqQ20w60Jb2Uuy74I1CzywRkQv-4k,29516
4
+ grimoirelab_metrics/metrics.schema.json,sha256=p_n9YSG63zXeGiOA4kmQdp4W-MuH-anXrThJ5-EEQ0A,17145
5
+ grimoirelab_metrics/metrics_model.py,sha256=ysm9g0D1sguL1cS_oLaQMquTr7oTEEu05HMuIidmIEQ,2958
6
+ healthycode-0.2.1.dist-info/METADATA,sha256=z6SlUJx0B1YqWzJgwczrN0fwX7AaJl0QrV1QPWcEd_4,15547
7
+ healthycode-0.2.1.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
8
+ healthycode-0.2.1.dist-info/entry_points.txt,sha256=5dgq2y_Yx3Q0vCf85ieIm7pE5NvBXQan0BSw92zY3SQ,83
9
+ healthycode-0.2.1.dist-info/licenses/AUTHORS.rst,sha256=VvSy_LT6zIqOv05qN1Kwf4vQSCZuNnRMgy9-qhyRr3Q,101
10
+ healthycode-0.2.1.dist-info/licenses/LICENSES/Apache-2.0.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
11
+ healthycode-0.2.1.dist-info/licenses/LICENSES/BSD-2-Clause-Views.txt,sha256=zy2OCMXDOIBNNh_ucD-I9St_3HEOq4fM0HLPCDaW9vw,1519
12
+ healthycode-0.2.1.dist-info/licenses/LICENSES/GPL-3.0-or-later.txt,sha256=-5gWaMGKJ54oX8TYP7oeg2zITdTapzyWl9PP0tispuA,34674
13
+ healthycode-0.2.1.dist-info/licenses/LICENSES/MIT.txt,sha256=sFeF-fGOZxa6tjQksRRUUTuZQ6IiWVtwQRAJIC_FkrU,1078
14
+ healthycode-0.2.1.dist-info/licenses/NOTICE,sha256=fkLIlzyP8zWNnPbFSXkTInNgYl35THH5-J8vMKuNzhc,761
15
+ healthycode-0.2.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.5.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ grimoirelab-metrics=grimoirelab_metrics.cli:grimoirelab_metrics
3
+
@@ -0,0 +1,4 @@
1
+ The following organizations or individuals have contributed to this repo:
2
+
3
+ - AboutCode
4
+ - GrimoireLab
@@ -0,0 +1,73 @@
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, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright [yyyy] [name of copyright owner]
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
@@ -0,0 +1,11 @@
1
+ Copyright (c) <year> <owner> All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
+
5
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6
+
7
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+
9
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10
+
11
+ The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the copyright holders or contributors.