Skip to content

Commit 2582ae0

Browse files
committed
Minimal changes to support windows
1 parent 9c49cbe commit 2582ae0

File tree

3 files changed

+15
-31
lines changed

3 files changed

+15
-31
lines changed

.github/workflows/main.yaml

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,38 @@
1-
# Built from:
2-
# https://docs.github.com/en/actions/guides/building-and-testing-python
3-
# https://github.com/snok/install-poetry#workflows-and-tips
4-
51
name: Build and test linkml-model
62

73
on:
4+
push:
5+
branches: [ main ]
86
pull_request:
9-
branches: [main]
10-
types: [opened, synchronize, reopened]
7+
workflow_dispatch:
118

129
jobs:
1310
test:
14-
runs-on: ubuntu-latest
15-
1611
strategy:
12+
fail-fast: false
1713
matrix:
14+
os: [ubuntu-latest, windows-latest]
1815
python-version: ["3.9", "3.10"]
19-
16+
runs-on: ${{ matrix.os }}
2017
steps:
21-
#----------------------------------------------
22-
# check-out repo and set-up python
23-
#----------------------------------------------
2418
- name: Check out repository
2519
uses: actions/[email protected]
2620
with:
2721
fetch-depth: 0
2822

29-
#----------------------------------------------
30-
# install & configure poetry
31-
#----------------------------------------------
32-
- name: Install Poetry
33-
run: |
34-
pipx install poetry
35-
pipx inject poetry poetry-dynamic-versioning
36-
3723
- name: Set up Python ${{ matrix.python-version }}
3824
uses: actions/[email protected]
3925
with:
4026
python-version: ${{ matrix.python-version }}
4127
cache: "poetry"
4228

43-
#----------------------------------------------
44-
# install dependencies
45-
#----------------------------------------------
29+
- name: Install Poetry
30+
run: |
31+
pipx install poetry
32+
pipx inject poetry poetry-dynamic-versioning
33+
4634
- name: Install dependencies
47-
run: poetry install --no-interaction --all-extras --no-root
35+
run: poetry install --no-interaction --no-root
4836

49-
#----------------------------------------------
50-
# run test suite
51-
#----------------------------------------------
5237
- name: Run tests
5338
run: make test

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ yamllint = "^1.32.0"
4343
mkdocs = "^1.4.2"
4444
mkdocs-material = "^8.2.8"
4545
mkdocs-mermaid2-plugin = "^0.6.0"
46-
# Using an unpublished version here because we need a feature which isn't released yet (Aug 2023)
47-
# See: https://github.com/jimporter/mike/issues/154
48-
mike = {git = "https://github.com/jimporter/mike.git", rev = "be1aafe"}
46+
mike = "^2.0.0"
4947

5048
[build-system]
5149
requires = ["poetry-core>=1.0.0"]

tests/test_linkml_files.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from linkml_model.linkml_files import URL_FOR, Format, Source, LOCAL_PATH_FOR, GITHUB_IO_PATH_FOR, GITHUB_PATH_FOR, \
77
ReleaseTag
88
from tests import abspath
9+
from pathlib import Path
910

1011
root_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "linkml_model"))
1112

@@ -55,7 +56,7 @@ def test_shorthand_paths(self):
5556
self.assertEqual('meta', str(fileloc.meta))
5657
self.assertEqual('meta.yaml', str(fileloc.meta.yaml))
5758
self.assertEqual('meta.py', str(fileloc.meta.python))
58-
self.assertEqual(abspath('linkml_model/model/schema/meta.yaml'), str(fileloc.meta.yaml.file))
59+
self.assertEqual(Path(abspath('linkml_model/model/schema/meta.yaml')), Path(fileloc.meta.yaml.file))
5960
self.assertEqual('https://linkml.github.io/linkml-model/model/schema/meta.yaml', str(fileloc.meta.yaml.github_loc()))
6061
self.assertEqual('https://raw.githubusercontent.com/linkml/linkml-model/f30637f5a585f3fc4b12fd3dbb3e7e95108d4b42/model/schema/meta.yaml', str(fileloc.meta.yaml.github_loc('v0.0.1')))
6162

0 commit comments

Comments
 (0)