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
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
fail-fast: false

steps:
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,12 @@ jobs:
- name: Zip full project artifacts
run: zip -r project-artifacts.zip project/

- name: Strip imports from merged schema (fully self-contained artifact)
- name: Extract clean version number
run: |
uv run python3 -c "
import yaml
path = 'docs/schema/common_access_model.yaml'
data = yaml.safe_load(open(path))
data.pop('imports', None)
yaml.safe_dump(data, open(path, 'w'), sort_keys=False)
"
# Takes 'v0.0.2' from github.ref_name and strips the leading 'v'
CLEAN_VERSION="${{ github.ref_name }}"
CLEAN_VERSION="${CLEAN_VERSION#v}"
echo "VERSION=${CLEAN_VERSION}" >> $GITHUB_ENV

- name: Create GitHub Release
uses: softprops/action-gh-release@v3
Expand All @@ -87,5 +84,5 @@ jobs:
dist/*.whl
dist/*.tar.gz
project-artifacts.zip
docs/schema/common_access_model.yaml
project/monolith/common_access_model-${{ env.VERSION }}.yaml
fail_on_unmatched_files: true
6 changes: 1 addition & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ clean: _clean_project

# (Re-)Generate project and documentation locally
[group('model development')]
site: gen-project gen-doc dbt

# Support for various dbt related tasks
[group('model development')]
dbt: gensqla _gen_ftddd _gen_dbtmodel
site: gen-project gen-doc dbt gen-monolith

# SQL Alchemy model
[group('model development')]
Expand Down
26 changes: 25 additions & 1 deletion project.justfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,33 @@ _gen_ftddd:

[group('model development')]
_gen_dbtmodel:
uv run scripts/gen-dbtmodel.py
uv run gen-dbtmodel

[group('model development')]
_gen_sqla:
mkdir -p {{dest}}/sqlalchemy && \
uv run gen-sqla {{source_schema_path}} --declarative > {{dest}}/sqlalchemy/{{schema_name}}.py


# Support for various dbt related tasks
[group('model development')]
dbt: gen-sqla gen-ftddd gen-dbtmodel

# SQL Alchemy model
[group('model development')]
gen-sqla:
mkdir -p {{dest}}/sqlalchemy && \
uv run gen-sqla {{source_schema_path}} --declarative > {{dest}}/sqlalchemy/{{schema_name}}.py


[group('model development')]
gen-ftddd:
uv run linkml_extract_dd {{source_schema_path}}

[group('model development')]
gen-dbtmodel:
uv run gen-dbtmodel

[group('model development')]
gen-monolith:
uv run gen-monolith
23 changes: 14 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[build-system]
requires = ["hatchling", "uv-dynamic-versioning"]
requires = ["hatchling",
"the-caddie",
"uv-dynamic-versioning"]
build-backend = "hatchling.build"

[project]
Expand All @@ -11,12 +13,14 @@ authors = [
license = "MIT"
license-files = ["LICENSE"]
readme = "README.md"
requires-python = ">=3.9,<3.14"
requires-python = ">=3.10,<3.14"
dynamic = ["version"]

dependencies = [
"linkml>=1.9.6",
"linkml-runtime >=1.9.4",
"hatchling>=1.32.0",
"linkml>=1.11.0",
"linkml-runtime>=1.11.0",
"the-caddie",
]

[dependency-groups]
Expand All @@ -28,7 +32,7 @@ dev = [
"mknotebooks>= 0.8.0",
"hatchling>=1.27.0",
"tomli>=2.0.0",
"ftd-dd",
"the-caddie",
]

# See https://hatch.pypa.io/latest/config/build/#file-selection for how to
Expand All @@ -41,6 +45,7 @@ source = "uv-dynamic-versioning"
[tool.uv-dynamic-versioning]
vcs = "git"
style = "pep440"
pattern = "^v?(?P<base>\\d+\\.\\d+\\.\\d+)"
fallback-version = "0.0.0"

[tool.hatch.build.targets.sdist]
Expand All @@ -54,9 +59,8 @@ include = [
"scripts/",
]

# Release the SQL Alchemy files
[tool.hatch.build.hooks.custom]
path = "scripts/hatch_build.py"
# Activate the hook
[tool.hatch.build.targets.wheel.hooks.caddie-sqla]


# Ref.: https://docs.pytest.org/en/stable/reference/reference.html#configuration-options
Expand Down Expand Up @@ -91,5 +95,6 @@ extend-exclude = [
"src/common_access_model/datamodel/common_access_model.py",
]


[tool.uv.sources]
ftd-dd = { git = "https://github.com/carrollaboratory/ftd-dd" }
the-caddie = { git = "https://github.com/carrollaboratory/the-caddie" }
69 changes: 0 additions & 69 deletions scripts/hatch_build.py

This file was deleted.

Loading
Loading