You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Required vs Optional Fields](#required-vs-optional-fields)
33
+
-[Adding New Sites](#adding-new-sites)
23
34
-[Ollama for LLM Inference](#ollama-for-llm-inference)
24
35
-[Pull Request Process](#pull-request-process)
25
36
@@ -241,7 +252,7 @@ uv run pytest
241
252
242
253
### Code Coverage
243
254
244
-
We aim for high test coverage. When submitting code:
255
+
We aim for high test coverage (minimum 80%). When submitting code:
245
256
246
257
1. Check your coverage with:
247
258
@@ -263,18 +274,112 @@ uv run pytest --cov=tapio.utils tests/utils/
263
274
264
275
Aim for at least 80% coverage for new code. The HTML coverage report can be found in the `htmlcov` directory. Open `htmlcov/index.html` in your browser to view it.
265
276
277
+
### Test Categories
278
+
279
+
We maintain different types of tests:
280
+
281
+
**Unit Tests** - Fast, isolated tests with mocked dependencies:
282
+
```bash
283
+
uv run pytest -m "not integration"
284
+
```
285
+
286
+
**Integration Tests** - Tests using real components (marked with `@pytest.mark.integration`):
287
+
```bash
288
+
uv run pytest -m integration
289
+
```
290
+
291
+
**All Tests**:
292
+
```bash
293
+
uv run pytest
294
+
```
295
+
296
+
### Test Fixtures
297
+
298
+
Common mock fixtures are available in `tests/conftest.py`:
DEFAULT_CHROMA_COLLECTION="tapio"# ChromaDB collection name
411
+
DEFAULT_EMBEDDING_MODEL="all-MiniLM-L6-v2"
412
+
DEFAULT_LLM_MODEL="llama3.2"
413
+
DEFAULT_MAX_TOKENS=1024
414
+
DEFAULT_NUM_RESULTS=5
415
+
```
416
+
417
+
## Site Configurations
418
+
419
+
Site configurations define how to crawl and parse specific websites. They're stored in `tapio/config/site_configs.yaml` and used by both crawl and parse commands.
420
+
421
+
### Configuration Structure
422
+
423
+
```yaml
424
+
sites:
425
+
migri:
426
+
base_url: "https://migri.fi"# Used for crawling and converting relative links
427
+
description: "Finnish Immigration Service website"
428
+
crawler_config: # Crawling behavior
429
+
delay_between_requests: 1.0# Seconds between requests
Copy file name to clipboardExpand all lines: README.md
+1-86Lines changed: 1 addition & 86 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,92 +90,7 @@ To view detailed site configurations:
90
90
uv run -m tapio.cli list-sites --verbose
91
91
```
92
92
93
-
## Site Configurations
94
-
95
-
Site configurations define how to crawl and parse specific websites. They're stored in `tapio/config/site_configs.yaml` and used by both crawl and parse commands.
96
-
97
-
### Configuration Structure
98
-
99
-
```yaml
100
-
sites:
101
-
migri:
102
-
base_url: "https://migri.fi"# Used for crawling and converting relative links
103
-
description: "Finnish Immigration Service website"
104
-
crawler_config: # Crawling behavior
105
-
delay_between_requests: 1.0# Seconds between requests
DEFAULT_CHROMA_COLLECTION = "tapio" # ChromaDB collection name
176
-
```
177
-
178
-
Site-specific configurations are in `tapio/config/site_configs.yaml` and automatically handle content extraction and directory organization based on the site's domain.
93
+
For technical details on site configurations, programmatic API usage, and adding new sites, see [CONTRIBUTING.md](CONTRIBUTING.md).
0 commit comments