Skip to content

Commit 541bc2d

Browse files
authored
Merge branch 'main' into issue-9203_compile_python_module_name
2 parents bbfcd0f + 6e60a58 commit 541bc2d

File tree

286 files changed

+20723
-12406
lines changed

Some content is hidden

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

286 files changed

+20723
-12406
lines changed

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ exclude_lines =
1111
ignore_errors = True
1212
omit =
1313
tests/*
14+
linkml_runtime/linkml_model/*

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Check https://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+
[*.py.jinja]
18+
indent_style = space
19+
indent_size = 4
20+
21+
[*.md]
22+
trim_trailing_whitespace = false

.github/dependabot.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,17 @@ updates:
88
schedule:
99
interval: monthly
1010

11-
# Activate after migration to uv as package manager
12-
# - package-ecosystem: "uv"
13-
# directories:
14-
# - "/"
15-
# schedule:
16-
# interval: "weekly"
17-
# day: "sunday"
18-
# groups:
19-
# # Individual pull requests for major/minor updates and grouped for patch updates
20-
# angular:
21-
# applies-to: version-updates
22-
# patterns:
23-
# - "*"
24-
# update-types:
25-
# - "patch"
26-
# open-pull-requests-limit: 10
11+
- package-ecosystem: "uv"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"
15+
day: "sunday"
16+
groups:
17+
# Individual pull requests for major/minor updates and grouped for patch updates
18+
dependencies:
19+
applies-to: version-updates
20+
patterns:
21+
- "*"
22+
update-types:
23+
- "patch"
24+
open-pull-requests-limit: 10
Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Build and test linkml-runtime with latest dependency versions
2-
2+
env:
3+
UV_VERSION: "0.7.13"
34
on:
45
schedule:
56
- cron: '0 5 * * 1' # once per week on Monday at 05:00 UTC
@@ -8,7 +9,28 @@ on:
89
types: trigger-run-check-dependencies
910

1011
jobs:
12+
quality-checks:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v5.0.0
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v6.8.0
18+
with:
19+
version: ${{ env.UV_VERSION }}
20+
enable-cache: true
21+
- uses: actions/setup-python@v6.0.0
22+
with:
23+
python-version: 3.13
24+
- name: Install tox
25+
run: python -m pip install tox
26+
- name: Run codespell
27+
run: tox -e codespell
28+
- name: Run code quality checks
29+
run: tox -e lint
30+
1131
test:
32+
needs:
33+
- quality-checks
1234
strategy:
1335
fail-fast: false
1436
matrix:
@@ -25,33 +47,28 @@ jobs:
2547
runs-on: ${{ matrix.os }}
2648

2749
steps:
28-
- name: Install Poetry
29-
run: |
30-
pipx install poetry
31-
pipx inject poetry poetry-dynamic-versioning
50+
- name: Install uv
51+
uses: astral-sh/setup-uv@v6.8.0
52+
with:
53+
enable-cache: true
54+
version: ${{ env.UV_VERSION }}
55+
python-version: ${{ matrix.python-version }}
56+
3257

3358
- name: Check out repository
34-
uses: actions/checkout@v4.2.2
59+
uses: actions/checkout@v5.0.0
3560
with:
3661
# Fetch all history for all branches and all tags.
3762
# The tags are required for dynamic versioning.
38-
fetch-depth: 0
39-
40-
- name: Set up Python ${{ matrix.python-version }}
41-
uses: actions/setup-python@v5.6.0
42-
with:
43-
python-version: ${{ matrix.python-version }}
44-
cache: 'poetry'
63+
fetch-depth: 0
4564

46-
- name: Install library
47-
run: poetry install --no-interaction
65+
- name: Regenerate lock file with latest dependencies
66+
run: uv lock --upgrade
4867

49-
- name: Regenerating poetry.lock file & install (sync) dependencies
50-
run: |
51-
poetry lock --regenerate
52-
poetry sync
68+
- name: Install dependencies
69+
run: uv sync --group dev
5370

5471
- name: Run tests
5572
# Set bash shell to fail correctly on Windows https://github.com/actions/runner-images/issues/6668
5673
shell: bash
57-
run: poetry run python -m pytest --with-slow
74+
run: uv run -m pytest --with-slow

.github/workflows/main.yaml

Lines changed: 56 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,78 +4,101 @@
44
# https://github.com/codecov/codecov-action
55

66
name: Build and test linkml-runtime
7-
7+
env:
8+
UV_VERSION: "0.7.13"
89
on:
910
push:
1011
branches:
11-
- main
12+
- main
1213
pull_request:
1314
workflow_dispatch:
1415

1516
jobs:
17+
quality-checks:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v5.0.0
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v6.8.0
23+
with:
24+
version: ${{ env.UV_VERSION }}
25+
enable-cache: true
26+
- uses: actions/setup-python@v6.0.0
27+
with:
28+
python-version: 3.13
29+
- name: Install tox
30+
run: python -m pip install tox
31+
- name: Run codespell
32+
run: tox -e codespell
33+
- name: Run code format checks
34+
run: tox -e format_check
35+
1636
test:
37+
needs:
38+
- quality-checks
1739
strategy:
1840
fail-fast: false
1941
matrix:
2042
os: [ubuntu-latest, windows-latest]
2143
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
44+
# Test on Windows with only the oldest and newest Python versions
2245
exclude:
23-
- os: windows-latest
24-
python-version: "3.10"
25-
- os: windows-latest
26-
python-version: "3.11"
27-
- os: windows-latest
28-
python-version: "3.12"
46+
- os: windows-latest
47+
python-version: "3.10"
48+
- os: windows-latest
49+
python-version: "3.11"
50+
- os: windows-latest
51+
python-version: "3.12"
52+
# See https://github.com/snok/install-poetry#running-on-windows
53+
defaults:
54+
run:
55+
shell: bash
2956

3057
runs-on: ${{ matrix.os }}
3158

3259
steps:
33-
34-
#----------------------------------------------
35-
# install poetry
36-
#----------------------------------------------
37-
- name: Install Poetry
38-
run: |
39-
pipx install poetry
40-
pipx inject poetry poetry-dynamic-versioning
41-
42-
#----------------------------------------------
43-
# check-out repo and set-up python
44-
#----------------------------------------------
4560
- name: Check out repository
46-
uses: actions/checkout@v4.2.2
61+
uses: actions/checkout@v5.0.0
4762
with:
4863
fetch-depth: 0
4964

50-
- name: Set up Python ${{ matrix.python-version }}
51-
uses: actions/setup-python@v5.6.0
65+
#----------------------------------------------
66+
# install uv
67+
#----------------------------------------------
68+
- name: Install uv
69+
uses: astral-sh/setup-uv@v6.8.0
5270
with:
71+
version: ${{ env.UV_VERSION }}
72+
enable-cache: true
73+
cache-dependency-glob: "uv.lock"
5374
python-version: ${{ matrix.python-version }}
54-
cache: 'poetry'
5575

5676
#----------------------------------------------
57-
# install your root project, if required
58-
#----------------------------------------------
59-
- name: Install library
77+
# install your root project, if required
78+
#----------------------------------------------
79+
- name: Install dependencies
6080
run: |
61-
poetry install --no-interaction
81+
uv sync --group dev
82+
83+
- name: Verify uv.lock is up-to-date
84+
run: uv lock --check
6285

6386
#----------------------------------------------
64-
# coverage report
87+
# coverage report
6588
#----------------------------------------------
6689
- name: Generate coverage results
6790
# Set bash shell to fail correctly on Windows https://github.com/actions/runner-images/issues/6668
6891
shell: bash
6992
run: |
70-
poetry run coverage run -m pytest
71-
poetry run coverage xml
72-
poetry run coverage report -m
93+
uv run coverage run -m pytest
94+
uv run coverage xml
95+
uv run coverage report -m
7396
7497
#----------------------------------------------
7598
# upload coverage results
7699
#----------------------------------------------
77100
- name: Upload coverage report
78-
uses: codecov/codecov-action@v5
101+
uses: codecov/codecov-action@v5.5.1
79102
with:
80103
name: codecov-results-${{ matrix.os }}-${{ matrix.python-version }}
81104
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/pypi-publish.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Publish Python Package
22
# Upload to PyPI is triggered by creating & publishing a release in GitHub UI
3-
3+
env:
4+
UV_VERSION: "0.7.13"
45
on:
56
release:
67
# Trigger the workflow only for real releases but not for draft releases
@@ -11,24 +12,25 @@ jobs:
1112
name: Build Python 🐍 distributions 📦 for publishing to PyPI
1213
runs-on: ubuntu-latest
1314
steps:
14-
- uses: actions/checkout@v4.2.2
15+
- uses: actions/checkout@v5.0.0
1516
with:
1617
# Checkout the code including tags required for dynamic versioning
1718
fetch-depth: 0
1819

1920
- name: Set up Python
20-
uses: actions/setup-python@v5.6.0
21+
uses: actions/setup-python@v6.0.0
2122
with:
2223
python-version: 3.13
2324

24-
- name: Install Poetry
25-
run: |
26-
pipx install poetry
27-
pipx inject poetry poetry-dynamic-versioning
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v6.8.0
27+
with:
28+
enable-cache: true
29+
version: ${{ env.UV_VERSION }}
2830

2931
- name: Build source and wheel archives
3032
run: |
31-
poetry build
33+
uv build
3234
3335
- name: Store built distribution
3436
uses: actions/upload-artifact@v4.6.2
@@ -48,13 +50,13 @@ jobs:
4850
id-token: write # This permission is mandatory for trusted publishing.
4951
steps:
5052
- name: Download built distribution
51-
uses: actions/download-artifact@v4.3.0
53+
uses: actions/download-artifact@v5.0.0
5254
with:
5355
name: distribution-files
5456
path: dist
5557

5658
- name: Publish package 📦 to PyPI
5759
if: github.event_name == 'release'
58-
uses: pypa/gh-action-pypi-publish@v1.12.4
60+
uses: pypa/gh-action-pypi-publish@v1.13.0
5961
with:
6062
verbose: true

0 commit comments

Comments
 (0)