knowlyr-datalabel 0.2.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 (52) hide show
  1. knowlyr_datalabel-0.2.0/.claude/settings.local.json +28 -0
  2. knowlyr_datalabel-0.2.0/.dockerignore +14 -0
  3. knowlyr_datalabel-0.2.0/.github/workflows/ci.yml +40 -0
  4. knowlyr_datalabel-0.2.0/.gitignore +52 -0
  5. knowlyr_datalabel-0.2.0/Dockerfile +13 -0
  6. knowlyr_datalabel-0.2.0/LICENSE +21 -0
  7. knowlyr_datalabel-0.2.0/PKG-INFO +773 -0
  8. knowlyr_datalabel-0.2.0/README.md +723 -0
  9. knowlyr_datalabel-0.2.0/examples/basic_workflow.py +105 -0
  10. knowlyr_datalabel-0.2.0/examples/llm_workflow.py +145 -0
  11. knowlyr_datalabel-0.2.0/examples/multi_type_annotation.py +108 -0
  12. knowlyr_datalabel-0.2.0/examples/pipeline_datarecipe_to_label.py +106 -0
  13. knowlyr_datalabel-0.2.0/examples/sample_data/classification_schema.json +18 -0
  14. knowlyr_datalabel-0.2.0/examples/sample_data/results_annotator1.json +13 -0
  15. knowlyr_datalabel-0.2.0/examples/sample_data/results_annotator2.json +13 -0
  16. knowlyr_datalabel-0.2.0/examples/sample_data/schema.json +33 -0
  17. knowlyr_datalabel-0.2.0/examples/sample_data/tasks.json +37 -0
  18. knowlyr_datalabel-0.2.0/pyproject.toml +61 -0
  19. knowlyr_datalabel-0.2.0/src/datalabel/__init__.py +12 -0
  20. knowlyr_datalabel-0.2.0/src/datalabel/cli.py +506 -0
  21. knowlyr_datalabel-0.2.0/src/datalabel/generator.py +239 -0
  22. knowlyr_datalabel-0.2.0/src/datalabel/io.py +129 -0
  23. knowlyr_datalabel-0.2.0/src/datalabel/llm/__init__.py +23 -0
  24. knowlyr_datalabel-0.2.0/src/datalabel/llm/client.py +216 -0
  25. knowlyr_datalabel-0.2.0/src/datalabel/llm/guidelines.py +95 -0
  26. knowlyr_datalabel-0.2.0/src/datalabel/llm/prelabel.py +182 -0
  27. knowlyr_datalabel-0.2.0/src/datalabel/llm/prompts.py +166 -0
  28. knowlyr_datalabel-0.2.0/src/datalabel/llm/quality.py +249 -0
  29. knowlyr_datalabel-0.2.0/src/datalabel/mcp_server/__init__.py +5 -0
  30. knowlyr_datalabel-0.2.0/src/datalabel/mcp_server/_prompts.py +218 -0
  31. knowlyr_datalabel-0.2.0/src/datalabel/mcp_server/_resources.py +198 -0
  32. knowlyr_datalabel-0.2.0/src/datalabel/mcp_server/_server.py +48 -0
  33. knowlyr_datalabel-0.2.0/src/datalabel/mcp_server/_tools.py +574 -0
  34. knowlyr_datalabel-0.2.0/src/datalabel/merger.py +542 -0
  35. knowlyr_datalabel-0.2.0/src/datalabel/templates/annotator.html +1734 -0
  36. knowlyr_datalabel-0.2.0/src/datalabel/validator.py +152 -0
  37. knowlyr_datalabel-0.2.0/tests/__init__.py +1 -0
  38. knowlyr_datalabel-0.2.0/tests/conftest.py +98 -0
  39. knowlyr_datalabel-0.2.0/tests/test_cli.py +241 -0
  40. knowlyr_datalabel-0.2.0/tests/test_generator.py +422 -0
  41. knowlyr_datalabel-0.2.0/tests/test_guidelines.py +125 -0
  42. knowlyr_datalabel-0.2.0/tests/test_io.py +170 -0
  43. knowlyr_datalabel-0.2.0/tests/test_llm_client.py +273 -0
  44. knowlyr_datalabel-0.2.0/tests/test_mcp_prompts.py +143 -0
  45. knowlyr_datalabel-0.2.0/tests/test_mcp_resources.py +90 -0
  46. knowlyr_datalabel-0.2.0/tests/test_mcp_server.py +57 -0
  47. knowlyr_datalabel-0.2.0/tests/test_mcp_tools.py +295 -0
  48. knowlyr_datalabel-0.2.0/tests/test_merger.py +383 -0
  49. knowlyr_datalabel-0.2.0/tests/test_prelabel.py +215 -0
  50. knowlyr_datalabel-0.2.0/tests/test_quality.py +205 -0
  51. knowlyr_datalabel-0.2.0/tests/test_validator.py +248 -0
  52. knowlyr_datalabel-0.2.0/uv.lock +1008 -0
