talkpipe-vault 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 (83) hide show
  1. talkpipe_vault-0.0.1/.containerignore +50 -0
  2. talkpipe_vault-0.0.1/.cursor/commands/comprehensive-code-review.md +27 -0
  3. talkpipe_vault-0.0.1/.env.example +59 -0
  4. talkpipe_vault-0.0.1/.flake8 +13 -0
  5. talkpipe_vault-0.0.1/.github/dependabot.yml +48 -0
  6. talkpipe_vault-0.0.1/.github/workflows/ci-cd.yml +238 -0
  7. talkpipe_vault-0.0.1/.gitignore +180 -0
  8. talkpipe_vault-0.0.1/.safety-project.ini +5 -0
  9. talkpipe_vault-0.0.1/.vscode/settings.json +7 -0
  10. talkpipe_vault-0.0.1/AGENTS.md +45 -0
  11. talkpipe_vault-0.0.1/CHANGELOG.md +284 -0
  12. talkpipe_vault-0.0.1/CLAUDE.md +192 -0
  13. talkpipe_vault-0.0.1/Containerfile +59 -0
  14. talkpipe_vault-0.0.1/LICENSE +189 -0
  15. talkpipe_vault-0.0.1/PKG-INFO +707 -0
  16. talkpipe_vault-0.0.1/README.md +655 -0
  17. talkpipe_vault-0.0.1/docker-compose.yml +99 -0
  18. talkpipe_vault-0.0.1/docs/talkpipe_vault.jpg +0 -0
  19. talkpipe_vault-0.0.1/docs/vault-homepage.png +0 -0
  20. talkpipe_vault-0.0.1/docs/vault-search.png +0 -0
  21. talkpipe_vault-0.0.1/pyproject.toml +175 -0
  22. talkpipe_vault-0.0.1/setup.cfg +4 -0
  23. talkpipe_vault-0.0.1/src/talkpipe_vault/__init__.py +8 -0
  24. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/__init__.py +1 -0
  25. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/access_control.py +94 -0
  26. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/credentials.py +196 -0
  27. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/query.py +2173 -0
  28. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/static/favicon.svg +4 -0
  29. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/static/logo.jpg +0 -0
  30. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/static/marked.min.js +69 -0
  31. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/_dir_picker.html +300 -0
  32. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/_document_modal.html +142 -0
  33. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/_search_interactions.html +238 -0
  34. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/_search_results.html +40 -0
  35. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/base.html +921 -0
  36. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/chat.html +507 -0
  37. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/documents.html +145 -0
  38. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/home.html +33 -0
  39. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/keyword_search.html +165 -0
  40. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/search.html +30 -0
  41. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/settings.html +309 -0
  42. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/templates/vaults.html +90 -0
  43. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/user_settings.py +183 -0
  44. talkpipe_vault-0.0.1/src/talkpipe_vault/apps/vault_server.py +93 -0
  45. talkpipe_vault-0.0.1/src/talkpipe_vault/initialize_plugin.py +17 -0
  46. talkpipe_vault-0.0.1/src/talkpipe_vault/pipelines/building_and_watching.py +350 -0
  47. talkpipe_vault-0.0.1/src/talkpipe_vault/pipelines/cli.py +158 -0
  48. talkpipe_vault-0.0.1/src/talkpipe_vault/pipelines/config.py +323 -0
  49. talkpipe_vault-0.0.1/src/talkpipe_vault/pipelines/diagnostics.py +856 -0
  50. talkpipe_vault-0.0.1/src/talkpipe_vault/pipelines/searching_and_prompting.py +349 -0
  51. talkpipe_vault-0.0.1/src/talkpipe_vault/pipelines/vault_metadata.py +128 -0
  52. talkpipe_vault-0.0.1/src/talkpipe_vault/watchdog.py +251 -0
  53. talkpipe_vault-0.0.1/src/talkpipe_vault.egg-info/PKG-INFO +707 -0
  54. talkpipe_vault-0.0.1/src/talkpipe_vault.egg-info/SOURCES.txt +81 -0
  55. talkpipe_vault-0.0.1/src/talkpipe_vault.egg-info/dependency_links.txt +1 -0
  56. talkpipe_vault-0.0.1/src/talkpipe_vault.egg-info/entry_points.txt +17 -0
  57. talkpipe_vault-0.0.1/src/talkpipe_vault.egg-info/requires.txt +29 -0
  58. talkpipe_vault-0.0.1/src/talkpipe_vault.egg-info/scm_file_list.json +77 -0
  59. talkpipe_vault-0.0.1/src/talkpipe_vault.egg-info/scm_version.json +8 -0
  60. talkpipe_vault-0.0.1/src/talkpipe_vault.egg-info/top_level.txt +1 -0
  61. talkpipe_vault-0.0.1/tests/__init__.py +1 -0
  62. talkpipe_vault-0.0.1/tests/conftest.py +82 -0
  63. talkpipe_vault-0.0.1/tests/sampledocs/SampleDocument.docx +0 -0
  64. talkpipe_vault-0.0.1/tests/sampledocs/SampleDocument.html +1546 -0
  65. talkpipe_vault-0.0.1/tests/sampledocs/SampleDocument.pdf +0 -0
  66. talkpipe_vault-0.0.1/tests/talkpipe_vault/__init__.py +1 -0
  67. talkpipe_vault-0.0.1/tests/talkpipe_vault/pipelines/__init__.py +0 -0
  68. talkpipe_vault-0.0.1/tests/talkpipe_vault/pipelines/test_building_and_watching.py +405 -0
  69. talkpipe_vault-0.0.1/tests/talkpipe_vault/pipelines/test_cli.py +33 -0
  70. talkpipe_vault-0.0.1/tests/talkpipe_vault/pipelines/test_searching_and_prompting.py +313 -0
  71. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_access_control.py +229 -0
  72. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_config.py +85 -0
  73. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_containerization.py +29 -0
  74. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_credentials.py +106 -0
  75. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_diagnostics.py +510 -0
  76. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_query_app.py +1173 -0
  77. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_search_lance.py +117 -0
  78. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_segments.py +0 -0
  79. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_server_cli.py +104 -0
  80. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_user_settings.py +38 -0
  81. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_vault_management.py +659 -0
  82. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_vault_metadata.py +80 -0
  83. talkpipe_vault-0.0.1/tests/talkpipe_vault/test_watchdog.py +752 -0
