Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
fetch-depth: 0

- name: Set up Python 3.
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install Poetry.
uses: snok/install-poetry@v1.3
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install dependencies.
run: poetry install -E docs
run: uv sync --extra docs

- name: Build documentation.
run: |
mkdir -p docs
touch docs/.nojekyll
poetry run gen-doc -d docs src/linkml_tutorial/schema/linkml_tutorial.yaml
poetry run mkdocs gh-deploy
uv run gen-doc -d docs src/linkml_tutorial/schema/linkml_tutorial.yaml
uv run mkdocs gh-deploy
24 changes: 8 additions & 16 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Built from:
# https://docs.github.com/en/actions/guides/building-and-testing-python
# https://github.com/snok/install-poetry#workflows-and-tips

name: Build and test linkml-runtime

Expand All @@ -20,34 +19,27 @@ jobs:
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

#----------------------------------------------
# install & configure poetry
# install uv
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1.3
- name: Install uv
uses: astral-sh/setup-uv@v5

#----------------------------------------------
# install dependencies if cache does not exist
# install dependencies
#----------------------------------------------
- name: Install dependencies
run: poetry install --no-interaction --no-root
run: uv sync

#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction

#----------------------------------------------
# run test suite
# run test suite
#----------------------------------------------
- name: Run tests
run: make test

23 changes: 9 additions & 14 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,28 @@ on:

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2.2.2
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1.1.6
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install dependencies
run: poetry install --no-interaction
run: uv sync

- name: Build source and wheel archives
run: |
poetry version $(git describe --tags --abbrev=0)
poetry build
run: uv build

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@v1.2.2
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SHELL := bash
.SUFFIXES:
.SECONDARY:

RUN = poetry run
RUN = uv run
# get values from about.yaml file
SCHEMA_NAME = $(shell sh ./utils/get-value.sh name)
SOURCE_SCHEMA_PATH = $(shell sh ./utils/get-value.sh source_schema_path)
Expand Down Expand Up @@ -48,7 +48,7 @@ setup: install gen-project gen-examples gendoc git-init-add

# install any dependencies required for building
install:
poetry install
uv sync
.PHONY: install

# ---
Expand All @@ -68,7 +68,7 @@ update-template:

# todo: consider pinning to template
update-linkml:
poetry add -D linkml@latest
uv add --dev linkml@latest

# EXPERIMENTAL
create-data-harmonizer:
Expand Down
40 changes: 23 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
[tool.poetry]
[project]
name = "linkml_tutorial"
version = "0.1.0"
description = "A repostitory that walks through schema generation. "
authors = ["LinkML Team <admin@linkml.org>"]
license = "MIT"
description = "A repository that walks through schema generation."
authors = [
{name = "LinkML Team", email = "admin@linkml.org"},
]
license = {text = "MIT"}
readme = "README.md"
include = ["README.md", "src/linkml_tutorial/schema", "project"]
requires-python = ">=3.9"
dependencies = [
"linkml-runtime>=1.9.5",
]

[tool.poetry.dependencies]
python = "^3.9"
linkml-runtime = "^1.1.24"
[project.optional-dependencies]
docs = ["linkml", "mkdocs-material"]

[tool.poetry.dev-dependencies]
linkml = "^1.3.5"
mkdocs-material = "^8.2.8"
mkdocs-mermaid2-plugin = "^0.6.0"
schemasheets = "^0.1.14"
[dependency-groups]
dev = [
"linkml>=1.9.6",
"mkdocs-material>=8.2.8",
"mkdocs-mermaid2-plugin>=0.6.0",
"schemasheets>=0.1.14",
]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.poetry.extras]
docs = ["linkml", "mkdocs-material"]
[tool.hatch.build.targets.wheel]
packages = ["src/linkml_tutorial"]
Loading