incite-app 0.1.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 (123) hide show
  1. incite_app-0.1.0/.env.example +15 -0
  2. incite_app-0.1.0/.github/workflows/ci.yml +39 -0
  3. incite_app-0.1.0/.github/workflows/publish.yml +30 -0
  4. incite_app-0.1.0/.gitignore +102 -0
  5. incite_app-0.1.0/CONTRIBUTING.md +116 -0
  6. incite_app-0.1.0/LICENSE +190 -0
  7. incite_app-0.1.0/PKG-INFO +245 -0
  8. incite_app-0.1.0/README.md +175 -0
  9. incite_app-0.1.0/config/default.yaml +43 -0
  10. incite_app-0.1.0/pyproject.toml +143 -0
  11. incite_app-0.1.0/src/incite/__init__.py +3 -0
  12. incite_app-0.1.0/src/incite/acquire/__init__.py +16 -0
  13. incite_app-0.1.0/src/incite/acquire/config.py +95 -0
  14. incite_app-0.1.0/src/incite/acquire/pipeline.py +414 -0
  15. incite_app-0.1.0/src/incite/acquire/proxy.py +242 -0
  16. incite_app-0.1.0/src/incite/acquire/resolver.py +57 -0
  17. incite_app-0.1.0/src/incite/acquire/session.py +437 -0
  18. incite_app-0.1.0/src/incite/acquire/unpaywall.py +127 -0
  19. incite_app-0.1.0/src/incite/agent.py +1145 -0
  20. incite_app-0.1.0/src/incite/api.py +423 -0
  21. incite_app-0.1.0/src/incite/cli/__init__.py +59 -0
  22. incite_app-0.1.0/src/incite/cli/_shared.py +15 -0
  23. incite_app-0.1.0/src/incite/cli/acquire.py +332 -0
  24. incite_app-0.1.0/src/incite/cli/agent.py +330 -0
  25. incite_app-0.1.0/src/incite/cli/cloud.py +230 -0
  26. incite_app-0.1.0/src/incite/cli/core.py +1127 -0
  27. incite_app-0.1.0/src/incite/cli/data.py +328 -0
  28. incite_app-0.1.0/src/incite/cli/doctor.py +285 -0
  29. incite_app-0.1.0/src/incite/cli/experiments.py +85 -0
  30. incite_app-0.1.0/src/incite/cli/finetune.py +948 -0
  31. incite_app-0.1.0/src/incite/cli/llm.py +461 -0
  32. incite_app-0.1.0/src/incite/cli/paperpile.py +274 -0
  33. incite_app-0.1.0/src/incite/cli/serve.py +235 -0
  34. incite_app-0.1.0/src/incite/cli/setup.py +570 -0
  35. incite_app-0.1.0/src/incite/corpus/__init__.py +31 -0
  36. incite_app-0.1.0/src/incite/corpus/arxiv_fulltext.py +321 -0
  37. incite_app-0.1.0/src/incite/corpus/batch_utils.py +28 -0
  38. incite_app-0.1.0/src/incite/corpus/chunking.py +578 -0
  39. incite_app-0.1.0/src/incite/corpus/cloud_client.py +648 -0
  40. incite_app-0.1.0/src/incite/corpus/contextual_enrichment.py +459 -0
  41. incite_app-0.1.0/src/incite/corpus/enrichment.py +717 -0
  42. incite_app-0.1.0/src/incite/corpus/folder_source.py +424 -0
  43. incite_app-0.1.0/src/incite/corpus/fulltext_extraction.py +207 -0
  44. incite_app-0.1.0/src/incite/corpus/grobid.py +381 -0
  45. incite_app-0.1.0/src/incite/corpus/grobid_chunking.py +244 -0
  46. incite_app-0.1.0/src/incite/corpus/llm_enrichment.py +265 -0
  47. incite_app-0.1.0/src/incite/corpus/loader.py +256 -0
  48. incite_app-0.1.0/src/incite/corpus/openalex.py +247 -0
  49. incite_app-0.1.0/src/incite/corpus/paperpile_source.py +368 -0
  50. incite_app-0.1.0/src/incite/corpus/pdf_extractor.py +505 -0
  51. incite_app-0.1.0/src/incite/corpus/pipeline.py +398 -0
  52. incite_app-0.1.0/src/incite/corpus/query_reformulation.py +283 -0
  53. incite_app-0.1.0/src/incite/corpus/semantic_scholar.py +393 -0
  54. incite_app-0.1.0/src/incite/corpus/sentence_chunking.py +301 -0
  55. incite_app-0.1.0/src/incite/corpus/synthetic_contexts.py +631 -0
  56. incite_app-0.1.0/src/incite/corpus/synthetic_db.py +281 -0
  57. incite_app-0.1.0/src/incite/corpus/unarxiv.py +901 -0
  58. incite_app-0.1.0/src/incite/corpus/zotero_reader.py +462 -0
  59. incite_app-0.1.0/src/incite/discovery/__init__.py +1 -0
  60. incite_app-0.1.0/src/incite/discovery/citation_graph.py +237 -0
  61. incite_app-0.1.0/src/incite/discovery/engine.py +808 -0
  62. incite_app-0.1.0/src/incite/discovery/graph_analysis.py +212 -0
  63. incite_app-0.1.0/src/incite/discovery/graph_cache.py +82 -0
  64. incite_app-0.1.0/src/incite/discovery/models.py +107 -0
  65. incite_app-0.1.0/src/incite/embeddings/__init__.py +7 -0
  66. incite_app-0.1.0/src/incite/embeddings/base.py +84 -0
  67. incite_app-0.1.0/src/incite/embeddings/chunk_store.py +245 -0
  68. incite_app-0.1.0/src/incite/embeddings/finetuned.py +396 -0
  69. incite_app-0.1.0/src/incite/embeddings/specter.py +568 -0
  70. incite_app-0.1.0/src/incite/embeddings/stores.py +290 -0
  71. incite_app-0.1.0/src/incite/embeddings/voyage.py +119 -0
  72. incite_app-0.1.0/src/incite/evaluation/__init__.py +39 -0
  73. incite_app-0.1.0/src/incite/evaluation/batch_diagnosis.py +240 -0
  74. incite_app-0.1.0/src/incite/evaluation/experiment_log.py +418 -0
  75. incite_app-0.1.0/src/incite/evaluation/failure_analysis.py +475 -0
  76. incite_app-0.1.0/src/incite/evaluation/intent_taxonomy.py +31 -0
  77. incite_app-0.1.0/src/incite/evaluation/metrics.py +957 -0
  78. incite_app-0.1.0/src/incite/evaluation/passage_metrics.py +413 -0
  79. incite_app-0.1.0/src/incite/export/__init__.py +7 -0
  80. incite_app-0.1.0/src/incite/export/base.py +27 -0
  81. incite_app-0.1.0/src/incite/export/bibtex.py +103 -0
  82. incite_app-0.1.0/src/incite/export/ris.py +50 -0
  83. incite_app-0.1.0/src/incite/finetuning/__init__.py +1 -0
  84. incite_app-0.1.0/src/incite/finetuning/_passage/__init__.py +5 -0
  85. incite_app-0.1.0/src/incite/finetuning/_passage/fulltext.py +621 -0
  86. incite_app-0.1.0/src/incite/finetuning/_passage/generation.py +489 -0
  87. incite_app-0.1.0/src/incite/finetuning/data_pipeline.py +172 -0
  88. incite_app-0.1.0/src/incite/finetuning/data_preparation.py +459 -0
  89. incite_app-0.1.0/src/incite/finetuning/data_sources.py +507 -0
  90. incite_app-0.1.0/src/incite/finetuning/enrichment.py +572 -0
  91. incite_app-0.1.0/src/incite/finetuning/fulltext_passages.py +16 -0
  92. incite_app-0.1.0/src/incite/finetuning/passage_generation.py +17 -0
  93. incite_app-0.1.0/src/incite/finetuning/pretrain.py +248 -0
  94. incite_app-0.1.0/src/incite/finetuning/quality.py +484 -0
  95. incite_app-0.1.0/src/incite/finetuning/s2_context_mining.py +851 -0
  96. incite_app-0.1.0/src/incite/finetuning/s2orc_citation_mining.py +817 -0
  97. incite_app-0.1.0/src/incite/finetuning/s2orc_streaming.py +686 -0
  98. incite_app-0.1.0/src/incite/finetuning/spot_check.py +149 -0
  99. incite_app-0.1.0/src/incite/finetuning/train.py +345 -0
  100. incite_app-0.1.0/src/incite/finetuning/train_reranker.py +844 -0
  101. incite_app-0.1.0/src/incite/finetuning/types.py +119 -0
  102. incite_app-0.1.0/src/incite/finetuning/validation.py +95 -0
  103. incite_app-0.1.0/src/incite/interfaces.py +113 -0
  104. incite_app-0.1.0/src/incite/models.py +658 -0
  105. incite_app-0.1.0/src/incite/retrieval/__init__.py +35 -0
  106. incite_app-0.1.0/src/incite/retrieval/bm25.py +342 -0
  107. incite_app-0.1.0/src/incite/retrieval/factory.py +625 -0
  108. incite_app-0.1.0/src/incite/retrieval/hybrid.py +188 -0
  109. incite_app-0.1.0/src/incite/retrieval/multi_scale.py +145 -0
  110. incite_app-0.1.0/src/incite/retrieval/neural.py +145 -0
  111. incite_app-0.1.0/src/incite/retrieval/paragraph.py +462 -0
  112. incite_app-0.1.0/src/incite/retrieval/reranker.py +429 -0
  113. incite_app-0.1.0/src/incite/retrieval/two_stage.py +209 -0
  114. incite_app-0.1.0/src/incite/tray/__init__.py +16 -0
  115. incite_app-0.1.0/src/incite/tray/app.py +140 -0
  116. incite_app-0.1.0/src/incite/tray/server_manager.py +196 -0
  117. incite_app-0.1.0/src/incite/utils.py +279 -0
  118. incite_app-0.1.0/src/incite/visualization/__init__.py +0 -0
  119. incite_app-0.1.0/src/incite/visualization/plotly_charts.py +130 -0
  120. incite_app-0.1.0/src/incite/visualization/umap_projection.py +271 -0
  121. incite_app-0.1.0/src/incite/webapp/__init__.py +17 -0
  122. incite_app-0.1.0/src/incite/webapp/app.py +553 -0
  123. incite_app-0.1.0/src/incite/webapp/state.py +736 -0
