Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Integration tests for the CLP core python binding library."""
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""Integration tests for the CLP core python binding library."""

import inspect

from yscope_clp_core import clp_s


def test_docstring_access() -> None:
"""Verify that `yscope_clp_core` is accessible by inspecting its API docstring."""
doc = inspect.getdoc(clp_s)
assert doc is not None
Empty file.
21 changes: 16 additions & 5 deletions taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -601,18 +601,29 @@ tasks:
python-wheels-yscope-clp-core:
vars:
TMP_DIR: "{{.G_BUILD_DIR}}/tmp-{{.TASK}}"
WITH_CORE: "{{if eq \"false\" .WITH_CORE}}false{{else}}true{{end}}"
dir: "{{.G_PYTHON_WHEELS_YSCOPE_CLP_CORE_DIR}}"
deps: ["core"]
cmds:
- "mkdir -p '{{.TMP_DIR}}'"
- defer: "rm -rf '{{.TMP_DIR}}'"

# Set up final build directory
- "mkdir -p '{{.G_PYTHON_WHEELS_BUILD_DIR}}'"
- "rm -rf '{{.G_PYTHON_WHEELS_BUILD_DIR}}'/yscope_clp_core-*.whl"

# Build the wheel into the temporary directory
- |-
export YSCOPE_CLP_CORE_CLP_S_EXE="{{.G_CORE_COMPONENT_BUILD_DIR}}/clp-s"
{{- if eq "true" .WITH_CORE}}
task core
export YSCOPE_CLP_CORE_CLP_S_EXE="{{.G_CORE_COMPONENT_BUILD_DIR}}/clp-s"
{{- end}}
uv run --no-cache python3 -m build --wheel --outdir "{{.TMP_DIR}}"

# Repair the wheel and place it in the final build directory.
# Repair the wheel and place it in the final build directory
- |-
uv run --no-cache \
auditwheel repair "{{.TMP_DIR}}"/*.whl --wheel-dir "{{.G_PYTHON_WHEELS_BUILD_DIR}}"
{{- if eq "true" .WITH_CORE}}
uv run --no-cache \
auditwheel repair "{{.TMP_DIR}}"/*.whl --wheel-dir "{{.G_PYTHON_WHEELS_BUILD_DIR}}"
{{- else}}
cp "{{.TMP_DIR}}"/*.whl "{{.G_PYTHON_WHEELS_BUILD_DIR}}"
{{- end}}
6 changes: 5 additions & 1 deletion taskfiles/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,11 @@ tasks:
- "{{.G_COMPONENTS_DIR}}/job-orchestration"
requires:
vars: ["RUFF_CHECK_FLAGS", "RUFF_FORMAT_FLAGS"]
deps: ["venv"]
deps:
- task: "venv"
- task: ":tests:integration:install-python-wheels-yscope-clp-core"
vars:
WITH_CORE: "false"
cmds:
- for:
var: "UV_PYTHON_PROJECTS_IGNORE_ERRORS"
Expand Down
23 changes: 23 additions & 0 deletions taskfiles/tests/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,26 @@ tasks:
dir: "{{.G_INTEGRATION_TESTS_DIR}}"
deps: ["::package"]
cmd: "uv run pytest -m package"

install-python-wheels-yscope-clp-core:
internal: true
vars:
WITH_CORE: "{{if eq \"false\" .WITH_CORE}}false{{else}}true{{end}}"
dir: "{{.G_INTEGRATION_TESTS_DIR}}"
deps:
- task: "::python-wheels-yscope-clp-core"
vars:
WITH_CORE: "{{.WITH_CORE}}"
cmd: |-
uv venv --allow-existing
uv pip install --force-reinstall "{{.G_PYTHON_WHEELS_BUILD_DIR}}"/yscope_clp_core-*.whl

python-wheels-yscope-clp-core:
env:
CLP_BUILD_DIR: "{{.G_BUILD_DIR}}"
dir: "{{.G_INTEGRATION_TESTS_DIR}}"
deps:
- task: "install-python-wheels-yscope-clp-core"
vars:
WITH_CORE: "true"
cmd: "uv run pytest -m yscope_clp_core"
Loading