Skip to content

Commit 1cba4d1

Browse files
authored
Merge branch 'linkml:main' into main
2 parents e4a2387 + 893c156 commit 1cba4d1

File tree

1,054 files changed

+73061
-64421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,054 files changed

+73061
-64421
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# Please see the documentation for all configuration options:
22
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference
3+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
34

45
version: 2
56
updates:
67
- package-ecosystem: github-actions
78
directory: "/"
89
schedule:
910
interval: monthly
11+
groups:
12+
github-actions:
13+
patterns:
14+
- "*"
1015

1116
# Activate after migration to uv as package manager
1217
# - package-ecosystem: "uv"

.github/scripts/check_links.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
# URL pattern to match in docs
2121
URL_PATTERN = re.compile(r'https?://[^\s<>")\]`\'\,]+')
2222

23+
# Pattern for URLs pointing to files in this repo (verify locally instead of via HTTP)
24+
REPO_FILE_PATTERN = re.compile(r"https://github\.com/linkml/linkml/(?:tree|blob)/main/(.*)")
25+
2326
# Status classification
2427
OK_STATUSES = {"200", "201", "202", "203", "204", "301", "302", "303", "307", "308"}
2528
WARNING_STATUSES = {"403"} # Bot protection - probably fine, just can't verify
@@ -33,8 +36,6 @@
3336
"example.net",
3437
# Example/placeholder domains in docs
3538
"acme.org",
36-
# URL extraction issues - URLs contain special chars that break extraction
37-
"yuml.me",
3839
# Unreliable/slow - frequently timeout or rate limit
3940
"terminusdb.com",
4041
"xmlns.com",
@@ -143,6 +144,14 @@ def check_url(url: str, timeout: int = 10) -> tuple[str, str]:
143144
Returns:
144145
Tuple of (status_code_or_error, error_message_or_empty)
145146
"""
147+
# Self-referencing repo URLs: verify the file exists locally
148+
repo_match = REPO_FILE_PATTERN.match(url)
149+
if repo_match:
150+
path = Path(repo_match.group(1))
151+
if path.exists():
152+
return "200", ""
153+
return "404", f"Local path not found: {path}"
154+
146155
try:
147156
response = requests.head(
148157
url,

.github/workflows/check-external-links.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ jobs:
1616
uses: actions/checkout@v6
1717

1818
- name: Set up Python 3.
19-
uses: actions/setup-python@v6.0.0
19+
uses: actions/setup-python@v6.2.0
2020
with:
2121
python-version: "3.12"
2222

2323
- name: Install uv
24-
uses: astral-sh/setup-uv@v7.1.6
24+
uses: astral-sh/setup-uv@v7.3.1
2525
with:
2626
version: ${{ env.UV_VERSION }}
2727

2828
- name: Install dependencies
2929
run: uv pip install --system requests
3030

3131
- name: Restore link cache
32-
uses: actions/cache@v4
32+
uses: actions/cache@v5
3333
with:
3434
path: .github/link-cache.csv
3535
key: link-cache-${{ github.run_id }}

.github/workflows/doc-pages.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
git fetch upstream --tags
2525
2626
- name: Install uv
27-
uses: astral-sh/setup-uv@v7.1.6
27+
uses: astral-sh/setup-uv@v7.3.1
2828
with:
2929
version: ${{ env.UV_VERSION }}
3030
enable-cache: true
3131

3232
- name: Set up Python ${{ matrix.python-version }}
33-
uses: actions/setup-python@v6.0.0
33+
uses: actions/setup-python@v6.2.0
3434
id: setup-python
3535
with:
3636
python-version: ${{ matrix.python-version }}
@@ -47,7 +47,7 @@ jobs:
4747
cp -r _build/* ../gh-pages/
4848
- name: Deploy documentation.
4949
if: ${{ github.event_name == 'push' }}
50-
uses: JamesIves/github-pages-deploy-action@v4.7.3
50+
uses: JamesIves/github-pages-deploy-action@v4.8.0
5151
with:
5252
branch: gh-pages
5353
force: true

.github/workflows/docker-build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ jobs:
4444
uses: docker/setup-qemu-action@v3.7.0
4545

4646
- name: Set up Docker Buildx
47-
uses: docker/setup-buildx-action@v3.11.1
47+
uses: docker/setup-buildx-action@v3.12.0
4848

4949
- name: Login to DockerHub
5050
if: startsWith(github.ref, 'refs/tags/v')
51-
uses: docker/login-action@v3.6.0
51+
uses: docker/login-action@v3.7.0
5252
with:
5353
username: cjmungall
5454
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
5555

5656
- name: Build and push
57-
uses: docker/build-push-action@v6.18.0
57+
uses: docker/build-push-action@v6.19.2
5858
with:
5959
context: .
6060
platforms: linux/amd64,linux/arm64/v8

.github/workflows/docs-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
git fetch upstream --tags
3030
3131
- name: Install uv
32-
uses: astral-sh/setup-uv@v7.1.6
32+
uses: astral-sh/setup-uv@v7.3.1
3333
with:
3434
version: ${{ env.UV_VERSION }}
3535
enable-cache: true
3636

3737
- name: Set up Python ${{ matrix.python-version }}
38-
uses: actions/setup-python@v6.0.0
38+
uses: actions/setup-python@v6.2.0
3939
id: setup-python
4040
with:
4141
python-version: ${{ matrix.python-version }}

.github/workflows/main.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v6
1919
- name: Install uv
20-
uses: astral-sh/setup-uv@v7.1.6
20+
uses: astral-sh/setup-uv@v7.3.1
2121
with:
2222
version: ${{ env.UV_VERSION }}
2323

24-
- uses: actions/setup-python@v6.0.0
24+
- uses: actions/setup-python@v6.2.0
2525
with:
2626
python-version: 3.13
2727
- name: Check pyproject.toml and uv.lock
@@ -40,7 +40,7 @@ jobs:
4040
fail-fast: false
4141
matrix:
4242
os: [ubuntu-latest, windows-latest]
43-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
43+
python-version: ["3.10", "3.11", "3.12", "3.13"]
4444
# Test on Windows with only the oldest and newest Python versions
4545
exclude:
4646
- os: windows-latest
@@ -69,13 +69,13 @@ jobs:
6969
git fetch upstream --tags
7070
7171
- name: Install uv and setup uv caching
72-
uses: astral-sh/setup-uv@v7.1.6
72+
uses: astral-sh/setup-uv@v7.3.1
7373
with:
7474
version: ${{ env.UV_VERSION }}
7575
enable-cache: true
7676

7777
- name: Set up Python ${{ matrix.python-version }}
78-
uses: actions/setup-python@v6.0.0
78+
uses: actions/setup-python@v6.2.0
7979
id: setup-python
8080
with:
8181
python-version: ${{ matrix.python-version }}
@@ -86,13 +86,13 @@ jobs:
8686
uses: ts-graphviz/setup-graphviz@v2.0.2
8787
- name: Test linkml package
8888
run: |
89-
uv run coverage run -m pytest tests/linkml/ --with-network
89+
uv run coverage run -m pytest tests/linkml/ --with-network -m "not kroki"
9090
uv run coverage xml -o coverage-linkml.xml
9191
uv run coverage report -m
9292
shell: bash
9393
- name: Test linkml-runtime package
9494
run: |
95-
uv run coverage run -m pytest tests/linkml_runtime/ --with-network
95+
uv run coverage run -m pytest tests/linkml_runtime/ --with-network -m "not kroki"
9696
uv run coverage xml -o coverage-linkml_runtime.xml
9797
uv run coverage report -m
9898
shell: bash
@@ -121,7 +121,7 @@ jobs:
121121
fail-fast: false
122122
matrix:
123123
os: [ ubuntu-latest, windows-latest ]
124-
python-version: [ "3.9", "3.13" ]
124+
python-version: [ "3.10", "3.13" ]
125125
needs:
126126
- quality-checks
127127
runs-on: ${{ matrix.os }}
@@ -132,13 +132,13 @@ jobs:
132132
- name: Check out repository
133133
uses: actions/checkout@v6
134134
- name: Install uv
135-
uses: astral-sh/setup-uv@v7.1.6
135+
uses: astral-sh/setup-uv@v7.3.1
136136
with:
137137
version: ${{ env.UV_VERSION }}
138138
enable-cache: true
139139

140140
- name: Set up Python
141-
uses: actions/setup-python@v6.0.0
141+
uses: actions/setup-python@v6.2.0
142142
id: setup-python
143143
with:
144144
python-version: ${{ matrix.python-version }}
@@ -148,7 +148,7 @@ jobs:
148148
# Set bash shell to fail correctly on Windows https://github.com/actions/runner-images/issues/6668
149149
shell: bash
150150
run: |
151-
uv run coverage run -m pytest tests/linkml/ --with-slow --with-biolink -m slow -n auto
151+
uv run coverage run -m pytest tests/linkml/ --with-slow --with-biolink -m "slow and not kroki" -n auto
152152
uv run coverage xml -o coverage-linkml-slow.xml
153153
uv run coverage report -m
154154
- name: Upload linkml slow test coverage
@@ -173,12 +173,12 @@ jobs:
173173
fetch-depth: 0
174174

175175
- name: Set up Python
176-
uses: actions/setup-python@v6.0.0
176+
uses: actions/setup-python@v6.2.0
177177
with:
178178
python-version: 3.13
179179

180180
- name: Install uv
181-
uses: astral-sh/setup-uv@v7.1.6
181+
uses: astral-sh/setup-uv@v7.3.1
182182
with:
183183
version: ${{ env.UV_VERSION }}
184184
- name: Build source and wheel archives
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Weekly compatibility test against the latest linkml-model metamodel
2+
#
3+
# This workflow downloads the latest metamodel from linkml-model and runs
4+
# the compatibility tests to ensure the linkml toolkit can process it.
5+
# If tests pass and the metamodel has changed, it creates a PR with the update.
6+
7+
name: Metamodel Compatibility
8+
env:
9+
UV_VERSION: "0.7.13"
10+
on:
11+
schedule:
12+
# Run every Monday at 9:00 UTC
13+
- cron: "0 9 * * 1"
14+
workflow_dispatch:
15+
16+
jobs:
17+
metamodel-compat:
18+
runs-on: ubuntu-latest
19+
defaults:
20+
run:
21+
shell: bash
22+
steps:
23+
- name: Check out repository
24+
uses: actions/checkout@v6
25+
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v7.3.1
28+
with:
29+
version: ${{ env.UV_VERSION }}
30+
enable-cache: true
31+
32+
- name: Set up Python
33+
uses: actions/setup-python@v6.2.0
34+
with:
35+
python-version: "3.12"
36+
37+
- name: Install dependencies
38+
run: uv sync --all-groups
39+
40+
- name: Setup Graphviz
41+
uses: ts-graphviz/setup-graphviz@v2.0.2
42+
43+
- name: Download latest metamodel from linkml-model
44+
run: make download-metamodel
45+
46+
- name: Run metamodel compatibility tests
47+
id: run_tests
48+
run: |
49+
mkdir -p temp
50+
uv run pytest tests/linkml/test_metamodel_compat/ --with-slow -v 2>&1 | tee temp/test_output.txt
51+
continue-on-error: true
52+
53+
- name: Check for existing issue
54+
if: steps.run_tests.outcome == 'failure'
55+
id: check_issue
56+
run: |
57+
EXISTING_ISSUE=$(gh issue list --label "metamodel-compat" --state open --json number --jq '.[0].number // empty')
58+
echo "existing_issue=${EXISTING_ISSUE}" >> $GITHUB_OUTPUT
59+
env:
60+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
62+
- name: Create or update issue on failure
63+
if: steps.run_tests.outcome == 'failure'
64+
run: |
65+
ISSUE_TITLE="Metamodel compatibility test failure"
66+
ISSUE_BODY=$(cat <<'EOF'
67+
## Metamodel Compatibility Test Failure
68+
69+
The weekly metamodel compatibility test has failed. This indicates that the
70+
current linkml toolkit may not be compatible with the latest linkml-model metamodel.
71+
72+
**Workflow run:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
73+
74+
### Test Output (last 100 lines)
75+
```
76+
$(tail -n 100 temp/test_output.txt)
77+
```
78+
79+
### Next Steps
80+
1. Review the test output above
81+
2. Check for recent changes in [linkml-model](https://github.com/linkml/linkml-model)
82+
3. Update the linkml toolkit to handle any metamodel changes
83+
EOF
84+
)
85+
86+
if [ -n "${{ steps.check_issue.outputs.existing_issue }}" ]; then
87+
gh issue comment "${{ steps.check_issue.outputs.existing_issue }}" --body "${ISSUE_BODY}"
88+
else
89+
gh issue create \
90+
--title "${ISSUE_TITLE}" \
91+
--body "${ISSUE_BODY}" \
92+
--label "metamodel-compat"
93+
fi
94+
env:
95+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96+
97+
- name: Fail if tests failed
98+
if: steps.run_tests.outcome == 'failure'
99+
run: exit 1
100+
101+
- name: Create PR with updated metamodel
102+
if: steps.run_tests.outcome == 'success'
103+
uses: peter-evans/create-pull-request@v8
104+
with:
105+
commit-message: "Update metamodel test fixtures from linkml-model"
106+
title: "Update metamodel test fixtures from linkml-model"
107+
body: |
108+
This PR updates the metamodel test fixtures to the latest version from linkml-model.
109+
110+
The metamodel compatibility tests have passed with these changes.
111+
112+
**Workflow run:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
113+
branch: update-metamodel-fixtures
114+
delete-branch: true
115+
labels: metamodel-compat

.github/workflows/pypi-publish.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
fetch-depth: 0
1919

2020
- name: Set up Python
21-
uses: actions/setup-python@v6.0.0
21+
uses: actions/setup-python@v6.2.0
2222
with:
2323
python-version: 3.13
2424

2525
- name: Install uv
26-
uses: astral-sh/setup-uv@v7.1.6
26+
uses: astral-sh/setup-uv@v7.3.1
2727
with:
2828
version: ${{ env.UV_VERSION }}
2929

@@ -32,7 +32,7 @@ jobs:
3232
uv build --all-packages
3333
3434
- name: Store built distribution
35-
uses: actions/upload-artifact@v6.0.0
35+
uses: actions/upload-artifact@v7.0.0
3636
with:
3737
name: distribution-files
3838
path: dist/
@@ -49,7 +49,7 @@ jobs:
4949
id-token: write # This permission is mandatory for trusted publishing.
5050
steps:
5151
- name: Download built distribution
52-
uses: actions/download-artifact@v6.0.0
52+
uses: actions/download-artifact@v8.0.0
5353
with:
5454
name: distribution-files
5555
path: dist

0 commit comments

Comments
 (0)