linkml-reference-validator 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 (88) hide show
  1. linkml_reference_validator-0.1.0/.copier-answers.yml +14 -0
  2. linkml_reference_validator-0.1.0/.editorconfig +18 -0
  3. linkml_reference_validator-0.1.0/.github/actions/claude-code-action/action.yml +167 -0
  4. linkml_reference_validator-0.1.0/.github/actions/claude-issue-summarize-action/action.yml +74 -0
  5. linkml_reference_validator-0.1.0/.github/actions/claude-issue-triage-action/action.yml +91 -0
  6. linkml_reference_validator-0.1.0/.github/ai-controllers.json +1 -0
  7. linkml_reference_validator-0.1.0/.github/copilot-setup-steps.yml +40 -0
  8. linkml_reference_validator-0.1.0/.github/dependabot.yml +9 -0
  9. linkml_reference_validator-0.1.0/.github/workflows/deploy-docs.yaml +57 -0
  10. linkml_reference_validator-0.1.0/.github/workflows/main.yaml +55 -0
  11. linkml_reference_validator-0.1.0/.github/workflows/pypi-publish.yaml +35 -0
  12. linkml_reference_validator-0.1.0/.gitignore +144 -0
  13. linkml_reference_validator-0.1.0/.pre-commit-config.yaml +45 -0
  14. linkml_reference_validator-0.1.0/.yamllint.yaml +12 -0
  15. linkml_reference_validator-0.1.0/CLAUDE.md +70 -0
  16. linkml_reference_validator-0.1.0/CODE_OF_CONDUCT.md +76 -0
  17. linkml_reference_validator-0.1.0/CONTRIBUTING.md +121 -0
  18. linkml_reference_validator-0.1.0/LICENSE +201 -0
  19. linkml_reference_validator-0.1.0/PKG-INFO +1017 -0
  20. linkml_reference_validator-0.1.0/README.md +998 -0
  21. linkml_reference_validator-0.1.0/REVIEW2.md +1009 -0
  22. linkml_reference_validator-0.1.0/REVIEW3.md +945 -0
  23. linkml_reference_validator-0.1.0/docs/about.md +3 -0
  24. linkml_reference_validator-0.1.0/docs/concepts/editorial-conventions.md +241 -0
  25. linkml_reference_validator-0.1.0/docs/concepts/how-it-works.md +226 -0
  26. linkml_reference_validator-0.1.0/docs/elements/.gitkeep +0 -0
  27. linkml_reference_validator-0.1.0/docs/how-to/validate-obo-files.md +202 -0
  28. linkml_reference_validator-0.1.0/docs/index.md +26 -0
  29. linkml_reference_validator-0.1.0/docs/quickstart.md +90 -0
  30. linkml_reference_validator-0.1.0/docs/reference/cli.md +385 -0
  31. linkml_reference_validator-0.1.0/docs/templates-linkml/README.md +7 -0
  32. linkml_reference_validator-0.1.0/docs/todo.md +68 -0
  33. linkml_reference_validator-0.1.0/examples/README.md +9 -0
  34. linkml_reference_validator-0.1.0/justfile +110 -0
  35. linkml_reference_validator-0.1.0/mkdocs.yml +45 -0
  36. linkml_reference_validator-0.1.0/mypy.ini +11 -0
  37. linkml_reference_validator-0.1.0/notebooks/01_getting_started.ipynb +410 -0
  38. linkml_reference_validator-0.1.0/notebooks/02_advanced_usage.ipynb +493 -0
  39. linkml_reference_validator-0.1.0/notebooks/03_python_api.ipynb +546 -0
  40. linkml_reference_validator-0.1.0/notebooks/README.md +67 -0
  41. linkml_reference_validator-0.1.0/project/README.md +6 -0
  42. linkml_reference_validator-0.1.0/project.justfile +47 -0
  43. linkml_reference_validator-0.1.0/pyproject.toml +90 -0
  44. linkml_reference_validator-0.1.0/pytest.ini +7 -0
  45. linkml_reference_validator-0.1.0/src/linkml_reference_validator/__init__.py +5 -0
  46. linkml_reference_validator-0.1.0/src/linkml_reference_validator/_version.py +8 -0
  47. linkml_reference_validator-0.1.0/src/linkml_reference_validator/cli/__init__.py +41 -0
  48. linkml_reference_validator-0.1.0/src/linkml_reference_validator/cli/cache.py +63 -0
  49. linkml_reference_validator-0.1.0/src/linkml_reference_validator/cli/shared.py +47 -0
  50. linkml_reference_validator-0.1.0/src/linkml_reference_validator/cli/validate.py +278 -0
  51. linkml_reference_validator-0.1.0/src/linkml_reference_validator/etl/__init__.py +9 -0
  52. linkml_reference_validator-0.1.0/src/linkml_reference_validator/etl/reference_fetcher.py +515 -0
  53. linkml_reference_validator-0.1.0/src/linkml_reference_validator/etl/text_extractor.py +149 -0
  54. linkml_reference_validator-0.1.0/src/linkml_reference_validator/models.py +295 -0
  55. linkml_reference_validator-0.1.0/src/linkml_reference_validator/plugins/REVIEW.md +378 -0
  56. linkml_reference_validator-0.1.0/src/linkml_reference_validator/plugins/__init__.py +7 -0
  57. linkml_reference_validator-0.1.0/src/linkml_reference_validator/plugins/reference_validation_plugin.py +339 -0
  58. linkml_reference_validator-0.1.0/src/linkml_reference_validator/validation/__init__.py +7 -0
  59. linkml_reference_validator-0.1.0/src/linkml_reference_validator/validation/fuzzy_text_utils.py +298 -0
  60. linkml_reference_validator-0.1.0/src/linkml_reference_validator/validation/supporting_text_validator.py +389 -0
  61. linkml_reference_validator-0.1.0/tests/__init__.py +1 -0
  62. linkml_reference_validator-0.1.0/tests/conftest.py +47 -0
  63. linkml_reference_validator-0.1.0/tests/data/test_data_invalid.yaml +6 -0
  64. linkml_reference_validator-0.1.0/tests/data/test_data_valid.yaml +6 -0
  65. linkml_reference_validator-0.1.0/tests/data/test_schema.yaml +40 -0
  66. linkml_reference_validator-0.1.0/tests/fixtures/PMC_TEST001.md +56 -0
  67. linkml_reference_validator-0.1.0/tests/fixtures/PMC_TEST001.txt +42 -0
  68. linkml_reference_validator-0.1.0/tests/fixtures/PMC_TEST002.md +31 -0
  69. linkml_reference_validator-0.1.0/tests/fixtures/PMC_TEST002.txt +19 -0
  70. linkml_reference_validator-0.1.0/tests/fixtures/PMID_TEST001.md +21 -0
  71. linkml_reference_validator-0.1.0/tests/fixtures/PMID_TEST001.txt +9 -0
  72. linkml_reference_validator-0.1.0/tests/fixtures/PMID_TEST002.md +20 -0
  73. linkml_reference_validator-0.1.0/tests/fixtures/PMID_TEST002.txt +9 -0
  74. linkml_reference_validator-0.1.0/tests/fixtures/PMID_TEST003.md +21 -0
  75. linkml_reference_validator-0.1.0/tests/fixtures/PMID_TEST003.txt +9 -0
  76. linkml_reference_validator-0.1.0/tests/fixtures/sample.obo +21 -0
  77. linkml_reference_validator-0.1.0/tests/test_cli.py +393 -0
  78. linkml_reference_validator-0.1.0/tests/test_e2e_integration.py +361 -0
  79. linkml_reference_validator-0.1.0/tests/test_fuzzy_suggestions.py +419 -0
  80. linkml_reference_validator-0.1.0/tests/test_models.py +129 -0
  81. linkml_reference_validator-0.1.0/tests/test_plugin_integration.py +119 -0
  82. linkml_reference_validator-0.1.0/tests/test_pmc_fulltext.py +221 -0
  83. linkml_reference_validator-0.1.0/tests/test_real_validation.py +174 -0
  84. linkml_reference_validator-0.1.0/tests/test_reference_fetcher.py +160 -0
  85. linkml_reference_validator-0.1.0/tests/test_supporting_text_validator.py +274 -0
  86. linkml_reference_validator-0.1.0/tests/test_text_extractor.py +183 -0
  87. linkml_reference_validator-0.1.0/uv.lock +4592 -0
  88. linkml_reference_validator-0.1.0/z +46 -0
