diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml index f92de2a61..c8bbf6e34 100644 --- a/.github/workflows/eval.yml +++ b/.github/workflows/eval.yml @@ -50,15 +50,7 @@ jobs: - name: Download datasets run: | - lenskit data fetch -D data --movielens ml-100k ml-1m ml-10m - lenskit data fetch -D data/az23 --amazon --core Video_Games - lenskit data fetch -D data/az18 --amazon --edition 2018 Video_Games - lenskit data fetch -D data/az14 --amazon --edition 2014 Video_Games - lenskit data fetch --ms-web - if [[ ! -f data/australian_users_items.json.gz ]]; then - curl -fsL -o data/australian_users_items.json.gz.tmp https://mcauleylab.ucsd.edu/public_datasets/data/steam/australian_users_items.json.gz - mv data/australian_users_items.json.gz.tmp data/australian_users_items.json.gz - fi + lenskit data fetch -D data --movielens ml-100k - name: Run Eval Tests run: | @@ -103,15 +95,7 @@ jobs: - name: Download datasets run: | - coverage run -a --source=src/lenskit -m lenskit data fetch -D data --movielens ml-100k ml-20m ml-1m ml-10m - coverage run -a --source=src/lenskit -m lenskit data fetch -D data/az23 --amazon --core Video_Games - coverage run -a --source=src/lenskit -m lenskit data fetch -D data/az18 --amazon --edition 2018 Video_Games - coverage run -a --source=src/lenskit -m lenskit data fetch -D data/az14 --amazon --edition 2014 Video_Games - coverage run -a --source=src/lenskit -m lenskit data fetch --ms-web - if [[ ! -f data/australian_users_items.json.gz ]]; then - curl -fsL -o data/australian_users_items.json.gz.tmp https://mcauleylab.ucsd.edu/public_datasets/data/steam/australian_users_items.json.gz - mv data/australian_users_items.json.gz.tmp data/australian_users_items.json.gz - fi + coverage run -a --source=src/lenskit -m lenskit data fetch -D data --movielens ml-100k - name: πŸ•ΊπŸ» Test LensKit CLI run: | diff --git a/.woodpecker/dataset-tests.yml b/.woodpecker/dataset-tests.yml new file mode 100644 index 000000000..2969de2c0 --- /dev/null +++ b/.woodpecker/dataset-tests.yml @@ -0,0 +1,23 @@ +when: + - event: push + branch: main + - event: pull_request + +labels: + backend: docker + +steps: + - name: build and run data tests + image: codeberg.org/mdekstrand/woodpecker-mise:v1-f44-dev + pull: true + settings: + task: "ci:prepare ::: test -v --coverage -m realdata ::: test-cli tests/cli/test-data-convert.sh" + mise-env: ci + + - name: upload code coverage + image: woodpeckerci/plugin-codecov + settings: + files: + - coverage.xml + token: + from_secret: codecov-token diff --git a/LICENSE.md b/LICENSE.md index bc0f03d53..2342ec1e4 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,3 +1,8 @@ +> [!NOTE] +> The following license applies to the LensKit source code. The data sets +> under `data/` have their own terms, described in their respective README +> files. + Copyright (c) 2018–2023 Boise State University Copyright (c) 2023-2026 Drexel University and contributors diff --git a/codecov.yml b/codecov.yml index c18d3d1fd..14a84db35 100644 --- a/codecov.yml +++ b/codecov.yml @@ -2,6 +2,7 @@ codecov: notify: after_n_builds: 10 wait_for_ci: true + token: ab58c9cf-25b8-4283-a485-0b6382dc9a61 ignore: - build*.py - build-tools/* diff --git a/mise/config.ci.toml b/mise/config.ci.toml new file mode 100644 index 000000000..ec0d92c3e --- /dev/null +++ b/mise/config.ci.toml @@ -0,0 +1,5 @@ +[settings] +disable_tools = ["pkl", "perl"] + +[settings.python] +uv_venv_auto = "source" diff --git a/mise/config.toml b/mise/config.toml index fd420ee46..5c447e532 100644 --- a/mise/config.toml +++ b/mise/config.toml @@ -2,6 +2,7 @@ rust = "stable" usage = "latest" uv = "latest" +jq = "latest" shfmt = "latest" tombi = "latest" perl = { version = "latest", os = ["linux", "macos"] } @@ -12,6 +13,7 @@ yamlfmt = "latest" ruff = "latest" [settings] +experimental = true idiomatic_version_file_enable_tools = ["rust"] github.github_attestations = false aqua.github_attestations = false @@ -19,8 +21,14 @@ aqua.github_attestations = false [settings.python] # uv_venv_auto = "source" +[deps.uv] + [env] HK_MISE = 1 [hooks] -postinstall = "hk install" +postinstall = ''' +if [ -z "$CI" ]; then + hk install +fi +''' diff --git a/mise/mise.lock b/mise/mise.lock index 556f0d2cc..8319455d4 100644 --- a/mise/mise.lock +++ b/mise/mise.lock @@ -34,9 +34,44 @@ checksum = "sha256:a2e5c6131d01cfd6d62204872798f97fc933e7f142d718b3e191434e2d31e url = "https://github.com/jdx/hk/releases/download/v1.53.0/hk-x86_64-pc-windows-msvc.zip" url_api = "https://api.github.com/repos/jdx/hk/releases/assets/487429261" -[[tools.oxfmt]] -version = "0.60.0" -backend = "npm:oxfmt" +[[tools.jq]] +version = "1.8.2" +backend = "aqua:jqlang/jq" + +[tools.jq."platforms.linux-arm64"] +checksum = "sha256:8b85c817833814ddca00a144c33705546355afccf0cf39b188f3cdb48b852309" +url = "https://github.com/jqlang/jq/releases/download/jq-1.8.2/jq-linux-arm64" +url_api = "https://api.github.com/repos/jqlang/jq/releases/assets/453012756" + +[tools.jq."platforms.linux-arm64-musl"] +checksum = "sha256:8b85c817833814ddca00a144c33705546355afccf0cf39b188f3cdb48b852309" +url = "https://github.com/jqlang/jq/releases/download/jq-1.8.2/jq-linux-arm64" +url_api = "https://api.github.com/repos/jqlang/jq/releases/assets/453012756" + +[tools.jq."platforms.linux-x64"] +checksum = "sha256:b1c22172dd303f3be49e935aa56aa48a8b7a46e0bc838b4997d3bb451495870f" +url = "https://github.com/jqlang/jq/releases/download/jq-1.8.2/jq-linux-amd64" +url_api = "https://api.github.com/repos/jqlang/jq/releases/assets/453012752" + +[tools.jq."platforms.linux-x64-musl"] +checksum = "sha256:b1c22172dd303f3be49e935aa56aa48a8b7a46e0bc838b4997d3bb451495870f" +url = "https://github.com/jqlang/jq/releases/download/jq-1.8.2/jq-linux-amd64" +url_api = "https://api.github.com/repos/jqlang/jq/releases/assets/453012752" + +[tools.jq."platforms.macos-arm64"] +checksum = "sha256:2d75340ba57a4b4b4c8708a21c2dc8e958a48aaa8bba13b27f77f6e4c0eca07e" +url = "https://github.com/jqlang/jq/releases/download/jq-1.8.2/jq-macos-arm64" +url_api = "https://api.github.com/repos/jqlang/jq/releases/assets/453012783" + +[tools.jq."platforms.macos-x64"] +checksum = "sha256:e94b266e3c26690550006abe63152b782280f4e14374accdf04cbde844f00bc0" +url = "https://github.com/jqlang/jq/releases/download/jq-1.8.2/jq-macos-amd64" +url_api = "https://api.github.com/repos/jqlang/jq/releases/assets/453012782" + +[tools.jq."platforms.windows-x64"] +checksum = "sha256:a6fc67fedaf9128a3309a1e2ebb8b986aeccf70122ee46d2cb4849e423f0c627" +url = "https://github.com/jqlang/jq/releases/download/jq-1.8.2/jq-windows-amd64.exe" +url_api = "https://api.github.com/repos/jqlang/jq/releases/assets/453012788" [[tools.perl]] version = "5.44.0.0" diff --git a/mise/tasks/ci/prepare.sh b/mise/tasks/ci/prepare.sh new file mode 100755 index 000000000..523aae702 --- /dev/null +++ b/mise/tasks/ci/prepare.sh @@ -0,0 +1,23 @@ +#!/bin/zsh +#MISE description="Prepare CI environment" +#USAGE flag "-v --verbose" help="Enable verbose logging." + +. "$MISE_PROJECT_ROOT/mise/task-functions.sh" +. "${UV_PROJECT_ENVIRONMENT:-$MISE_PROJECT_ROOT/.venv}/bin/activate" + +if [[ -z $CI ]]; then + msg "not in CI, skipping environment setup" +fi + +if [[ $CI_SYSTEM_NAME = woodpecker ]]; then + if [[ -d /datasets ]]; then + msg "linking data from /datasets" + for f in /datasets/*; do + ln -s $f data/${f#/datasets/} + done + else + msg -warn "running on Woodpecker but /datasets does not exist" + fi +else + msg "nothing to do for CI $CI_SYSTEM_NAME" +fi diff --git a/mise/tasks/test-cli.sh b/mise/tasks/test-cli.sh index 7a144d1ba..3422db94f 100755 --- a/mise/tasks/test-cli.sh +++ b/mise/tasks/test-cli.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash #MISE description="Run CLI tests" +#MISE wait_for=["test"] exec ./tests/cli/run.sh "$@" diff --git a/mise/tasks/test.sh b/mise/tasks/test.sh index add734d5f..eba8dac69 100755 --- a/mise/tasks/test.sh +++ b/mise/tasks/test.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash #MISE description="Run tests" +#MISE wait_for=["ci:prepare"] #USAGE flag "--coverage" help="Run tests with coverage." #USAGE flag "--accel-coverage" help="Run tests with Rust accelerator coverage." #USAGE flag "--slow" help="Include slow tests."