@@ -0,0 +1,28 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(git -C /Users/liukai/data-label log --oneline -20)",
5
+ "Bash(find:*)",
6
+ "Bash(grep:*)",
7
+ "Bash(git -C /Users/liukai/data-label log --all --graph --oneline --decorate)",
8
+ "Bash(git -C /Users/liukai/data-label log:*)",
9
+ "Bash(git -C /Users/liukai/data-label show:*)",
10
+ "Bash(python -m pytest:*)",
11
+ "Bash(pip install:*)",
12
+ "Bash(ruff check:*)",
13
+ "Bash(python -m ruff check:*)",
14
+ "Bash(python:*)",
15
+ "Bash(git add:*)",
16
+ "Bash(git commit:*)",
17
+ "Bash(git push:*)",
18
+ "WebSearch",
19
+ "Bash(pytest:*)",
20
+ "Bash(knowlyr-datalabel prelabel:*)",
21
+ "Bash(knowlyr-datalabel quality:*)",
22
+ "Bash(knowlyr-datalabel gen-guidelines:*)",
23
+ "Bash(python3:*)",
24
+ "Bash(knowlyr-datalabel:*)",
25
+ "Bash(wc:*)"
26
+ ]
27
+ }
28
+ }
@@ -0,0 +1,14 @@
1
+ .venv/
2
+ .git/
3
+ .github/
4
+ __pycache__/
5
+ *.pyc
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ tests/
9
+ examples/
10
+ *.egg-info/
11
+ dist/
12
+ build/
13
+ .env
14
+ .claude/
@@ -0,0 +1,40 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install -e ".[dev]"
28
+
29
+ - name: Lint with ruff
30
+ run: ruff check .
31
+
32
+ - name: Run tests with coverage
33
+ run: pytest --cov=datalabel --cov-report=term-missing --cov-report=xml
34
+
35
+ - name: Upload coverage
36
+ if: matrix.python-version == '3.12'
37
+ uses: codecov/codecov-action@v4
38
+ with:
39
+ file: coverage.xml
40
+ fail_ci_if_error: false
@@ -0,0 +1,52 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Distribution / packaging
7
+ build/
8
+ dist/
9
+ *.egg-info/
10
+ *.egg
11
+
12
+ # Virtual environments
13
+ .venv/
14
+ venv/
15
+ ENV/
16
+
17
+ # IDE
18
+ .idea/
19
+ .vscode/
20
+ *.swp
21
+ *.swo
22
+
23
+ # Testing
24
+ .pytest_cache/
25
+ .coverage
26
+ htmlcov/
27
+
28
+ # Output files
29
+ *.html
30
+ !src/datalabel/templates/*.html
31
+
32
+ # Environment
33
+ .env
34
+ .env.local
35
+
36
+ # OS
37
+ .DS_Store
38
+ Thumbs.db
39
+
40
+ # ===================
41
+ # Supplemented common patterns
42
+ # ===================
43
+
44
+ # Python wheels
45
+ *.whl
46
+
47
+ # Virtual environments
48
+ env/
49
+
50
+ # Linting / type checking
51
+ .mypy_cache/
52
+ .ruff_cache/
@@ -0,0 +1,13 @@
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY pyproject.toml README.md LICENSE ./
6
+ COPY src/ src/
7
+
8
+ RUN pip install --no-cache-dir .
9
+
10
+ WORKDIR /data
11
+
12
+ ENTRYPOINT ["knowlyr-datalabel"]
13
+ CMD ["--help"]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Liu Kai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.