@@ -0,0 +1,50 @@
1
+ # Git files (keep .git for setuptools-scm, but ignore other git files)
2
+ .gitignore
3
+
4
+ # Python cache and virtual environments
5
+ __pycache__
6
+ *.pyc
7
+ *.pyo
8
+ *.pyd
9
+ .Python
10
+ .venv
11
+ venv/
12
+ env/
13
+ ENV/
14
+
15
+ # Build artifacts
16
+ build/
17
+ dist/
18
+ *.egg-info/
19
+
20
+ # Test files
21
+ tests/
22
+ .pytest_cache/
23
+ .coverage
24
+ htmlcov/
25
+ *.cover
26
+
27
+ # Documentation
28
+ docs/
29
+ *.md
30
+ !README.md
31
+
32
+ # IDE files
33
+ .vscode/
34
+ .idea/
35
+ *.swp
36
+ *.swo
37
+ *~
38
+
39
+ # CI/CD
40
+ .github/
41
+
42
+ # Container files (don't copy into container)
43
+ Containerfile
44
+ .dockerignore
45
+ .containerignore
46
+
47
+ # Other
48
+ *.log
49
+ .DS_Store
50
+
@@ -0,0 +1,27 @@
1
+ # Code Review Checklist
2
+
3
+ ## Overview
4
+ Comprehensive checklist for conducting thorough code reviews to ensure quality, security, and maintainability.
5
+
6
+ ## Review Categories
7
+
8
+ ### Functionality
9
+ - [ ] Code does what it's supposed to do
10
+ - [ ] Edge cases are handled
11
+ - [ ] Error handling is appropriate
12
+ - [ ] No obvious bugs or logic errors
13
+
14
+ ### Code Quality
15
+ - [ ] Code is readable and well-structured
16
+ - [ ] Functions are small and focused
17
+ - [ ] Variable names are descriptive
18
+ - [ ] No code duplication
19
+ - [ ] Follows project conventions
20
+ - [ ] Parameters to sources and segments do not document parameters in the code comments.
21
+ - [ ] Parameters to sources and segments use Annotated syntax as documentation.
22
+
23
+ ### Security
24
+ - [ ] No obvious security vulnerabilities
25
+ - [ ] Input validation is present
26
+ - [ ] Sensitive data is handled properly
27
+ - [ ] No hardcoded secrets
@@ -0,0 +1,59 @@
1
+ # Example environment file for TalkPipe Vault
2
+ # Copy this to .env and customize for your deployment
3
+
4
+ # Web server configuration
5
+ VAULT_HOST=0.0.0.0
6
+ VAULT_PORT=8002
7
+
8
+ # Host folder mounted read-only at /documents in the container (compose only);
9
+ # browse to it in the folder picker when indexing. Must exist on the host.
10
+ # VAULT_DOCUMENTS_DIR=~/Documents
11
+
12
+ # Path fences enforced by the web app itself (the container image defaults to
13
+ # these values; outside a container both are unset, i.e. unrestricted):
14
+ # - TALKPIPE_VAULT_ROOT: vaults may only be created/opened/deleted under this
15
+ # single directory.
16
+ # - TALKPIPE_DOCUMENT_ROOTS: folder browsing and indexing are limited to these
17
+ # directories (separate several with ":", the os.pathsep character).
18
+ # Set a variable to empty to lift that restriction.
19
+ # TALKPIPE_VAULT_ROOT=/app/data
20
+ # TALKPIPE_DOCUMENT_ROOTS=/documents
21
+
22
+ # LanceDB directory path (same semantics as makevectordatabase --path);
23
+ # Whoosh index is stored under VAULT_PATH/fulltext_vault
24
+ VAULT_PATH=/app/data/vault
25
+
26
+ # Where web-interface settings (recent vaults, model choices) are persisted
27
+ TALKPIPE_VAULT_HOME=/app/data/vault-home
28
+
29
+ # Model configuration. Defaults: embeddings use model2vec
30
+ # (minishlab/potion-retrieval-32M), which runs fully in-process — no server
31
+ # or API key; chat uses ollama/mistral-small. Uncomment to override:
32
+ # TALKPIPE_EMBEDDING_SOURCE=model2vec
33
+ # TALKPIPE_EMBEDDING_MODEL=minishlab/potion-retrieval-32M
34
+ # TALKPIPE_CHAT_SOURCE=ollama
35
+ # TALKPIPE_CHAT_MODEL=mistral-small
36
+
37
+ # Firewalled / air-gapped deployments (model2vec embeddings):
38
+ # model2vec resolves its model through Hugging Face, which needs outbound
39
+ # access on first use. Without it, loading can hang on connection timeouts —
40
+ # even for an already-cached model, because online mode still makes an etag
41
+ # check. For a restricted network, set offline mode so loads use only the
42
+ # local cache (fast failure instead of a hang), and make the model available
43
+ # locally by either:
44
+ # (a) pointing the embedding model at a downloaded directory (most reliable —
45
+ # no Hugging Face lookup at all), e.g.
46
+ # TALKPIPE_EMBEDDING_MODEL=/app/data/models/potion-retrieval-32M
47
+ # (b) pre-populating the Hugging Face cache on a connected machine / at image
48
+ # build time.
49
+ # HF_HUB_OFFLINE=1
50
+ # HF_HOME is already set to /app/data/hf-cache in the Containerfile, so
51
+ # downloaded models persist in the data volume; override only to relocate it.
52
+ # HF_HOME=/app/data/hf-cache
53
+
54
+ # Optional: provider connection settings
55
+ # OPENAI_API_KEY=sk-your-key-here
56
+ # TalkPipe reads the Ollama server URL from TALKPIPE_OLLAMA_SERVER_URL.
57
+ # Use http://host.containers.internal:11434 when Ollama runs on the container host.
58
+ # Use a network hostname or IP when Ollama runs elsewhere, for example:
59
+ TALKPIPE_OLLAMA_SERVER_URL=http://your-ollama-host:11434
@@ -0,0 +1,13 @@
1
+ [flake8]
2
+ # black is the source of truth for formatting: E203/W503 conflict with its
3
+ # style, and E501 is left to black (it enforces 88 for code but deliberately
4
+ # does not reflow long strings, comments, or docstrings).
5
+ max-line-length = 88
6
+ extend-ignore = E203, W503, E501
7
+ exclude =
8
+ .git,
9
+ __pycache__,
10
+ build,
11
+ dist,
12
+ .venv,
13
+ .eggs
@@ -0,0 +1,48 @@
1
+ version: 2
2
+ updates:
3
+ # Enable version updates for Python dependencies
4
+ - package-ecosystem: "pip"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ open-pull-requests-limit: 10
9
+ reviewers:
10
+ - "tlbauer2"
11
+ assignees:
12
+ - "tlbauer2"
13
+ commit-message:
14
+ prefix: "deps"
15
+ prefix-development: "dev-deps"
16
+ include: "scope"
17
+
18
+ # Enable version updates for Docker
19
+ - package-ecosystem: "docker"
20
+ directory: "/"
21
+ schedule:
22
+ interval: "weekly"
23
+ open-pull-requests-limit: 5
24
+ reviewers:
25
+ - "tlbauer2"
26
+ assignees:
27
+ - "tlbauer2"
28
+ commit-message:
29
+ prefix: "docker"
30
+ include: "scope"
31
+ # Ignore Python 3.14+ until numba supports it
32
+ ignore:
33
+ - dependency-name: "python"
34
+ versions: [">=3.14"]
35
+
36
+ # Enable version updates for GitHub Actions
37
+ - package-ecosystem: "github-actions"
38
+ directory: "/"
39
+ schedule:
40
+ interval: "weekly"
41
+ open-pull-requests-limit: 5
42
+ reviewers:
43
+ - "tlbauer2"
44
+ assignees:
45
+ - "tlbauer2"
46
+ commit-message:
47
+ prefix: "ci"
48
+ include: "scope"
@@ -0,0 +1,238 @@
1
+ name: CI/CD Pipeline
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop, master, 'bugfix/**', 'feature/**', 'chore/**' ]
6
+ pull_request:
7
+ branches: [ main, develop, master, 'bugfix/**', 'feature/**', 'chore/**' ]
8
+ release:
9
+ types: [ published ]
10
+
11
+ env:
12
+ REGISTRY: ghcr.io
13
+ IMAGE_NAME: ${{ github.repository }}
14
+
15
+ jobs:
16
+ test:
17
+ runs-on: ubuntu-latest
18
+ strategy:
19
+ matrix:
20
+ python-version: ['3.11', '3.12', '3.13']
21
+
22
+ steps:
23
+ - uses: actions/checkout@v7
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ uses: actions/setup-python@v7
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+
32
+ - name: Cache pip dependencies
33
+ uses: actions/cache@v6
34
+ with:
35
+ path: ~/.cache/pip
36
+ key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
37
+ restore-keys: |
38
+ ${{ runner.os }}-pip-
39
+
40
+ - name: Install dependencies
41
+ run: |
42
+ python -m pip install --upgrade pip
43
+ pip install -e .[dev]
44
+
45
+ - name: Lint with flake8
46
+ run: |
47
+ flake8 src/ tests/ --count --select=E9,F63,F7,F82 --show-source --statistics
48
+ flake8 src/ tests/ --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
49
+
50
+ - name: Format check with black
51
+ run: |
52
+ black --check src/ tests/
53
+
54
+ - name: Import sort check with isort
55
+ run: |
56
+ isort --check-only src/ tests/
57
+
58
+ - name: Type check with mypy
59
+ run: |
60
+ mypy src/ || true # Allow mypy to fail for now
61
+
62
+ - name: Run tests with coverage
63
+ run: |
64
+ pytest --cov=src --cov-report=xml --cov-report=html
65
+
66
+ - name: Upload coverage to Codecov
67
+ if: matrix.python-version == '3.11'
68
+ uses: codecov/codecov-action@v7
69
+ with:
70
+ files: ./coverage.xml
71
+ flags: unittests
72
+
73
+ security-scan:
74
+ runs-on: ubuntu-latest
75
+ needs: test
76
+ env:
77
+ SAFETY_API_KEY: ${{ secrets.SAFETY_API_KEY }}
78
+
79
+ steps:
80
+ - uses: actions/checkout@v7
81
+
82
+ - name: Set up Python
83
+ uses: actions/setup-python@v7
84
+ with:
85
+ python-version: '3.11'
86
+
87
+ - name: Install dependencies for security scan
88
+ run: |
89
+ python -m pip install --upgrade pip
90
+ pip install -e .[dev,security]
91
+
92
+ - name: Run Bandit security scan
93
+ run: |
94
+ bandit -r src/ -f json -o bandit-report.json || true
95
+ bandit -r src/ -f txt
96
+
97
+ - name: Run Safety dependency scan
98
+ run: |
99
+ safety scan --save-as json safety-report.json || true
100
+ safety scan
101
+
102
+ - name: Upload security scan results
103
+ uses: actions/upload-artifact@v7
104
+ if: always()
105
+ with:
106
+ name: security-reports
107
+ path: |
108
+ bandit-report.json
109
+ safety-report.json
110
+
111
+ build-container:
112
+ runs-on: ubuntu-latest
113
+ needs: [test, security-scan]
114
+ permissions:
115
+ contents: read
116
+ packages: write
117
+ security-events: write
118
+
119
+ steps:
120
+ - name: Checkout repository
121
+ uses: actions/checkout@v7
122
+
123
+ - name: Log in to Container Registry
124
+ uses: docker/login-action@v4
125
+ with:
126
+ registry: ${{ env.REGISTRY }}
127
+ username: ${{ github.actor }}
128
+ password: ${{ secrets.GITHUB_TOKEN }}
129
+
130
+ - name: Set up QEMU
131
+ if: github.event_name == 'release'
132
+ uses: docker/setup-qemu-action@v4
133
+
134
+ - name: Set up Docker Buildx
135
+ uses: docker/setup-buildx-action@v4
136
+
137
+ - name: Extract metadata
138
+ id: meta
139
+ uses: docker/metadata-action@v6
140
+ with:
141
+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
142
+ tags: |
143
+ type=ref,event=branch
144
+ type=ref,event=pr
145
+ type=semver,pattern={{version}}
146
+ type=semver,pattern={{major}}.{{minor}}
147
+ type=sha
148
+ type=raw,value=latest,enable=${{ github.event_name == 'release' && !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') && !contains(github.ref_name, 'a') && !contains(github.ref_name, 'b') }}
149
+ type=raw,value=experimental,enable=${{ github.event_name == 'release' && (contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'a') || contains(github.ref_name, 'b')) }}
150
+
151
+ - name: Build and push Docker image
152
+ uses: docker/build-push-action@v7
153
+ with:
154
+ context: .
155
+ file: ./Containerfile
156
+ platforms: ${{ github.event_name == 'release' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
157
+ push: true
158
+ tags: ${{ steps.meta.outputs.tags }}
159
+ labels: ${{ steps.meta.outputs.labels }}
160
+ cache-from: type=gha
161
+ cache-to: type=gha,mode=max
162
+
163
+ - name: Extract first tag for Trivy
164
+ id: first-tag
165
+ run: echo "tag=$(echo '${{ steps.meta.outputs.tags }}' | head -n1)" >> $GITHUB_OUTPUT
166
+
167
+ - name: Run container security scan with Trivy
168
+ uses: aquasecurity/trivy-action@master
169
+ with:
170
+ image-ref: ${{ steps.first-tag.outputs.tag }}
171
+ format: 'sarif'
172
+ output: 'trivy-results.sarif'
173
+
174
+ - name: Upload Trivy scan results to GitHub Security tab
175
+ uses: github/codeql-action/upload-sarif@v4
176
+ if: always()
177
+ with:
178
+ sarif_file: 'trivy-results.sarif'
179
+
180
+ codeql-analysis:
181
+ name: CodeQL Analysis
182
+ runs-on: ubuntu-latest
183
+ permissions:
184
+ actions: read
185
+ contents: read
186
+ security-events: write
187
+
188
+ strategy:
189
+ fail-fast: false
190
+ matrix:
191
+ language: [ 'python' ]
192
+
193
+ steps:
194
+ - name: Checkout repository
195
+ uses: actions/checkout@v7
196
+
197
+ - name: Initialize CodeQL
198
+ uses: github/codeql-action/init@v4
199
+ with:
200
+ languages: ${{ matrix.language }}
201
+
202
+ - name: Autobuild
203
+ uses: github/codeql-action/autobuild@v4
204
+
205
+ - name: Perform CodeQL Analysis
206
+ uses: github/codeql-action/analyze@v4
207
+
208
+ publish-package:
209
+ runs-on: ubuntu-latest
210
+ needs: [test, security-scan, build-container]
211
+ if: github.event_name == 'release' && github.event.action == 'published'
212
+
213
+ steps:
214
+ - uses: actions/checkout@v7
215
+ with:
216
+ fetch-depth: 0
217
+
218
+ - name: Set up Python
219
+ uses: actions/setup-python@v7
220
+ with:
221
+ python-version: '3.11'
222
+
223
+ - name: Install build dependencies
224
+ run: |
225
+ python -m pip install --upgrade pip
226
+ pip install build twine
227
+
228
+ - name: Build package
229
+ run: python -m build
230
+
231
+ - name: Check package
232
+ run: twine check dist/*
233
+
234
+ - name: Publish to PyPI
235
+ env:
236
+ TWINE_USERNAME: __token__
237
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
238
+ run: twine upload dist/*
@@ -0,0 +1,180 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # Ruff stuff:
171
+ .ruff_cache/
172
+
173
+ # PyPI configuration file
174
+ .pypirc
175
+
176
+ # Custom
177
+ *NOCOMMIT*
178
+ .aider*
179
+ .secret
180
+ __manifest/
@@ -0,0 +1,5 @@
1
+ [project]
2
+ id = talkpipe-vault
3
+ url = /codebases/talkpipe-vault/findings
4
+ name = talkpipe-vault
5
+
@@ -0,0 +1,7 @@
1
+ {
2
+ "python.testing.pytestArgs": [
3
+ "tests"
4
+ ],
5
+ "python.testing.unittestEnabled": false,
6
+ "python.testing.pytestEnabled": true
7
+ }
@@ -0,0 +1,45 @@
1
+ ## Dev environment tips
2
+ - When running code or pytest, use the .venv environment in the root of the project.
3
+ - If the .venv environment doesn't exist and you need to run code or tests, abort and ask the user to create the environment.
4
+
5
+ ## Project Overview
6
+ TalkPipe Vault (this repo) is a Python toolkit built on talkpipe that provides easy pipelines for
7
+ building vector databases and search engines, along with a demonstration application for unifying them.
8
+ The underlying pipelines include segments and sources for extracting text from files, monitoring
9
+ directories for changing files, doing RAG searches, and creating both full text and vector database
10
+ indexing in a unified pipeline. The library is intended to be used stand-along with the provided
11
+ application, but constituent parts can also be used in other applications.
12
+
13
+
14
+ ## Project Structure
15
+ - `src/talkpipe_vault/` - Main library source code
16
+ - `apps/` - Application code (query interface, vault server)
17
+ - `pipelines/` - Pipeline implementations (building vector DBs, searching, watching)
18
+ - `segments.py` - Text extraction segments
19
+ - `watchdog.py` - File monitoring source
20
+ - `initialize_plugin.py` - TalkPipe plugin initialization
21
+ - `tests/talkpipe_vault/` - Unit tests mirroring source structure
22
+ - `docs/` - Documentation files
23
+ - Root directory contains configuration files (pyproject.toml, docker files, etc.)
24
+
25
+ ## Development Guidelines
26
+ - When a markdown or source code file contains a line with "AGENT_TODO", replace that line with the requested code.
27
+ - Do not automatically agree with what the user suggests. Question assumptions and point out weaknesses in logic or inconsistences with the rest of the codebase.
28
+ - pytest unit tests are under tests/
29
+ - the code for the library is under src/
30
+ - After implementing a new feature, update CHANGELOG.md. If the development section of the changelog already
31
+ has a relevant section, update that section rather than creating a new one.
32
+ - When making a change, write a unit test that fails without the change or update an existing test, verify that the unit test fails, make the change and then verity that the unit test now passes. Notify the user if it is not reasonable to write the unit test.
33
+ - When writing unit tests, update and augment existing unit tests is possible and appropriate rather than writing new unit tests.
34
+ - Unit tests should be as short as possible while still testing the functionality as completely as possible.
35
+ - User interfaces should be visually appealing and maintain consistency with each other.
36
+ - When writing or updating pipeline examples in documentation, write examples with stand-alone code and
37
+ test the examples by running them.
38
+ - When writing documentation for segments or sources, do not document the parameters.
39
+ - When writing new sources or segments, use Annotated in the parameter lists to explain the type and purpose of each parameter.
40
+ - When writing a report or script that is not intended to be part of the repository, prefix the filename with "NOCOMMIT_".
41
+
42
+
43
+ ## Important Commands
44
+ python -m build for creating a new release
45
+ pytest --cov=src for unit test coverage