@@ -0,0 +1,14 @@
1
+ # Changes here will be overwritten by Copier
2
+ _commit: 34d23a0
3
+ _src_path: monarch-project-copier
4
+ copyright_year: '2025'
5
+ email: cjmungall@lbl.gov
6
+ full_name: Chris Mungall
7
+ gh_action_docs_preview: false
8
+ github_handle: cmungall
9
+ github_org: linkml
10
+ license: Apache-2.0
11
+ project_description: Validation of supporting text from references and publications
12
+ project_name: linkml-reference-validator
13
+ project_slug: linkml_reference_validator
14
+
@@ -0,0 +1,18 @@
1
+ # Check http://editorconfig.org for more information
2
+ # This is the main config file for this project:
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ indent_style = space
10
+ indent_size = 2
11
+ trim_trailing_whitespace = true
12
+
13
+ [*.py]
14
+ indent_style = space
15
+ indent_size = 4
16
+
17
+ [*.md]
18
+ trim_trailing_whitespace = false
@@ -0,0 +1,167 @@
1
+ name: "Claude Code Action"
2
+ description: "Run Claude Code in GitHub Actions workflows"
3
+
4
+ inputs:
5
+ github_token:
6
+ description: "GitHub token with repo and issues permissions"
7
+ required: true
8
+ anthropic_api_key:
9
+ description: "Anthropic API key"
10
+ required: true
11
+ cborg_api_key:
12
+ description: "CBORG API key"
13
+ required: true
14
+ prompt:
15
+ description: "The prompt to send to Claude Code"
16
+ required: false
17
+ default: ""
18
+ prompt_file:
19
+ description: "Path to a file containing the prompt to send to Claude Code"
20
+ required: false
21
+ default: ""
22
+ allowed_tools:
23
+ description: "Comma-separated list of allowed tools for Claude Code to use"
24
+ required: false
25
+ default: ""
26
+ output_file:
27
+ description: "File to save Claude Code output to (optional)"
28
+ required: false
29
+ default: ""
30
+ timeout_minutes:
31
+ description: "Timeout in minutes for Claude Code execution"
32
+ required: false
33
+ default: "10"
34
+ install_github_mcp:
35
+ description: "Whether to install the GitHub MCP server"
36
+ required: false
37
+ default: "false"
38
+ install_artl_mcp:
39
+ description: "Whether to install the ARTL MCP server"
40
+ required: false
41
+ default: "false"
42
+
43
+
44
+ runs:
45
+ using: "composite"
46
+ steps:
47
+ - name: Install uvx
48
+ shell: bash
49
+ run: |
50
+ curl -LsSf https://astral.sh/uv/install.sh | sh
51
+ source $HOME/.cargo/env
52
+ which uvx || echo "uvx not found in PATH, installing via pip"
53
+ pip install uv || true
54
+
55
+ - name: Install Claude Code
56
+ shell: bash
57
+ run: npm install -g @anthropic-ai/claude-code
58
+
59
+ - name: Install GitHub MCP Server
60
+ if: inputs.install_github_mcp == 'true'
61
+ shell: bash
62
+ run: |
63
+ claude mcp add-json github '{
64
+ "command": "docker",
65
+ "args": [
66
+ "run",
67
+ "-i",
68
+ "--rm",
69
+ "-e",
70
+ "GITHUB_PERSONAL_ACCESS_TOKEN",
71
+ "ghcr.io/github/github-mcp-server:sha-ff3036d"
72
+ ],
73
+ "env": {
74
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ inputs.GITHUB_TOKEN }}"
75
+ }
76
+ }'
77
+
78
+ - name: Install ARTL MCP Server
79
+ if: inputs.install_artl_mcp == 'true'
80
+ shell: bash
81
+ run: |
82
+ claude mcp add-json artl '{
83
+ "command": "uvx",
84
+ "args": [
85
+ "artl-mcp"
86
+ ]
87
+ }'
88
+
89
+ - name: Prepare Prompt File
90
+ shell: bash
91
+ id: prepare_prompt
92
+ run: |
93
+ # Check if either prompt or prompt_file is provided
94
+ if [ -z "${{ inputs.prompt }}" ] && [ -z "${{ inputs.prompt_file }}" ]; then
95
+ echo "::error::Neither 'prompt' nor 'prompt_file' was provided. At least one is required."
96
+ exit 1
97
+ fi
98
+
99
+ # Determine which prompt source to use
100
+ if [ ! -z "${{ inputs.prompt_file }}" ]; then
101
+ # Check if the prompt file exists
102
+ if [ ! -f "${{ inputs.prompt_file }}" ]; then
103
+ echo "::error::Prompt file '${{ inputs.prompt_file }}' does not exist."
104
+ exit 1
105
+ fi
106
+
107
+ # Use the provided prompt file
108
+ PROMPT_PATH="${{ inputs.prompt_file }}"
109
+ else
110
+ mkdir -p /tmp/claude-action
111
+ PROMPT_PATH="/tmp/claude-action/prompt.txt"
112
+ echo "${{ inputs.prompt }}" > "$PROMPT_PATH"
113
+ fi
114
+
115
+ # Verify the prompt file is not empty
116
+ if [ ! -s "$PROMPT_PATH" ]; then
117
+ echo "::error::Prompt is empty. Please provide a non-empty prompt."
118
+ exit 1
119
+ fi
120
+
121
+ # Save the prompt path for the next step
122
+ echo "PROMPT_PATH=$PROMPT_PATH" >> $GITHUB_ENV
123
+
124
+ - name: Run Claude Code
125
+ shell: bash
126
+ id: run_claude
127
+ run: |
128
+ ALLOWED_TOOLS_ARG=""
129
+ if [ ! -z "${{ inputs.allowed_tools }}" ]; then
130
+ ALLOWED_TOOLS_ARG="--allowedTools ${{ inputs.allowed_tools }}"
131
+ fi
132
+
133
+ # Set a timeout to ensure the command doesn't run indefinitely
134
+ timeout_seconds=$((${{ inputs.timeout_minutes }} * 60))
135
+
136
+ if [ -z "${{ inputs.output_file }}" ]; then
137
+ # Run Claude Code and output to console
138
+ timeout $timeout_seconds claude \
139
+ -p \
140
+ --verbose \
141
+ --output-format stream-json \
142
+ "$(cat ${{ env.PROMPT_PATH }})" \
143
+ ${{ inputs.allowed_tools != '' && format('--allowedTools "{0}"', inputs.allowed_tools) || '' }}
144
+ else
145
+ # Run Claude Code and tee output to console and file
146
+ timeout $timeout_seconds claude \
147
+ -p \
148
+ --verbose \
149
+ --output-format stream-json \
150
+ "$(cat ${{ env.PROMPT_PATH }})" \
151
+ ${{ inputs.allowed_tools != '' && format('--allowedTools "{0}"', inputs.allowed_tools) || '' }} | tee output.txt
152
+
153
+ # Process output.txt into JSON in a separate step
154
+ jq -s '.' output.txt > output.json
155
+
156
+ # Extract the result from the last item in the array (system message)
157
+ jq -r '.[-1].result' output.json > "${{ inputs.output_file }}"
158
+
159
+ echo "Complete output saved to output.json, final response saved to ${{ inputs.output_file }}"
160
+ fi
161
+
162
+ env:
163
+ ANTHROPIC_API_KEY: "."
164
+ ANTHROPIC_AUTH_TOKEN: ${{ inputs.cborg_api_key }}
165
+ GITHUB_TOKEN: ${{ inputs.github_token }}
166
+ ANTHROPIC_BASE_URL: "https://api.cborg.lbl.gov"
167
+ DISABLE_NON_ESSENTIAL_MODEL_CALLS: "1"
@@ -0,0 +1,74 @@
1
+ name: "Claude Issue summarize Action"
2
+ description: "Automatically Summarize GitHub issues using Claude Code"
3
+
4
+ inputs:
5
+ timeout_minutes:
6
+ description: "Timeout in minutes for execution"
7
+ required: false
8
+ default: "5"
9
+ anthropic_api_key:
10
+ description: "Anthropic API key"
11
+ required: true
12
+ cborg_api_key:
13
+ description: "CBORG API key"
14
+ required: true
15
+ github_token:
16
+ description: "GitHub token with repo and issues permissions"
17
+ required: true
18
+
19
+ runs:
20
+ using: "composite"
21
+ steps:
22
+ - name: Checkout repository code
23
+ uses: actions/checkout@v4
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - name: Create prompt file
28
+ shell: bash
29
+ run: |
30
+ mkdir -p /tmp/claude-prompts
31
+ cat > /tmp/claude-prompts/claude-issue-summarize-prompt.txt << 'EOF'
32
+ You're an Summarization assistant for GitHub issues. Your task is to analyze the issue, look up related issues, and summarize the issue.
33
+
34
+ Remember that this repo is primarily a note-taking and memory device for Chris Mungall, so anything you can do to enhance and enrich that would be helpful.
35
+
36
+ IMPORTANT: Don't make any PRs. You should ONLY post a response, IN THE SAME ISSUE.
37
+
38
+ Issue Information:
39
+ - REPO: ${{ github.repository }}
40
+ - ISSUE_NUMBER: ${{ github.event.issue.number }}
41
+
42
+ TASK OVERVIEW:
43
+
44
+ 1. First, use your judgement to determine the course of action.
45
+ - If the issue is an epic or has links to other issues, read those issues, and summarize them. Summarize their status etc. Given an overall summary.
46
+ - If the issue is an idea or a vague high level description, run with the idea, do deep research, give heloful suggestions with links to relevant papers etc.
47
+ - If there are links in the issue to websites, database entities, etc, then look these up.
48
+ - If there are links or references to papers, then looks these up and summarize (don't guess content - if you can't access the paper, then say "I can't access the paper")
49
+ - Try using artl-mcp to get paper fulltext.
50
+ - If you want a more powerful AI agent to take on this one and make a PR, use this magic phrase: `@dragon-ai-agent please <INSTRUCTIONS>`
51
+
52
+ 2. Next, use the GitHub tools to get context about the issue:
53
+ - You have access to these github tools:
54
+ - mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels
55
+ - mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments
56
+ - mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting)
57
+ - mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues
58
+ - mcp__github__list_issues: Use this to understand patterns in how other issues are labeled
59
+ - You can also use web searching and fetching.
60
+
61
+ - It's okay to not add any information if the issue is not clear.
62
+ EOF
63
+
64
+ - name: Run Claude Code
65
+ uses: ./.github/actions/claude-code-action
66
+ with:
67
+ prompt_file: /tmp/claude-prompts/claude-issue-summarize-prompt.txt
68
+ allowed_tools: "Bash(gh label list),WebFetch,Fetch,LS,mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__add_issue_comment,mcp__github__search_issues,mcp__github__list_issues"
69
+ install_github_mcp: "true"
70
+ install_artl_mcp: "true"
71
+ timeout_minutes: ${{ inputs.timeout_minutes }}
72
+ anthropic_api_key: ${{ inputs.anthropic_api_key }}
73
+ cborg_api_key: ${{ inputs.cborg_api_key }}
74
+ github_token: ${{ inputs.github_token }}
@@ -0,0 +1,91 @@
1
+ name: "Claude Issue Triage Action"
2
+ description: "Automatically triage GitHub issues using Claude Code"
3
+
4
+ inputs:
5
+ timeout_minutes:
6
+ description: "Timeout in minutes for execution"
7
+ required: false
8
+ default: "5"
9
+ anthropic_api_key:
10
+ description: "Anthropic API key"
11
+ required: true
12
+ cborg_api_key:
13
+ description: "CBORG API key"
14
+ required: true
15
+ github_token:
16
+ description: "GitHub token with repo and issues permissions"
17
+ required: true
18
+
19
+ runs:
20
+ using: "composite"
21
+ steps:
22
+ - name: Checkout repository code
23
+ uses: actions/checkout@v4
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - name: Create prompt file
28
+ shell: bash
29
+ run: |
30
+ mkdir -p /tmp/claude-prompts
31
+ cat > /tmp/claude-prompts/claude-issue-triage-prompt.txt << 'EOF'
32
+ You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list.
33
+
34
+ IMPORTANT: Don't post any comments or messages to the issue. Your only action should be to apply labels.
35
+
36
+ Issue Information:
37
+ - REPO: ${{ github.repository }}
38
+ - ISSUE_NUMBER: ${{ github.event.issue.number }}
39
+
40
+ TASK OVERVIEW:
41
+
42
+ 1. First, fetch the list of labels available in this repository by running: `gh label list`. Run exactly this command with nothing else.
43
+
44
+ 2. Next, use the GitHub tools to get context about the issue:
45
+ - You have access to these tools:
46
+ - mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels
47
+ - mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments
48
+ - mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting)
49
+ - mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues
50
+ - mcp__github__list_issues: Use this to understand patterns in how other issues are labeled
51
+ - Start by using mcp__github__get_issue to get the issue details
52
+
53
+ 3. Analyze the issue content, considering:
54
+ - The issue title and description
55
+ - The type of issue (bug report, feature request, question, etc.)
56
+ - Technical areas mentioned
57
+ - Severity or priority indicators
58
+ - User impact
59
+ - Components affected
60
+
61
+ 4. Select appropriate labels from the available labels list provided above:
62
+ - Choose labels that accurately reflect the issue's nature
63
+ - Be specific but comprehensive
64
+ - Select priority labels if you can determine urgency (high-priority, med-priority, or low-priority)
65
+ - Consider platform labels (android, ios) if applicable
66
+ - If you find similar issues using mcp__github__search_issues, consider using a "duplicate" label if appropriate. Only do so if the issue is a duplicate of another OPEN issue.
67
+
68
+ 5. Apply the selected labels:
69
+ - Use mcp__github__update_issue to apply your selected labels
70
+ - DO NOT post any comments explaining your decision
71
+ - DO NOT communicate directly with users
72
+ - If no labels are clearly applicable, do not apply any labels
73
+
74
+ IMPORTANT GUIDELINES:
75
+ - Be thorough in your analysis
76
+ - Only select labels from the provided list above
77
+ - DO NOT post any comments to the issue
78
+ - Your ONLY action should be to apply labels using mcp__github__update_issue
79
+ - It's okay to not add any labels if none are clearly applicable
80
+ EOF
81
+
82
+ - name: Run Claude Code
83
+ uses: ./.github/actions/claude-code-action
84
+ with:
85
+ prompt_file: /tmp/claude-prompts/claude-issue-triage-prompt.txt
86
+ allowed_tools: "Bash(gh label list),mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__search_issues,mcp__github__list_issues"
87
+ install_github_mcp: "true"
88
+ timeout_minutes: ${{ inputs.timeout_minutes }}
89
+ anthropic_api_key: ${{ inputs.anthropic_api_key }}
90
+ cborg_api_key: ${{ inputs.cborg_api_key }}
91
+ github_token: ${{ inputs.github_token }}
@@ -0,0 +1 @@
1
+ ["cmungall"]
@@ -0,0 +1,40 @@
1
+ name: "Copilot Setup Steps"
2
+
3
+
4
+ # Automatically run the setup steps when they are changed to allow for easy validation, and
5
+ # allow manual testing through the repository's "Actions" tab
6
+ on:
7
+ workflow_dispatch:
8
+ push:
9
+ paths:
10
+ - .github/workflows/copilot-setup-steps.yml
11
+ pull_request:
12
+ paths:
13
+ - .github/workflows/copilot-setup-steps.yml
14
+
15
+ jobs:
16
+ # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
17
+ copilot-setup-steps:
18
+ runs-on: ubuntu-latest
19
+
20
+ # Set the permissions to the lowest permissions possible needed for your steps.
21
+ # Copilot will be given its own token for its operations.
22
+ permissions:
23
+ # If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
24
+ contents: read
25
+
26
+ # You can define any steps you want, and they will run before the agent starts.
27
+ # If you do not check out your code, Copilot will do this for you.
28
+ steps:
29
+ - name: Checkout code
30
+ uses: actions/checkout@v4
31
+
32
+ - name: Install uv
33
+ uses: astral-sh/setup-uv@v5
34
+
35
+ - name: Install Python tools
36
+ run: |
37
+ uv sync
38
+ source .venv/bin/activate
39
+ shell: bash
40
+
@@ -0,0 +1,9 @@
1
+ # Please see the documentation for all configuration options:
2
+ # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference
3
+
4
+ version: 2
5
+ updates:
6
+ - package-ecosystem: github-actions
7
+ directory: "/"
8
+ schedule:
9
+ interval: monthly
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: Deploy docs
3
+ on: # yamllint disable-line rule:truthy
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ permissions: {}
9
+
10
+ jobs:
11
+ build-docs:
12
+ runs-on: ubuntu-latest
13
+
14
+ # Grant GITHUB_TOKEN the permissions required to make a gh-pages deployment
15
+ permissions:
16
+ contents: write # to let mkdocs write the new docs
17
+ pages: write # to deploy to Pages
18
+ id-token: write # allow to generate an OpenID Connect (OIDC) token
19
+
20
+ steps:
21
+ # https://github.com/actions/checkout
22
+ - name: Checkout
23
+ uses: actions/checkout@v4.2.2
24
+ with:
25
+ fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
26
+
27
+ - name: Configure git for the bot
28
+ # Gives the bot that commits to gh-pages a name & email address
29
+ # so that the commits have an author in the commit log.
30
+ run: |
31
+ git config user.name github-actions[bot]
32
+ git config user.email github-actions[bot]@users.noreply.github.com
33
+
34
+ # https://github.com/astral-sh/setup-uv
35
+ - name: Install uv
36
+ uses: astral-sh/setup-uv@v6.4.3
37
+ with:
38
+ python-version: 3.13
39
+ enable-cache: true
40
+ cache-dependency-glob: "uv.lock"
41
+
42
+ # https://github.com/actions/setup-python
43
+ - name: Set up Python
44
+ uses: actions/setup-python@v5.6.0
45
+ with:
46
+ python-version: 3.13
47
+
48
+ - name: Install just
49
+ run: |
50
+ uv tool install rust-just
51
+
52
+ - name: Install dependencies
53
+ run: uv sync --dev --no-progress
54
+
55
+ - name: Generate schema documentation
56
+ run: |
57
+ uv run mkdocs gh-deploy
@@ -0,0 +1,55 @@
1
+ # Built from:
2
+ # https://docs.github.com/en/actions/guides/building-and-testing-python
3
+ ---
4
+ name: Build and test
5
+
6
+ on: # yamllint disable-line rule:truthy
7
+ push:
8
+ branches: [main]
9
+ pull_request:
10
+
11
+ env:
12
+ FORCE_COLOR: "1" # Make tools pretty.
13
+
14
+ #permissions: {}
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
23
+ fail-fast: false
24
+
25
+ steps:
26
+
27
+ # https://github.com/actions/checkout
28
+ - name: Check out repository
29
+ uses: actions/checkout@v4.2.2
30
+ with:
31
+ persist-credentials: false
32
+
33
+ # https://github.com/astral-sh/setup-uv
34
+ - name: Install uv
35
+ uses: astral-sh/setup-uv@v6.4.3
36
+ with:
37
+ python-version: ${{ matrix.python-version }}
38
+ enable-cache: true
39
+ cache-dependency-glob: "uv.lock"
40
+
41
+ # https://github.com/actions/setup-python
42
+ - name: Set up Python ${{ matrix.python-version }}
43
+ uses: actions/setup-python@v5.6.0
44
+ with:
45
+ python-version: ${{ matrix.python-version }}
46
+
47
+ - name: Install just
48
+ run: |
49
+ uv tool install rust-just
50
+
51
+ - name: Install project
52
+ run: uv sync --dev
53
+
54
+ - name: Run test suite
55
+ run: just test
@@ -0,0 +1,35 @@
1
+ name: Publish Python Package
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ release:
6
+ types: [created]
7
+
8
+ jobs:
9
+ build-n-publish:
10
+ name: Build and publish Python 🐍 distributions 📦 to PyPI
11
+ runs-on: ubuntu-latest
12
+ environment: release
13
+ permissions:
14
+ id-token: write
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v6
20
+
21
+ - name: Set up Python
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: '3.12'
25
+
26
+ - name: Install dependencies
27
+ run: uv sync --all-extras
28
+
29
+ - name: Build source and wheel archives
30
+ run: uv build
31
+
32
+ - name: Publish
33
+ uses: pypa/gh-action-pypi-publish@release/v1
34
+ with:
35
+ verbose: true