@@ -0,0 +1,15 @@
1
+ # Semantic Scholar API Key (optional, for metadata enrichment)
2
+ # Get yours at: https://www.semanticscholar.org/product/api
3
+ SEMANTIC_SCHOLAR_API_KEY=
4
+
5
+ # Anthropic API Key (optional, for LLM-powered enrichment)
6
+ # Get yours at: https://console.anthropic.com
7
+ ANTHROPIC_API_KEY=
8
+
9
+ # Voyage AI API Key (optional, only needed for voyage embedder)
10
+ # Get yours at: https://www.voyageai.com
11
+ VOYAGE_API_KEY=
12
+
13
+ # Email for OpenAlex/Unpaywall polite pool (optional, for metadata lookup)
14
+ # Required for higher rate limits when fetching paper metadata
15
+ OPENALEX_EMAIL=
@@ -0,0 +1,39 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ lint:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: '3.11'
19
+ - name: Install ruff
20
+ run: pip install ruff
21
+ - name: Lint with ruff
22
+ run: ruff check src/incite
23
+ - name: Format check with ruff
24
+ run: ruff format --check src/incite
25
+
26
+ test:
27
+ runs-on: ubuntu-latest
28
+ strategy:
29
+ matrix:
30
+ python-version: ['3.10', '3.11', '3.12']
31
+ steps:
32
+ - uses: actions/checkout@v4
33
+ - uses: actions/setup-python@v5
34
+ with:
35
+ python-version: ${{ matrix.python-version }}
36
+ - name: Install dependencies
37
+ run: pip install -e ".[dev,pdf]"
38
+ - name: Run tests
39
+ run: pytest
@@ -0,0 +1,30 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ id-token: write
9
+
10
+ jobs:
11
+ build-and-publish:
12
+ runs-on: ubuntu-latest
13
+ environment: pypi
14
+
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.11"
22
+
23
+ - name: Install build dependencies
24
+ run: pip install build
25
+
26
+ - name: Build package
27
+ run: python -m build
28
+
29
+ - name: Publish to PyPI
30
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,102 @@
1
+ # OAuth / credentials
2
+ client_secret*.json
3
+
4
+ # Python
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+ *.so
9
+ .Python
10
+ build/
11
+ develop-eggs/
12
+ dist/
13
+ downloads/
14
+ eggs/
15
+ .eggs/
16
+ lib/
17
+ lib64/
18
+ parts/
19
+ sdist/
20
+ var/
21
+ wheels/
22
+ *.egg-info/
23
+ .installed.cfg
24
+ *.egg
25
+
26
+ # Virtual environments
27
+ venv/
28
+ ENV/
29
+ env/
30
+ .venv/
31
+
32
+ # IDE
33
+ .idea/
34
+ .vscode/
35
+ *.swp
36
+ *.swo
37
+ *~
38
+
39
+ # Testing
40
+ .tox/
41
+ .coverage
42
+ .coverage.*
43
+ htmlcov/
44
+ .pytest_cache/
45
+ .mypy_cache/
46
+ .ruff_cache/
47
+
48
+ # Data (large files)
49
+ data/raw/
50
+ data/finetuning/
51
+ data/finetuning_v2/
52
+ data/processed/*.faiss
53
+ data/processed/*.db
54
+ data/processed/index/
55
+ data/processed/chunks.jsonl
56
+ data/processed/sentence_chunks.jsonl
57
+ data/processed/chunk_index_*/
58
+ data/processed/sentence-index-*/
59
+ data/processed/aggregation_test_results.json
60
+ data/processed/paragraph_baseline_report.json
61
+ data/processed/test_set_old.jsonl
62
+ data/processed/openalex_to_arxiv.json
63
+ data/processed/openalex_to_arxiv_all.json
64
+ *.npy
65
+ *.pkl
66
+
67
+ # Models (large files)
68
+ models/
69
+ *.bin
70
+ *.pt
71
+ *.onnx
72
+
73
+ # Logs
74
+ *.log
75
+ logs/
76
+
77
+ # Secrets
78
+ .env
79
+ *.key
80
+ secrets.yaml
81
+
82
+ # Tailwind standalone CLI binary
83
+ cloud/tailwindcss
84
+
85
+ # Node.js
86
+ node_modules/
87
+ package-lock.json
88
+
89
+ # OS
90
+ .DS_Store
91
+ Thumbs.db
92
+
93
+ # Claude/Swarm runtime state
94
+ .claude-flow/
95
+ .swarm/
96
+ conversation.txt
97
+
98
+ # Google Apps Script
99
+ .clasp.json
100
+
101
+ # Jupyter
102
+ .ipynb_checkpoints/
@@ -0,0 +1,116 @@
1
+ # Contributing to inCite
2
+
3
+ ## 1. Welcome
4
+
5
+ Thank you for your interest in contributing to inCite, a local-first citation recommendation system. We appreciate contributions of all kinds: bug fixes, new features, documentation improvements, and issue reports.
6
+
7
+ inCite is licensed under the Apache 2.0 License. By contributing, you agree that your contributions will be licensed under the same terms.
8
+
9
+ ## 2. Development Setup
10
+
11
+ ```bash
12
+ git clone https://github.com/galenphall/incite.git
13
+ cd incite
14
+ pip install -e ".[dev]"
15
+ pytest
16
+ ```
17
+
18
+ This installs inCite in editable mode with all development dependencies and runs the test suite to verify everything works.
19
+
20
+ ## 3. Code Style
21
+
22
+ - Follow PEP 8 conventions.
23
+ - Use ruff for linting and formatting: `ruff check src/incite && ruff format src/incite`
24
+ - Use type annotations on all public function signatures.
25
+ - Line length: 100 characters.
26
+ - Keep files under 800 lines. Extract utilities when a file grows beyond that.
27
+ - Keep functions under 50 lines. Avoid deep nesting (more than 4 levels).
28
+ - Prefer immutable data structures where practical (`@dataclass(frozen=True)`, `NamedTuple`).
29
+ - No hardcoded values -- use constants or configuration.
30
+
31
+ ## 4. Testing
32
+
33
+ - Run the full test suite: `pytest`
34
+ - Mark slow tests (embedding, FAISS, API calls) with `@pytest.mark.slow`.
35
+ - When fixing a bug, write a test that reproduces it first, then fix the code.
36
+ - Mock external APIs (Semantic Scholar, OpenAlex, Voyage AI) in tests.
37
+ - Use small fixture data, not full corpus files.
38
+ - For ML/evaluation changes, also run: `incite evaluate --method hybrid`
39
+
40
+ ## 5. How to Add a New Embedder
41
+
42
+ 1. Create a new class extending `BaseEmbedder` (defined in `src/incite/embeddings/base.py`) in a file under `src/incite/embeddings/`.
43
+ 2. Implement the required interface:
44
+ - `embed(texts: list[str]) -> np.ndarray` -- batch embedding
45
+ - `embed_query(query: str) -> np.ndarray` -- single query embedding
46
+ - `dimension` property -- returns the embedding dimensionality
47
+ 3. Register the embedder in the `EMBEDDERS` dict in `src/incite/retrieval/factory.py`.
48
+ 4. Add tests for the new embedder.
49
+ 5. Benchmark against existing embedders: `incite evaluate --method hybrid`
50
+
51
+ ## 6. Architecture Overview
52
+
53
+ The codebase is organized by feature/domain:
54
+
55
+ | Path | Purpose |
56
+ |------|---------|
57
+ | `src/incite/models.py` | Data models: `Paper`, `Chunk`, `CitationContext`, `RetrievalResult`, `TrainingExample` |
58
+ | `src/incite/interfaces.py` | ABCs and Protocols: `Retriever`, `VectorStore`, `CorpusSource`, `BaseEmbedder` |
59
+ | `src/incite/embeddings/` | Embedder implementations and FAISS vector stores |
60
+ | `src/incite/retrieval/` | Neural, BM25, and hybrid retrievers, plus the factory for creating them |
61
+ | `src/incite/corpus/` | Data ingestion: Zotero reader, PDF extraction, chunking, enrichment |
62
+ | `src/incite/evaluation/` | Metrics (MRR, R@k, C-index), experiment logging, significance tests |
63
+ | `src/incite/cli/` | CLI subcommands (Click-based) |
64
+ | `src/incite/finetuning/` | Training data generation and model training pipeline |
65
+ | `editor-plugins/` | Editor integrations (Obsidian, VS Code, Google Docs, Chrome) |
66
+ | `cloud/` | Cloud service: multi-user web tier and GROBID processing |
67
+
68
+ ## 7. Canonical Embedding Text Format
69
+
70
+ All code that formats text for embedding **must** use these functions defined in `src/incite/models.py`:
71
+
72
+ | Function | Purpose |
73
+ |----------|---------|
74
+ | `format_paper_embedding_text()` | Paper-level embedding text |
75
+ | `format_passage_embedding_text()` | Passage-level embedding text |
76
+ | `format_paper_metadata_prefix()` | Chunk context prefix |
77
+ | `format_author_string()` | Consistent author formatting |
78
+
79
+ Never use raw string concatenation to build embedding text. Never use `[SEP]` as a separator -- always use period-space (`. `) via the canonical functions. Inconsistent formatting causes train/eval distribution shift and degrades retrieval quality.
80
+
81
+ ## 8. Pull Request Process
82
+
83
+ 1. Fork the repository and create a feature branch from `main`.
84
+ 2. Write tests for new features and bug fixes.
85
+ 3. Ensure `pytest` passes and `ruff check src/incite` reports no issues.
86
+ 4. Keep PRs focused: one feature or fix per PR.
87
+ 5. Write a clear PR description explaining **why** the change is needed, not just what changed.
88
+ 6. If your change affects retrieval quality, include evaluation results (`incite evaluate --method hybrid`).
89
+
90
+ ## 9. Reporting Issues
91
+
92
+ Use [GitHub Issues](https://github.com/galenphall/incite/issues) to report bugs or request features.
93
+
94
+ For bug reports, please include:
95
+
96
+ - What you expected to happen.
97
+ - What actually happened (include error messages or tracebacks).
98
+ - Steps to reproduce the issue.
99
+ - Your Python version and OS.
100
+
101
+ For performance issues, also include:
102
+
103
+ - Which embedder you are using (e.g., `minilm-ft`, `granite-ft`).
104
+ - Your corpus size (number of papers).
105
+ - Whether you are using hybrid or neural-only retrieval.
106
+
107
+ ## 10. Code of Conduct
108
+
109
+ We are committed to providing a welcoming and respectful environment for everyone. Contributors are expected to:
110
+
111
+ - Be respectful and constructive in all interactions.
112
+ - Accept constructive criticism gracefully.
113
+ - Focus on what is best for the project and its users.
114
+ - Show empathy toward other contributors.
115
+
116
+ Harassment, trolling, and deliberately exclusionary behavior will not be tolerated. Maintainers reserve the right to remove, edit, or reject contributions that do not align with these standards.
@@ -0,0 +1,190 @@
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 in 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 exercising
24
+ 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 Object
36
+ form, made available under the License, as indicated by a copyright
37
+ notice that is included in or attached to the work (an example is
38
+ 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 Work and any modifications thereof or derivative works thereof,
50
+ that is intentionally submitted to, or received by, Licensor for inclusion
51
+ in the Work by the copyright owner or by an individual or Legal Entity
52
+ authorized to submit on behalf of the copyright owner. For the purposes
53
+ of this definition, "submitted" means any form of electronic, verbal, or
54
+ written communication sent to the Licensor or its representatives,
55
+ including but not limited to communication on electronic mailing lists,
56
+ source code control systems, and issue tracking systems that are managed
57
+ by, or on behalf of, the Licensor for the purpose of discussing and
58
+ improving the Work, but excluding communication that is conspicuously
59
+ marked or otherwise designated in writing by the copyright owner as
60
+ "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, then any
107
+ Derivative Works that You distribute must include a readable
108
+ 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 from the Work, provided that
120
+ such additional attribution notices cannot be construed as
121
+ 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 of 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 Contribution.
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
+ Copyright 2024 Galen Hall
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.