idfkit-mcp 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.
- idfkit_mcp-0.1.0/.devcontainer/devcontainer.json +25 -0
- idfkit_mcp-0.1.0/.devcontainer/postCreateCommand.sh +15 -0
- idfkit_mcp-0.1.0/.dockerignore +18 -0
- idfkit_mcp-0.1.0/.github/actions/setup-python-env/action.yml +30 -0
- idfkit_mcp-0.1.0/.github/workflows/deploy-docs.yml +64 -0
- idfkit_mcp-0.1.0/.github/workflows/deploy-pr-docs.yml +124 -0
- idfkit_mcp-0.1.0/.github/workflows/main.yml +71 -0
- idfkit_mcp-0.1.0/.github/workflows/on-release-main.yml +115 -0
- idfkit_mcp-0.1.0/.github/workflows/validate-codecov-config.yml +15 -0
- idfkit_mcp-0.1.0/.gitignore +211 -0
- idfkit_mcp-0.1.0/.pre-commit-config.yaml +23 -0
- idfkit_mcp-0.1.0/.python-version +1 -0
- idfkit_mcp-0.1.0/.vscode/extensions.json +7 -0
- idfkit_mcp-0.1.0/.vscode/settings.json +26 -0
- idfkit_mcp-0.1.0/CLAUDE.md +35 -0
- idfkit_mcp-0.1.0/CONTRIBUTING.md +126 -0
- idfkit_mcp-0.1.0/Dockerfile +57 -0
- idfkit_mcp-0.1.0/LICENSE +21 -0
- idfkit_mcp-0.1.0/Makefile +89 -0
- idfkit_mcp-0.1.0/PKG-INFO +146 -0
- idfkit_mcp-0.1.0/README.md +121 -0
- idfkit_mcp-0.1.0/codecov.yaml +9 -0
- idfkit_mcp-0.1.0/docs/api/index.md +15 -0
- idfkit_mcp-0.1.0/docs/api/server.md +3 -0
- idfkit_mcp-0.1.0/docs/api/state.md +3 -0
- idfkit_mcp-0.1.0/docs/api/tools-docs.md +3 -0
- idfkit_mcp-0.1.0/docs/api/tools-read.md +3 -0
- idfkit_mcp-0.1.0/docs/api/tools-schema.md +3 -0
- idfkit_mcp-0.1.0/docs/api/tools-simulation.md +3 -0
- idfkit_mcp-0.1.0/docs/api/tools-validation.md +3 -0
- idfkit_mcp-0.1.0/docs/api/tools-weather.md +3 -0
- idfkit_mcp-0.1.0/docs/api/tools-write.md +3 -0
- idfkit_mcp-0.1.0/docs/concepts/error-semantics.md +41 -0
- idfkit_mcp-0.1.0/docs/concepts/server-state.md +58 -0
- idfkit_mcp-0.1.0/docs/getting-started/client-setup.md +352 -0
- idfkit_mcp-0.1.0/docs/getting-started/first-session.md +99 -0
- idfkit_mcp-0.1.0/docs/getting-started/installation.md +136 -0
- idfkit_mcp-0.1.0/docs/index.md +132 -0
- idfkit_mcp-0.1.0/docs/overrides/.gitkeep +0 -0
- idfkit_mcp-0.1.0/docs/stylesheets/extra.css +133 -0
- idfkit_mcp-0.1.0/docs/tools/docs.md +85 -0
- idfkit_mcp-0.1.0/docs/tools/index.md +58 -0
- idfkit_mcp-0.1.0/docs/tools/model-read.md +73 -0
- idfkit_mcp-0.1.0/docs/tools/model-write.md +63 -0
- idfkit_mcp-0.1.0/docs/tools/schema.md +47 -0
- idfkit_mcp-0.1.0/docs/tools/simulation.md +80 -0
- idfkit_mcp-0.1.0/docs/tools/validation.md +36 -0
- idfkit_mcp-0.1.0/docs/tools/weather.md +41 -0
- idfkit_mcp-0.1.0/docs/troubleshooting/setup.md +70 -0
- idfkit_mcp-0.1.0/docs/troubleshooting/simulation.md +60 -0
- idfkit_mcp-0.1.0/docs/workflows/claude.md +51 -0
- idfkit_mcp-0.1.0/docs/workflows/codex.md +49 -0
- idfkit_mcp-0.1.0/docs/workflows/multi-agent-patterns.md +47 -0
- idfkit_mcp-0.1.0/gh-pages-extra/CNAME +1 -0
- idfkit_mcp-0.1.0/gh-pages-extra/index.html +11 -0
- idfkit_mcp-0.1.0/mkdocs.yml +161 -0
- idfkit_mcp-0.1.0/pyproject.toml +124 -0
- idfkit_mcp-0.1.0/scripts/profile_results.json +437 -0
- idfkit_mcp-0.1.0/scripts/profile_server.py +622 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/__init__.py +1 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/errors.py +76 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/models.py +483 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/py.typed +0 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/serializers.py +111 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/server.py +90 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/state.py +367 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/tools/__init__.py +1 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/tools/docs.py +248 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/tools/read.py +346 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/tools/schema.py +208 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/tools/simulation.py +336 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/tools/validation.py +72 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/tools/weather.py +167 -0
- idfkit_mcp-0.1.0/src/idfkit_mcp/tools/write.py +292 -0
- idfkit_mcp-0.1.0/tests/conftest.py +59 -0
- idfkit_mcp-0.1.0/tests/test_integration.py +96 -0
- idfkit_mcp-0.1.0/tests/test_read_tools.py +258 -0
- idfkit_mcp-0.1.0/tests/test_schema_tools.py +161 -0
- idfkit_mcp-0.1.0/tests/test_server.py +168 -0
- idfkit_mcp-0.1.0/tests/test_session_persistence.py +286 -0
- idfkit_mcp-0.1.0/tests/test_simulation_tools.py +63 -0
- idfkit_mcp-0.1.0/tests/test_tools_docs.py +258 -0
- idfkit_mcp-0.1.0/tests/test_validation_tools.py +45 -0
- idfkit_mcp-0.1.0/tests/test_weather_tools.py +79 -0
- idfkit_mcp-0.1.0/tests/test_write_tools.py +135 -0
- idfkit_mcp-0.1.0/tox.ini +19 -0
- idfkit_mcp-0.1.0/uv.lock +1709 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
|
2
|
+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
|
|
3
|
+
{
|
|
4
|
+
"name": "idfkit-mcp",
|
|
5
|
+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
|
6
|
+
"image": "mcr.microsoft.com/devcontainers/python:3.12",
|
|
7
|
+
"features": {},
|
|
8
|
+
|
|
9
|
+
// Use 'postCreateCommand' to run commands after the container is created.
|
|
10
|
+
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
|
|
11
|
+
|
|
12
|
+
// Configure tool-specific properties.
|
|
13
|
+
"customizations": {
|
|
14
|
+
"vscode": {
|
|
15
|
+
"extensions": ["ms-python.python", "editorconfig.editorconfig"],
|
|
16
|
+
"settings": {
|
|
17
|
+
"python.testing.pytestArgs": ["tests"],
|
|
18
|
+
"python.testing.unittestEnabled": false,
|
|
19
|
+
"python.testing.pytestEnabled": true,
|
|
20
|
+
"python.defaultInterpreterPath": "/workspaces/idfkit-mcp/.venv/bin/python",
|
|
21
|
+
"python.testing.pytestPath": "/workspaces/idfkit-mcp/.venv/bin/pytest"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#! /usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# Install uv
|
|
4
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
5
|
+
|
|
6
|
+
# Install Dependencies
|
|
7
|
+
uv sync
|
|
8
|
+
|
|
9
|
+
# Initialize git repo if not already one (needed for pre-commit)
|
|
10
|
+
if [ ! -d ".git" ]; then
|
|
11
|
+
git init
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
# Install pre-commit hooks
|
|
15
|
+
uv run pre-commit install --install-hooks
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: "Setup Python Environment"
|
|
2
|
+
description: "Set up Python environment for the given Python version"
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
python-version:
|
|
6
|
+
description: "Python version to use"
|
|
7
|
+
required: true
|
|
8
|
+
default: "3.10"
|
|
9
|
+
uv-version:
|
|
10
|
+
description: "uv version to use"
|
|
11
|
+
required: true
|
|
12
|
+
default: "0.9"
|
|
13
|
+
|
|
14
|
+
runs:
|
|
15
|
+
using: "composite"
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: ${{ inputs.python-version }}
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v7
|
|
23
|
+
with:
|
|
24
|
+
version: ${{ inputs.uv-version }}
|
|
25
|
+
enable-cache: 'true'
|
|
26
|
+
cache-suffix: ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Install Python dependencies
|
|
29
|
+
run: uv sync --frozen
|
|
30
|
+
shell: bash
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: deploy-docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
deploy-docs:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Check out
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Check out gh-pages
|
|
17
|
+
id: checkout_gh_pages
|
|
18
|
+
continue-on-error: true
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
ref: gh-pages
|
|
22
|
+
path: gh-pages-deploy
|
|
23
|
+
|
|
24
|
+
- name: Initialize gh-pages branch if missing
|
|
25
|
+
if: steps.checkout_gh_pages.outcome == 'failure'
|
|
26
|
+
run: |
|
|
27
|
+
rm -rf gh-pages-deploy
|
|
28
|
+
git clone "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git" gh-pages-deploy
|
|
29
|
+
cd gh-pages-deploy
|
|
30
|
+
git checkout --orphan gh-pages
|
|
31
|
+
git rm -rf . >/dev/null 2>&1 || true
|
|
32
|
+
touch .nojekyll
|
|
33
|
+
git config user.name "github-actions[bot]"
|
|
34
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
35
|
+
git add .nojekyll
|
|
36
|
+
git commit -m "Initialize gh-pages branch"
|
|
37
|
+
git push origin gh-pages
|
|
38
|
+
|
|
39
|
+
- name: Set up the environment
|
|
40
|
+
uses: ./.github/actions/setup-python-env
|
|
41
|
+
|
|
42
|
+
- name: Build documentation
|
|
43
|
+
run: uv run zensical build --clean
|
|
44
|
+
|
|
45
|
+
- name: Deploy documentation to gh-pages
|
|
46
|
+
run: |
|
|
47
|
+
cd gh-pages-deploy
|
|
48
|
+
# Remove everything except .git and pr-preview
|
|
49
|
+
find . -maxdepth 1 ! -name '.' ! -name '.git' ! -name 'pr-preview' -exec rm -rf {} +
|
|
50
|
+
# Copy root-level files (CNAME, redirect index.html)
|
|
51
|
+
cp -r ../gh-pages-extra/. .
|
|
52
|
+
# Copy built docs into /docs subdirectory
|
|
53
|
+
mkdir -p docs
|
|
54
|
+
cp -r ../site/. docs/
|
|
55
|
+
touch .nojekyll
|
|
56
|
+
|
|
57
|
+
git config user.name "github-actions[bot]"
|
|
58
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
59
|
+
git add -A
|
|
60
|
+
git diff --cached --quiet || {
|
|
61
|
+
git commit -m "Deploy documentation"
|
|
62
|
+
git pull --rebase origin gh-pages
|
|
63
|
+
git push origin gh-pages
|
|
64
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
name: Deploy PR Docs Preview
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened, closed]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: pr-docs-preview-${{ github.event.number }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
deploy-preview:
|
|
17
|
+
if: github.event.action != 'closed'
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- name: Check out
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Check out gh-pages
|
|
24
|
+
id: checkout_gh_pages
|
|
25
|
+
continue-on-error: true
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
ref: gh-pages
|
|
29
|
+
path: gh-pages-deploy
|
|
30
|
+
|
|
31
|
+
- name: Initialize gh-pages branch if missing
|
|
32
|
+
if: steps.checkout_gh_pages.outcome == 'failure'
|
|
33
|
+
run: |
|
|
34
|
+
rm -rf gh-pages-deploy
|
|
35
|
+
git clone "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git" gh-pages-deploy
|
|
36
|
+
cd gh-pages-deploy
|
|
37
|
+
git checkout --orphan gh-pages
|
|
38
|
+
git rm -rf . >/dev/null 2>&1 || true
|
|
39
|
+
touch .nojekyll
|
|
40
|
+
git config user.name "github-actions[bot]"
|
|
41
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
42
|
+
git add .nojekyll
|
|
43
|
+
git commit -m "Initialize gh-pages branch"
|
|
44
|
+
git push origin gh-pages
|
|
45
|
+
|
|
46
|
+
- name: Set up the environment
|
|
47
|
+
uses: ./.github/actions/setup-python-env
|
|
48
|
+
|
|
49
|
+
- name: Build documentation
|
|
50
|
+
run: uv run zensical build --clean
|
|
51
|
+
|
|
52
|
+
- name: Deploy preview to gh-pages
|
|
53
|
+
run: |
|
|
54
|
+
rm -rf "gh-pages-deploy/pr-preview/pr-${{ github.event.number }}"
|
|
55
|
+
mkdir -p "gh-pages-deploy/pr-preview/pr-${{ github.event.number }}"
|
|
56
|
+
cp -r site/. "gh-pages-deploy/pr-preview/pr-${{ github.event.number }}/"
|
|
57
|
+
|
|
58
|
+
cd gh-pages-deploy
|
|
59
|
+
git config user.name "github-actions[bot]"
|
|
60
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
61
|
+
git add -A
|
|
62
|
+
git diff --cached --quiet || {
|
|
63
|
+
git commit -m "Deploy docs preview for PR #${{ github.event.number }}"
|
|
64
|
+
git pull --rebase origin gh-pages
|
|
65
|
+
git push origin gh-pages
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
- name: Add or update preview comment
|
|
69
|
+
uses: actions/github-script@v7
|
|
70
|
+
with:
|
|
71
|
+
script: |
|
|
72
|
+
const previewUrl = `https://mcp.idfkit.com/pr-preview/pr-${context.issue.number}/`;
|
|
73
|
+
const marker = '<!-- docs-preview-comment -->';
|
|
74
|
+
const body = [
|
|
75
|
+
marker,
|
|
76
|
+
`**Docs preview** for this PR is available at:`,
|
|
77
|
+
previewUrl,
|
|
78
|
+
].join('\n');
|
|
79
|
+
|
|
80
|
+
const { data: comments } = await github.rest.issues.listComments({
|
|
81
|
+
owner: context.repo.owner,
|
|
82
|
+
repo: context.repo.repo,
|
|
83
|
+
issue_number: context.issue.number,
|
|
84
|
+
});
|
|
85
|
+
const existing = comments.find(c => c.body.includes(marker));
|
|
86
|
+
|
|
87
|
+
if (existing) {
|
|
88
|
+
await github.rest.issues.updateComment({
|
|
89
|
+
owner: context.repo.owner,
|
|
90
|
+
repo: context.repo.repo,
|
|
91
|
+
comment_id: existing.id,
|
|
92
|
+
body,
|
|
93
|
+
});
|
|
94
|
+
} else {
|
|
95
|
+
await github.rest.issues.createComment({
|
|
96
|
+
owner: context.repo.owner,
|
|
97
|
+
repo: context.repo.repo,
|
|
98
|
+
issue_number: context.issue.number,
|
|
99
|
+
body,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
cleanup-preview:
|
|
104
|
+
if: github.event.action == 'closed'
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
steps:
|
|
107
|
+
- name: Check out gh-pages branch
|
|
108
|
+
id: checkout_gh_pages_cleanup
|
|
109
|
+
continue-on-error: true
|
|
110
|
+
uses: actions/checkout@v4
|
|
111
|
+
with:
|
|
112
|
+
ref: gh-pages
|
|
113
|
+
|
|
114
|
+
- name: Remove preview directory
|
|
115
|
+
if: steps.checkout_gh_pages_cleanup.outcome == 'success'
|
|
116
|
+
run: |
|
|
117
|
+
if [ -d "pr-preview/pr-${{ github.event.number }}" ]; then
|
|
118
|
+
git config user.name "github-actions[bot]"
|
|
119
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
120
|
+
git rm -rf "pr-preview/pr-${{ github.event.number }}"
|
|
121
|
+
git commit -m "Remove docs preview for PR #${{ github.event.number }}"
|
|
122
|
+
git pull --rebase origin gh-pages
|
|
123
|
+
git push
|
|
124
|
+
fi
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: Main
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
quality:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: Check out
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- uses: actions/cache@v4
|
|
21
|
+
with:
|
|
22
|
+
path: ~/.cache/pre-commit
|
|
23
|
+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
24
|
+
|
|
25
|
+
- name: Set up the environment
|
|
26
|
+
uses: ./.github/actions/setup-python-env
|
|
27
|
+
|
|
28
|
+
- name: Run checks
|
|
29
|
+
run: make check
|
|
30
|
+
tests-and-type-check:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
strategy:
|
|
33
|
+
matrix:
|
|
34
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
35
|
+
fail-fast: false
|
|
36
|
+
defaults:
|
|
37
|
+
run:
|
|
38
|
+
shell: bash
|
|
39
|
+
steps:
|
|
40
|
+
- name: Check out
|
|
41
|
+
uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: Set up the environment
|
|
44
|
+
uses: ./.github/actions/setup-python-env
|
|
45
|
+
with:
|
|
46
|
+
python-version: ${{ matrix.python-version }}
|
|
47
|
+
|
|
48
|
+
- name: Run tests
|
|
49
|
+
run: uv run python -m pytest tests --cov --cov-config=pyproject.toml --cov-report=xml
|
|
50
|
+
|
|
51
|
+
- name: Check typing
|
|
52
|
+
run: uv run pyright
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
- name: Upload coverage reports to Codecov with GitHub Action on Python 3.13
|
|
56
|
+
uses: codecov/codecov-action@v4
|
|
57
|
+
if: ${{ matrix.python-version == '3.13' }}
|
|
58
|
+
env:
|
|
59
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
60
|
+
|
|
61
|
+
check-docs:
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
steps:
|
|
64
|
+
- name: Check out
|
|
65
|
+
uses: actions/checkout@v4
|
|
66
|
+
|
|
67
|
+
- name: Set up the environment
|
|
68
|
+
uses: ./.github/actions/setup-python-env
|
|
69
|
+
|
|
70
|
+
- name: Check if documentation can be built
|
|
71
|
+
run: uv run zensical build --clean
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
name: release-main
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
|
|
15
|
+
set-version:
|
|
16
|
+
runs-on: ubuntu-24.04
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Export tag
|
|
21
|
+
id: vars
|
|
22
|
+
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
|
|
23
|
+
if: ${{ github.event_name == 'release' }}
|
|
24
|
+
|
|
25
|
+
- name: Update project version
|
|
26
|
+
run: |
|
|
27
|
+
sed -i "s/^version = \".*\"/version = \"$RELEASE_VERSION\"/" pyproject.toml
|
|
28
|
+
env:
|
|
29
|
+
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
|
|
30
|
+
if: ${{ github.event_name == 'release' }}
|
|
31
|
+
|
|
32
|
+
- name: Upload updated pyproject.toml
|
|
33
|
+
uses: actions/upload-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: pyproject-toml
|
|
36
|
+
path: pyproject.toml
|
|
37
|
+
|
|
38
|
+
publish:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
needs: [set-version]
|
|
41
|
+
steps:
|
|
42
|
+
- name: Check out
|
|
43
|
+
uses: actions/checkout@v4
|
|
44
|
+
|
|
45
|
+
- name: Set up the environment
|
|
46
|
+
uses: ./.github/actions/setup-python-env
|
|
47
|
+
|
|
48
|
+
- name: Download updated pyproject.toml
|
|
49
|
+
uses: actions/download-artifact@v4
|
|
50
|
+
with:
|
|
51
|
+
name: pyproject-toml
|
|
52
|
+
|
|
53
|
+
- name: Build package
|
|
54
|
+
run: uv build
|
|
55
|
+
|
|
56
|
+
- name: Publish package
|
|
57
|
+
run: uv publish
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
deploy-docs:
|
|
61
|
+
needs: publish
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
steps:
|
|
64
|
+
- name: Check out
|
|
65
|
+
uses: actions/checkout@v4
|
|
66
|
+
|
|
67
|
+
- name: Check out gh-pages
|
|
68
|
+
id: checkout_gh_pages
|
|
69
|
+
continue-on-error: true
|
|
70
|
+
uses: actions/checkout@v4
|
|
71
|
+
with:
|
|
72
|
+
ref: gh-pages
|
|
73
|
+
path: gh-pages-deploy
|
|
74
|
+
|
|
75
|
+
- name: Initialize gh-pages branch if missing
|
|
76
|
+
if: steps.checkout_gh_pages.outcome == 'failure'
|
|
77
|
+
run: |
|
|
78
|
+
rm -rf gh-pages-deploy
|
|
79
|
+
git clone "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git" gh-pages-deploy
|
|
80
|
+
cd gh-pages-deploy
|
|
81
|
+
git checkout --orphan gh-pages
|
|
82
|
+
git rm -rf . >/dev/null 2>&1 || true
|
|
83
|
+
touch .nojekyll
|
|
84
|
+
git config user.name "github-actions[bot]"
|
|
85
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
86
|
+
git add .nojekyll
|
|
87
|
+
git commit -m "Initialize gh-pages branch"
|
|
88
|
+
git push origin gh-pages
|
|
89
|
+
|
|
90
|
+
- name: Set up the environment
|
|
91
|
+
uses: ./.github/actions/setup-python-env
|
|
92
|
+
|
|
93
|
+
- name: Build documentation
|
|
94
|
+
run: uv run zensical build --clean
|
|
95
|
+
|
|
96
|
+
- name: Deploy documentation to gh-pages
|
|
97
|
+
run: |
|
|
98
|
+
cd gh-pages-deploy
|
|
99
|
+
# Remove everything except .git and pr-preview
|
|
100
|
+
find . -maxdepth 1 ! -name '.' ! -name '.git' ! -name 'pr-preview' -exec rm -rf {} +
|
|
101
|
+
# Copy root-level files (CNAME, redirect index.html)
|
|
102
|
+
cp -r ../gh-pages-extra/. .
|
|
103
|
+
# Copy built docs into /docs subdirectory
|
|
104
|
+
mkdir -p docs
|
|
105
|
+
cp -r ../site/. docs/
|
|
106
|
+
touch .nojekyll
|
|
107
|
+
|
|
108
|
+
git config user.name "github-actions[bot]"
|
|
109
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
110
|
+
git add -A
|
|
111
|
+
git diff --cached --quiet || {
|
|
112
|
+
git commit -m "Deploy documentation"
|
|
113
|
+
git pull --rebase origin gh-pages
|
|
114
|
+
git push origin gh-pages
|
|
115
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: validate-codecov-config
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths: [codecov.yaml]
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
validate-codecov-config:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- name: Validate codecov configuration
|
|
15
|
+
run: curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
docs/source
|
|
2
|
+
|
|
3
|
+
# From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
|
|
4
|
+
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[codz]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py.cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# pyenv
|
|
90
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
91
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
92
|
+
# .python-version
|
|
93
|
+
|
|
94
|
+
# pipenv
|
|
95
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
96
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
97
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
98
|
+
# install all needed dependencies.
|
|
99
|
+
#Pipfile.lock
|
|
100
|
+
|
|
101
|
+
# UV
|
|
102
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
103
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
104
|
+
# commonly ignored for libraries.
|
|
105
|
+
#uv.lock
|
|
106
|
+
|
|
107
|
+
# poetry
|
|
108
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
109
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
110
|
+
# commonly ignored for libraries.
|
|
111
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
112
|
+
#poetry.lock
|
|
113
|
+
#poetry.toml
|
|
114
|
+
|
|
115
|
+
# pdm
|
|
116
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
117
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
118
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
119
|
+
#pdm.lock
|
|
120
|
+
#pdm.toml
|
|
121
|
+
.pdm-python
|
|
122
|
+
.pdm-build/
|
|
123
|
+
|
|
124
|
+
# pixi
|
|
125
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
126
|
+
#pixi.lock
|
|
127
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
128
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
129
|
+
.pixi
|
|
130
|
+
|
|
131
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
132
|
+
__pypackages__/
|
|
133
|
+
|
|
134
|
+
# Celery stuff
|
|
135
|
+
celerybeat-schedule
|
|
136
|
+
celerybeat.pid
|
|
137
|
+
|
|
138
|
+
# SageMath parsed files
|
|
139
|
+
*.sage.py
|
|
140
|
+
|
|
141
|
+
# Environments
|
|
142
|
+
.env
|
|
143
|
+
.envrc
|
|
144
|
+
.venv
|
|
145
|
+
env/
|
|
146
|
+
venv/
|
|
147
|
+
ENV/
|
|
148
|
+
env.bak/
|
|
149
|
+
venv.bak/
|
|
150
|
+
|
|
151
|
+
# Spyder project settings
|
|
152
|
+
.spyderproject
|
|
153
|
+
.spyproject
|
|
154
|
+
|
|
155
|
+
# Rope project settings
|
|
156
|
+
.ropeproject
|
|
157
|
+
|
|
158
|
+
# mkdocs documentation
|
|
159
|
+
/site
|
|
160
|
+
|
|
161
|
+
# mypy
|
|
162
|
+
.mypy_cache/
|
|
163
|
+
.dmypy.json
|
|
164
|
+
dmypy.json
|
|
165
|
+
|
|
166
|
+
# Pyre type checker
|
|
167
|
+
.pyre/
|
|
168
|
+
|
|
169
|
+
# pytype static type analyzer
|
|
170
|
+
.pytype/
|
|
171
|
+
|
|
172
|
+
# Cython debug symbols
|
|
173
|
+
cython_debug/
|
|
174
|
+
|
|
175
|
+
# PyCharm
|
|
176
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
177
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
178
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
179
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
180
|
+
#.idea/
|
|
181
|
+
|
|
182
|
+
# Abstra
|
|
183
|
+
# Abstra is an AI-powered process automation framework.
|
|
184
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
185
|
+
# Learn more at https://abstra.io/docs
|
|
186
|
+
.abstra/
|
|
187
|
+
|
|
188
|
+
# Visual Studio Code
|
|
189
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
190
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
191
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
192
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
193
|
+
# .vscode/
|
|
194
|
+
|
|
195
|
+
# Ruff stuff:
|
|
196
|
+
.ruff_cache/
|
|
197
|
+
|
|
198
|
+
# PyPI configuration file
|
|
199
|
+
.pypirc
|
|
200
|
+
|
|
201
|
+
# Cursor
|
|
202
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
203
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
204
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
205
|
+
.cursorignore
|
|
206
|
+
.cursorindexingignore
|
|
207
|
+
|
|
208
|
+
# Marimo
|
|
209
|
+
marimo/_static/
|
|
210
|
+
marimo/_lsp/
|
|
211
|
+
__marimo__/
|