infoextract-cidoc 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.
- infoextract_cidoc-0.1.0/.codecov.yml +40 -0
- infoextract_cidoc-0.1.0/.coderabbit.yaml +23 -0
- infoextract_cidoc-0.1.0/.cursor/rules/astral-uv.mdc +65 -0
- infoextract_cidoc-0.1.0/.cursor/rules/docs-and-todo.mdc +65 -0
- infoextract_cidoc-0.1.0/.editorconfig +21 -0
- infoextract_cidoc-0.1.0/.github/CODEOWNERS +11 -0
- infoextract_cidoc-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +53 -0
- infoextract_cidoc-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- infoextract_cidoc-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +35 -0
- infoextract_cidoc-0.1.0/.github/ISSUE_TEMPLATE/question.yml +17 -0
- infoextract_cidoc-0.1.0/.github/SECURITY.md +18 -0
- infoextract_cidoc-0.1.0/.github/dependabot.yml +20 -0
- infoextract_cidoc-0.1.0/.github/labeler.yml +24 -0
- infoextract_cidoc-0.1.0/.github/pull_request_template.md +25 -0
- infoextract_cidoc-0.1.0/.github/workflows/changelog-check.yml +23 -0
- infoextract_cidoc-0.1.0/.github/workflows/docs.yml +48 -0
- infoextract_cidoc-0.1.0/.github/workflows/pr-labeler.yml +17 -0
- infoextract_cidoc-0.1.0/.github/workflows/publish.yaml +29 -0
- infoextract_cidoc-0.1.0/.github/workflows/release-tracking.yml +24 -0
- infoextract_cidoc-0.1.0/.github/workflows/test.yml +64 -0
- infoextract_cidoc-0.1.0/.gitignore +163 -0
- infoextract_cidoc-0.1.0/.pre-commit-config.yaml +42 -0
- infoextract_cidoc-0.1.0/.python-version +1 -0
- infoextract_cidoc-0.1.0/CHANGELOG.md +28 -0
- infoextract_cidoc-0.1.0/CLAUDE.md +65 -0
- infoextract_cidoc-0.1.0/CODE_OF_CONDUCT.md +133 -0
- infoextract_cidoc-0.1.0/COLLIE_Demo_Notebook.ipynb +1144 -0
- infoextract_cidoc-0.1.0/CONTRIBUTING.md +51 -0
- infoextract_cidoc-0.1.0/LICENSE +21 -0
- infoextract_cidoc-0.1.0/Makefile +54 -0
- infoextract_cidoc-0.1.0/PKG-INFO +288 -0
- infoextract_cidoc-0.1.0/QUICKSTART.md +227 -0
- infoextract_cidoc-0.1.0/README.md +243 -0
- infoextract_cidoc-0.1.0/collie-logo-white-bg.png +0 -0
- infoextract_cidoc-0.1.0/collie-logo.png +0 -0
- infoextract_cidoc-0.1.0/collie-no-bg.png +0 -0
- infoextract_cidoc-0.1.0/collie-white-bg.png +0 -0
- infoextract_cidoc-0.1.0/docs/HOWTOs.md +793 -0
- infoextract_cidoc-0.1.0/docs/cidoc-crm-standard.md +17808 -0
- infoextract_cidoc-0.1.0/docs/community/code-of-conduct.md +3 -0
- infoextract_cidoc-0.1.0/docs/community/security.md +3 -0
- infoextract_cidoc-0.1.0/docs/developer-experience.md +805 -0
- infoextract_cidoc-0.1.0/docs/development/contributing.md +20 -0
- infoextract_cidoc-0.1.0/docs/development/release-process.md +22 -0
- infoextract_cidoc-0.1.0/docs/development/testing.md +29 -0
- infoextract_cidoc-0.1.0/docs/getting-started/installation.md +45 -0
- infoextract_cidoc-0.1.0/docs/getting-started/quickstart.md +62 -0
- infoextract_cidoc-0.1.0/docs/getting-started/tutorial.md +62 -0
- infoextract_cidoc-0.1.0/docs/guide/crm-models.md +51 -0
- infoextract_cidoc-0.1.0/docs/guide/extraction.md +83 -0
- infoextract_cidoc-0.1.0/docs/guide/output-formats.md +44 -0
- infoextract_cidoc-0.1.0/docs/index.md +46 -0
- infoextract_cidoc-0.1.0/docs/mission.md +82 -0
- infoextract_cidoc-0.1.0/docs/plan.md +374 -0
- infoextract_cidoc-0.1.0/docs/reference/api.md +29 -0
- infoextract_cidoc-0.1.0/docs/stylesheets/extra.css +8 -0
- infoextract_cidoc-0.1.0/docs/testing.md +527 -0
- infoextract_cidoc-0.1.0/docs/todo.md +104 -0
- infoextract_cidoc-0.1.0/einstein_demo.py +395 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/__init__.py +3 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/codegen/generate_models.py +140 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/codegen/generate_registry.py +137 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/codegen/generate_templates.py +141 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/codegen/specs/aliases.yaml +182 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/codegen/specs/crm_classes.yaml +830 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/codegen/specs/crm_properties.yaml +2902 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/examples/einstein.md +174 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/examples/museum_object.json +59 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/extraction/__init__.py +42 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/extraction/crm_mapper.py +50 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/extraction/langstruct_extractor.py +149 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/extraction/lite_schema.py +86 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/extraction/models.py +119 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/extraction/resolution.py +170 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/io/__init__.py +1 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/io/to_cypher.py +304 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/io/to_graphforge.py +83 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/io/to_markdown.py +314 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/io/to_networkx/__init__.py +40 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/io/to_networkx/analysis.py +309 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/io/to_networkx/converters.py +351 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/io/to_networkx/graph_builder.py +282 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/main.py +494 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/models/__init__.py +33 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/models/base.py +276 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/models/generated/__init__.py +4 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/models/generated/e_classes.py +1312 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/properties.py +3392 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/__init__.py +1 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/golden/__init__.py +1 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/golden/test_museum_object.py +210 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/test_networkx_integration.py +373 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/unit/__init__.py +1 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/unit/test_crm_mapper.py +69 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/unit/test_cypher.py +231 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/unit/test_graphforge_output.py +70 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/unit/test_langstruct_extractor.py +74 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/unit/test_lite_schema.py +83 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/unit/test_markdown.py +146 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/unit/test_pipeline_integration.py +159 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/unit/test_resolution.py +120 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/tests/unit/test_validators.py +128 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/validators/__init__.py +18 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/validators/quantifiers.py +251 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/validators/typing_rules.py +347 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/visualization/__init__.py +41 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/visualization/export.py +295 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/visualization/plotting.py +528 -0
- infoextract_cidoc-0.1.0/infoextract_cidoc/visualization/styling.py +377 -0
- infoextract_cidoc-0.1.0/mkdocs.yml +80 -0
- infoextract_cidoc-0.1.0/notebook_output/batch_canonical_entities.json +37 -0
- infoextract_cidoc-0.1.0/notebook_output/canonical_entities.json +785 -0
- infoextract_cidoc-0.1.0/notebook_output/markdown/entities_summary.md +91 -0
- infoextract_cidoc-0.1.0/notebook_output/markdown/entity_1_E21.md +5 -0
- infoextract_cidoc-0.1.0/notebook_output/markdown/entity_2_E21.md +7 -0
- infoextract_cidoc-0.1.0/notebook_output/markdown/entity_3_E21.md +5 -0
- infoextract_cidoc-0.1.0/notebook_output/markdown/entity_3_E53.md +6 -0
- infoextract_cidoc-0.1.0/notebook_output/markdown/entity_4_E21.md +5 -0
- infoextract_cidoc-0.1.0/notebook_output/markdown/entity_4_E53.md +5 -0
- infoextract_cidoc-0.1.0/notebook_output/markdown/entity_5_E21.md +5 -0
- infoextract_cidoc-0.1.0/notebook_output/markdown/entity_5_E53.md +5 -0
- infoextract_cidoc-0.1.0/notebook_output/network.cypher +11 -0
- infoextract_cidoc-0.1.0/notebook_output/plots/network_overview.png +0 -0
- infoextract_cidoc-0.1.0/notebook_output/workflow_summary.md +25 -0
- infoextract_cidoc-0.1.0/pyproject.toml +160 -0
- infoextract_cidoc-0.1.0/scripts/__init__.py +0 -0
- infoextract_cidoc-0.1.0/scripts/bump_version.py +41 -0
- infoextract_cidoc-0.1.0/scripts/check_release_needed.py +41 -0
- infoextract_cidoc-0.1.0/uv.lock +3072 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
coverage:
|
|
2
|
+
status:
|
|
3
|
+
project:
|
|
4
|
+
default:
|
|
5
|
+
target: 70%
|
|
6
|
+
threshold: 2%
|
|
7
|
+
patch:
|
|
8
|
+
default:
|
|
9
|
+
target: 75%
|
|
10
|
+
|
|
11
|
+
component_management:
|
|
12
|
+
default_rules:
|
|
13
|
+
statuses:
|
|
14
|
+
- type: project
|
|
15
|
+
target: 70%
|
|
16
|
+
individual_components:
|
|
17
|
+
- component_id: extraction
|
|
18
|
+
name: Extraction Pipeline
|
|
19
|
+
paths:
|
|
20
|
+
- src/infoextract_cidoc/extraction/**
|
|
21
|
+
- component_id: io
|
|
22
|
+
name: I/O Modules
|
|
23
|
+
paths:
|
|
24
|
+
- src/infoextract_cidoc/io/**
|
|
25
|
+
- component_id: models
|
|
26
|
+
name: CRM Models
|
|
27
|
+
paths:
|
|
28
|
+
- src/infoextract_cidoc/models/**
|
|
29
|
+
- component_id: validators
|
|
30
|
+
name: Validators
|
|
31
|
+
paths:
|
|
32
|
+
- src/infoextract_cidoc/validators/**
|
|
33
|
+
- component_id: visualization
|
|
34
|
+
name: Visualization
|
|
35
|
+
paths:
|
|
36
|
+
- src/infoextract_cidoc/visualization/**
|
|
37
|
+
|
|
38
|
+
ignore:
|
|
39
|
+
- "src/infoextract_cidoc/codegen/**"
|
|
40
|
+
- "src/infoextract_cidoc/tests/**"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
language: "en-US"
|
|
2
|
+
early_access: false
|
|
3
|
+
reviews:
|
|
4
|
+
profile: "chill"
|
|
5
|
+
request_changes_workflow: false
|
|
6
|
+
high_level_summary: true
|
|
7
|
+
poem: false
|
|
8
|
+
review_status: true
|
|
9
|
+
collapse_walkthrough: false
|
|
10
|
+
path_filters:
|
|
11
|
+
- "!src/infoextract_cidoc/models/generated/**"
|
|
12
|
+
- "!src/infoextract_cidoc/codegen/**"
|
|
13
|
+
path_instructions:
|
|
14
|
+
- path: "src/infoextract_cidoc/extraction/**"
|
|
15
|
+
instructions: |
|
|
16
|
+
Review for CIDOC CRM correctness. Ensure entity types and property codes
|
|
17
|
+
are valid CRM identifiers. Check that confidence scores are in [0.0, 1.0].
|
|
18
|
+
- path: "src/infoextract_cidoc/tests/**"
|
|
19
|
+
instructions: |
|
|
20
|
+
Verify test isolation and meaningful assertions. Check that LLM tests
|
|
21
|
+
are marked with @pytest.mark.llm.
|
|
22
|
+
chat:
|
|
23
|
+
auto_reply: true
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Ensure Cursor uses Astral UV Python tooling and Astral Ruff for all Python development tasks
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Astral UV and Ruff Python Tooling Rule
|
|
8
|
+
|
|
9
|
+
## Python Package Management
|
|
10
|
+
- **ALWAYS** use `uv` for all Python package management tasks
|
|
11
|
+
- Use `uv add <package>` instead of `pip install`
|
|
12
|
+
- Use `uv remove <package>` instead of `pip uninstall`
|
|
13
|
+
- Use `uv sync` to install dependencies from `uv.lock`
|
|
14
|
+
- Use `uv run <command>` to run Python scripts and tools
|
|
15
|
+
- Use `uv add --dev <package>` for development dependencies
|
|
16
|
+
|
|
17
|
+
## Code Formatting and Linting
|
|
18
|
+
- **ALWAYS** use `ruff` for code formatting and linting
|
|
19
|
+
- Use `uv run ruff format` to format Python code
|
|
20
|
+
- Use `uv run ruff check` to check for linting issues
|
|
21
|
+
- Use `uv run ruff check --fix` to automatically fix fixable issues
|
|
22
|
+
- Configure ruff settings in `pyproject.toml` under `[tool.ruff]`
|
|
23
|
+
|
|
24
|
+
## Development Workflow
|
|
25
|
+
- When running tests, use `uv run pytest` or `uv run python -m pytest`
|
|
26
|
+
- When running scripts, use `uv run python <script.py>`
|
|
27
|
+
- When installing new dependencies, always update `pyproject.toml` and run `uv lock`
|
|
28
|
+
- When creating virtual environments, use `uv venv` instead of `python -m venv`
|
|
29
|
+
|
|
30
|
+
## Code Quality Standards
|
|
31
|
+
- Ensure all Python code follows ruff's formatting standards
|
|
32
|
+
- Fix all ruff warnings and errors before committing
|
|
33
|
+
- Use ruff's import sorting and organization features
|
|
34
|
+
- Maintain consistent code style across the project
|
|
35
|
+
|
|
36
|
+
## Project Structure
|
|
37
|
+
- Keep `pyproject.toml` as the single source of truth for dependencies
|
|
38
|
+
- Use `uv.lock` for reproducible builds
|
|
39
|
+
- Ensure all Python tools are run through `uv run` to maintain consistency
|
|
40
|
+
|
|
41
|
+
## Examples
|
|
42
|
+
```bash
|
|
43
|
+
# Install a new package
|
|
44
|
+
uv add requests
|
|
45
|
+
|
|
46
|
+
# Install a development dependency
|
|
47
|
+
uv add --dev pytest
|
|
48
|
+
|
|
49
|
+
# Format code
|
|
50
|
+
uv run ruff format
|
|
51
|
+
|
|
52
|
+
# Check and fix linting issues
|
|
53
|
+
uv run ruff check --fix
|
|
54
|
+
|
|
55
|
+
# Run tests
|
|
56
|
+
uv run pytest
|
|
57
|
+
|
|
58
|
+
# Run a Python script
|
|
59
|
+
uv run python src/collie/main.py
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Error Handling
|
|
63
|
+
- If you encounter issues with `uv` or `ruff`, check the project's `pyproject.toml` configuration
|
|
64
|
+
- Ensure the Python version specified in `pyproject.toml` is compatible
|
|
65
|
+
- Use `uv --version` and `uv run ruff --version` to verify tool versions
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Agent workflow rule for documentation-driven development
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Agent Workflow Rule: Documentation-Driven Development
|
|
8
|
+
|
|
9
|
+
The agent MUST follow this exact workflow for ALL tasks:
|
|
10
|
+
|
|
11
|
+
### 1. Initial Documentation Review
|
|
12
|
+
- **ALWAYS** read `docs/mission.md` first to understand the project's purpose and goals
|
|
13
|
+
- **ALWAYS** read `docs/todo.md` to understand current tasks, priorities, and acceptance criteria
|
|
14
|
+
- Review any other relevant documentation files in the `docs/` directory
|
|
15
|
+
- Understand the current state of the project before proceeding
|
|
16
|
+
|
|
17
|
+
### 2. Planning Phase
|
|
18
|
+
- Create a detailed plan based on the task requirements and current documentation
|
|
19
|
+
- Break down complex tasks into manageable steps
|
|
20
|
+
- Identify dependencies and potential risks
|
|
21
|
+
- Consider how the task aligns with the project mission
|
|
22
|
+
|
|
23
|
+
### 3. Todo Evaluation and Update
|
|
24
|
+
- **ALWAYS** evaluate if the planned task requires modification of `docs/todo.md`
|
|
25
|
+
- If the task involves:
|
|
26
|
+
- Adding new features → Update todo.md with new tasks
|
|
27
|
+
- Completing existing tasks → Mark them as completed
|
|
28
|
+
- Changing priorities → Reorder tasks accordingly
|
|
29
|
+
- Discovering new requirements → Add them to the todo list
|
|
30
|
+
- Update `docs/todo.md` BEFORE starting implementation
|
|
31
|
+
|
|
32
|
+
### 4. Task Execution
|
|
33
|
+
- Execute the planned tasks systematically
|
|
34
|
+
- Follow the acceptance criteria defined in the documentation
|
|
35
|
+
- Implement changes according to the project's standards and mission
|
|
36
|
+
- Test functionality as appropriate
|
|
37
|
+
|
|
38
|
+
### 5. Post-Task Evaluation
|
|
39
|
+
- **ALWAYS** evaluate if the completed changes meet the acceptance criteria
|
|
40
|
+
- Verify that the implementation aligns with the project mission
|
|
41
|
+
- Check if any additional tasks were discovered during implementation
|
|
42
|
+
|
|
43
|
+
### 6. Documentation Updates
|
|
44
|
+
- **ALWAYS** update `docs/todo.md` to reflect:
|
|
45
|
+
- Completed tasks (mark as done)
|
|
46
|
+
- New tasks discovered during implementation
|
|
47
|
+
- Updated priorities or timelines
|
|
48
|
+
- Any blockers or issues encountered
|
|
49
|
+
- Update other documentation files (`docs/mission.md`, etc.) if:
|
|
50
|
+
- The project scope or mission has evolved
|
|
51
|
+
- New features require documentation
|
|
52
|
+
- Architecture or approach changes need to be documented
|
|
53
|
+
- User-facing changes require updated instructions
|
|
54
|
+
|
|
55
|
+
### 7. Final Verification
|
|
56
|
+
- Ensure all documentation accurately reflects the current state of the code
|
|
57
|
+
- Verify that the todo list is up-to-date and properly prioritized
|
|
58
|
+
- Confirm that the mission statement still accurately describes the project
|
|
59
|
+
|
|
60
|
+
### Key Principles:
|
|
61
|
+
- **Documentation First**: Always start with reading existing docs
|
|
62
|
+
- **Plan Before Acting**: Create a clear plan before implementation
|
|
63
|
+
- **Continuous Documentation**: Keep docs updated throughout the process
|
|
64
|
+
- **Acceptance Criteria Driven**: Always verify against defined criteria
|
|
65
|
+
- **Mission Alignment**: Ensure all work aligns with project goals
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
insert_final_newline = true
|
|
7
|
+
trim_trailing_whitespace = true
|
|
8
|
+
|
|
9
|
+
[*.py]
|
|
10
|
+
indent_style = space
|
|
11
|
+
indent_size = 4
|
|
12
|
+
|
|
13
|
+
[*.{yml,yaml,json,toml}]
|
|
14
|
+
indent_style = space
|
|
15
|
+
indent_size = 2
|
|
16
|
+
|
|
17
|
+
[*.md]
|
|
18
|
+
trim_trailing_whitespace = false
|
|
19
|
+
|
|
20
|
+
[Makefile]
|
|
21
|
+
indent_style = tab
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug in infoextract-cidoc
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thanks for reporting a bug! Please fill out the information below.
|
|
9
|
+
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: description
|
|
12
|
+
attributes:
|
|
13
|
+
label: Bug Description
|
|
14
|
+
description: A clear and concise description of what the bug is.
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: reproduce
|
|
20
|
+
attributes:
|
|
21
|
+
label: Steps to Reproduce
|
|
22
|
+
description: Steps to reproduce the behavior.
|
|
23
|
+
placeholder: |
|
|
24
|
+
1. Import `infoextract_cidoc`
|
|
25
|
+
2. Call `...`
|
|
26
|
+
3. See error
|
|
27
|
+
validations:
|
|
28
|
+
required: true
|
|
29
|
+
|
|
30
|
+
- type: textarea
|
|
31
|
+
id: expected
|
|
32
|
+
attributes:
|
|
33
|
+
label: Expected Behavior
|
|
34
|
+
description: What you expected to happen.
|
|
35
|
+
validations:
|
|
36
|
+
required: true
|
|
37
|
+
|
|
38
|
+
- type: textarea
|
|
39
|
+
id: environment
|
|
40
|
+
attributes:
|
|
41
|
+
label: Environment
|
|
42
|
+
description: |
|
|
43
|
+
- Python version:
|
|
44
|
+
- infoextract-cidoc version:
|
|
45
|
+
- OS:
|
|
46
|
+
validations:
|
|
47
|
+
required: true
|
|
48
|
+
|
|
49
|
+
- type: textarea
|
|
50
|
+
id: additional
|
|
51
|
+
attributes:
|
|
52
|
+
label: Additional Context
|
|
53
|
+
description: Any other context, stack traces, or screenshots.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a new feature for infoextract-cidoc
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thanks for suggesting a feature!
|
|
9
|
+
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: problem
|
|
12
|
+
attributes:
|
|
13
|
+
label: Problem Statement
|
|
14
|
+
description: What problem does this feature solve?
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: solution
|
|
20
|
+
attributes:
|
|
21
|
+
label: Proposed Solution
|
|
22
|
+
description: Describe the feature you'd like to see.
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
|
|
26
|
+
- type: textarea
|
|
27
|
+
id: alternatives
|
|
28
|
+
attributes:
|
|
29
|
+
label: Alternatives Considered
|
|
30
|
+
description: Any alternative approaches you've considered.
|
|
31
|
+
|
|
32
|
+
- type: textarea
|
|
33
|
+
id: additional
|
|
34
|
+
attributes:
|
|
35
|
+
label: Additional Context
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Question
|
|
2
|
+
description: Ask a question about infoextract-cidoc
|
|
3
|
+
labels: ["question"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: question
|
|
7
|
+
attributes:
|
|
8
|
+
label: Question
|
|
9
|
+
description: What would you like to know?
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: context
|
|
15
|
+
attributes:
|
|
16
|
+
label: Context
|
|
17
|
+
description: Any relevant context or code snippets.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
| Version | Supported |
|
|
6
|
+
| ------- | ------------------ |
|
|
7
|
+
| 0.1.x | :white_check_mark: |
|
|
8
|
+
|
|
9
|
+
## Reporting a Vulnerability
|
|
10
|
+
|
|
11
|
+
Please do **not** report security vulnerabilities via public GitHub issues.
|
|
12
|
+
|
|
13
|
+
Instead, report them via GitHub's private vulnerability reporting:
|
|
14
|
+
1. Go to the repository's **Security** tab
|
|
15
|
+
2. Click **Report a vulnerability**
|
|
16
|
+
3. Provide a clear description of the issue, steps to reproduce, and potential impact
|
|
17
|
+
|
|
18
|
+
We will acknowledge your report within 48 hours and provide a resolution timeline.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "pip"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
day: "monday"
|
|
8
|
+
open-pull-requests-limit: 5
|
|
9
|
+
labels:
|
|
10
|
+
- "dependencies"
|
|
11
|
+
|
|
12
|
+
- package-ecosystem: "github-actions"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "weekly"
|
|
16
|
+
day: "monday"
|
|
17
|
+
open-pull-requests-limit: 5
|
|
18
|
+
labels:
|
|
19
|
+
- "ci-cd"
|
|
20
|
+
- "dependencies"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
extraction:
|
|
2
|
+
- changed-files:
|
|
3
|
+
- any-glob-to-any-file: "src/infoextract_cidoc/extraction/**"
|
|
4
|
+
|
|
5
|
+
io:
|
|
6
|
+
- changed-files:
|
|
7
|
+
- any-glob-to-any-file: "src/infoextract_cidoc/io/**"
|
|
8
|
+
|
|
9
|
+
models:
|
|
10
|
+
- changed-files:
|
|
11
|
+
- any-glob-to-any-file: "src/infoextract_cidoc/models/**"
|
|
12
|
+
|
|
13
|
+
tests:
|
|
14
|
+
- changed-files:
|
|
15
|
+
- any-glob-to-any-file: "src/infoextract_cidoc/tests/**"
|
|
16
|
+
|
|
17
|
+
documentation:
|
|
18
|
+
- changed-files:
|
|
19
|
+
- any-glob-to-any-file: "docs/**"
|
|
20
|
+
- any-glob-to-any-file: "*.md"
|
|
21
|
+
|
|
22
|
+
ci-cd:
|
|
23
|
+
- changed-files:
|
|
24
|
+
- any-glob-to-any-file: ".github/**"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
<!-- What does this PR do? 1-3 bullet points -->
|
|
4
|
+
-
|
|
5
|
+
|
|
6
|
+
## Type of Change
|
|
7
|
+
|
|
8
|
+
- [ ] Bug fix
|
|
9
|
+
- [ ] New feature
|
|
10
|
+
- [ ] Refactoring
|
|
11
|
+
- [ ] Documentation
|
|
12
|
+
- [ ] CI/CD
|
|
13
|
+
- [ ] Breaking change
|
|
14
|
+
|
|
15
|
+
## Testing
|
|
16
|
+
|
|
17
|
+
- [ ] Existing tests pass (`make test`)
|
|
18
|
+
- [ ] New tests added for new functionality
|
|
19
|
+
- [ ] `make pre-push` passes
|
|
20
|
+
|
|
21
|
+
## Checklist
|
|
22
|
+
|
|
23
|
+
- [ ] CHANGELOG.md updated under `[Unreleased]`
|
|
24
|
+
- [ ] Documentation updated if needed
|
|
25
|
+
- [ ] No new security vulnerabilities introduced
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Changelog Check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
check:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
with:
|
|
13
|
+
fetch-depth: 0
|
|
14
|
+
|
|
15
|
+
- name: Check CHANGELOG updated
|
|
16
|
+
run: |
|
|
17
|
+
if git diff --name-only origin/main...HEAD | grep -q "CHANGELOG.md"; then
|
|
18
|
+
echo "CHANGELOG.md was updated."
|
|
19
|
+
else
|
|
20
|
+
echo "ERROR: CHANGELOG.md was not updated in this PR."
|
|
21
|
+
echo "Please add an entry under [Unreleased] in CHANGELOG.md."
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: "pages"
|
|
15
|
+
cancel-in-progress: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Install uv
|
|
24
|
+
uses: astral-sh/setup-uv@v3
|
|
25
|
+
with:
|
|
26
|
+
version: "latest"
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: uv sync --group docs
|
|
30
|
+
|
|
31
|
+
- name: Build docs
|
|
32
|
+
run: uv run mkdocs build --strict
|
|
33
|
+
|
|
34
|
+
- name: Upload pages artifact
|
|
35
|
+
uses: actions/upload-pages-artifact@v3
|
|
36
|
+
with:
|
|
37
|
+
path: site/
|
|
38
|
+
|
|
39
|
+
deploy:
|
|
40
|
+
environment:
|
|
41
|
+
name: github-pages
|
|
42
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
needs: build
|
|
45
|
+
steps:
|
|
46
|
+
- name: Deploy to GitHub Pages
|
|
47
|
+
id: deployment
|
|
48
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: PR Labeler
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
pull-requests: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
label:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/labeler@v5
|
|
15
|
+
with:
|
|
16
|
+
configuration-path: .github/labeler.yml
|
|
17
|
+
sync-labels: true
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
id-token: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
environment: pypi
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Install uv
|
|
18
|
+
uses: astral-sh/setup-uv@v3
|
|
19
|
+
with:
|
|
20
|
+
version: "latest"
|
|
21
|
+
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: uv sync
|
|
24
|
+
|
|
25
|
+
- name: Build package
|
|
26
|
+
run: uv build
|
|
27
|
+
|
|
28
|
+
- name: Publish to PyPI
|
|
29
|
+
run: uv publish --trusted-publishing always
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Release Readiness
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 9 * * 1" # Every Monday at 9am UTC
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
check:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Install uv
|
|
15
|
+
uses: astral-sh/setup-uv@v3
|
|
16
|
+
with:
|
|
17
|
+
version: "latest"
|
|
18
|
+
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: uv sync
|
|
21
|
+
|
|
22
|
+
- name: Check release readiness
|
|
23
|
+
run: uv run python scripts/check_release_needed.py
|
|
24
|
+
continue-on-error: true
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Test
|
|
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
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.13"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v3
|
|
22
|
+
with:
|
|
23
|
+
version: "latest"
|
|
24
|
+
|
|
25
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
|
|
30
|
+
- name: Cache uv dependencies
|
|
31
|
+
uses: actions/cache@v4
|
|
32
|
+
with:
|
|
33
|
+
path: ~/.cache/uv
|
|
34
|
+
key: ${{ runner.os }}-uv-${{ hashFiles('**/uv.lock') }}
|
|
35
|
+
restore-keys: |
|
|
36
|
+
${{ runner.os }}-uv-
|
|
37
|
+
|
|
38
|
+
- name: Install dependencies
|
|
39
|
+
run: uv sync
|
|
40
|
+
|
|
41
|
+
- name: Format check
|
|
42
|
+
run: uv run ruff format --check src/
|
|
43
|
+
|
|
44
|
+
- name: Lint
|
|
45
|
+
run: uv run ruff check src/
|
|
46
|
+
|
|
47
|
+
- name: Type check
|
|
48
|
+
run: uv run mypy src/infoextract_cidoc/
|
|
49
|
+
continue-on-error: true
|
|
50
|
+
|
|
51
|
+
- name: Security check
|
|
52
|
+
run: uv run bandit -c pyproject.toml -r src/infoextract_cidoc/
|
|
53
|
+
continue-on-error: true
|
|
54
|
+
|
|
55
|
+
- name: Run tests with coverage
|
|
56
|
+
run: uv run pytest src/infoextract_cidoc/tests/ --cov=src/infoextract_cidoc --cov-report=xml -v
|
|
57
|
+
|
|
58
|
+
- name: Upload coverage to Codecov
|
|
59
|
+
uses: codecov/codecov-action@v4
|
|
60
|
+
with:
|
|
61
|
+
file: coverage.xml
|
|
62
|
+
fail_ci_if_error: false
|
|
63
|
+
env:
|
|
64
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|