From 82551567d1bb3a29aaf7c5ea83168a0063c6f869 Mon Sep 17 00:00:00 2001 From: David Anthoff Date: Fri, 28 Aug 2026 18:03:03 -0700 Subject: [PATCH 1/3] Migrate to test item framework Migrate tests and CI to the test item framework, remove PkgButler, bump min Julia to 1.12, and modernize repo infrastructure. Co-Authored-By: Claude Fable 5 --- .github/dependabot.yml | 10 +++ .../workflows/jlpkgbutler-butler-workflow.yml | 20 ----- .../jlpkgbutler-ci-master-workflow.yml | 40 --------- .../workflows/jlpkgbutler-ci-pr-workflow.yml | 38 --------- .../jlpkgbutler-codeformat-pr-workflow.yml | 21 ----- .../jlpkgbutler-compathelper-workflow.yml | 19 ----- .../workflows/jlpkgbutler-tagbot-workflow.yml | 13 --- .github/workflows/juliaci.yml | 17 ++++ .gitignore | 4 + .jlpkgbutler.toml | 1 - LICENSE.md | 2 +- Project.toml | 7 +- README.md | 3 +- test/runtests.jl | 83 +------------------ test/test_queryablebackend.jl | 78 +++++++++++++++++ 15 files changed, 118 insertions(+), 238 deletions(-) create mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/jlpkgbutler-butler-workflow.yml delete mode 100644 .github/workflows/jlpkgbutler-ci-master-workflow.yml delete mode 100644 .github/workflows/jlpkgbutler-ci-pr-workflow.yml delete mode 100644 .github/workflows/jlpkgbutler-codeformat-pr-workflow.yml delete mode 100644 .github/workflows/jlpkgbutler-compathelper-workflow.yml delete mode 100644 .github/workflows/jlpkgbutler-tagbot-workflow.yml create mode 100644 .github/workflows/juliaci.yml delete mode 100644 .jlpkgbutler.toml create mode 100644 test/test_queryablebackend.jl diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..4e00cd8 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "julia" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/jlpkgbutler-butler-workflow.yml b/.github/workflows/jlpkgbutler-butler-workflow.yml deleted file mode 100644 index f7894d9..0000000 --- a/.github/workflows/jlpkgbutler-butler-workflow.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Run the Julia Package Butler - -on: - push: - branches: - - master - schedule: - - cron: '0 */1 * * *' - -jobs: - butler: - name: "Run Package Butler" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: davidanthoff/julia-pkgbutler@releases/v1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - ssh-private-key: ${{ secrets.JLPKGBUTLER_TOKEN }} - channel: stable diff --git a/.github/workflows/jlpkgbutler-ci-master-workflow.yml b/.github/workflows/jlpkgbutler-ci-master-workflow.yml deleted file mode 100644 index 0615a7e..0000000 --- a/.github/workflows/jlpkgbutler-ci-master-workflow.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Run CI on master - -on: - push: - branches: - - master - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5'] - julia-arch: [x64, x86] - os: [ubuntu-latest, windows-latest, macOS-latest] - exclude: - - os: macOS-latest - julia-arch: x86 - - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@latest - with: - version: ${{ matrix.julia-version }} - arch: ${{ matrix.julia-arch }} - - uses: julia-actions/julia-buildpkg@latest - env: - PYTHON: "" - - uses: julia-actions/julia-runtest@latest - env: - PYTHON: "" - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 - with: - file: ./lcov.info - flags: unittests - name: codecov-umbrella - fail_ci_if_error: false - token: ${{ secrets.CODECOV_TOKEN }} - \ No newline at end of file diff --git a/.github/workflows/jlpkgbutler-ci-pr-workflow.yml b/.github/workflows/jlpkgbutler-ci-pr-workflow.yml deleted file mode 100644 index a47670e..0000000 --- a/.github/workflows/jlpkgbutler-ci-pr-workflow.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Run CI on PR - -on: - pull_request: - types: [opened, synchronize, reopened] - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5'] - julia-arch: [x64, x86] - os: [ubuntu-latest, windows-latest, macOS-latest] - exclude: - - os: macOS-latest - julia-arch: x86 - - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@latest - with: - version: ${{ matrix.julia-version }} - arch: ${{ matrix.julia-arch }} - - uses: julia-actions/julia-buildpkg@latest - env: - PYTHON: "" - - uses: julia-actions/julia-runtest@latest - env: - PYTHON: "" - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 - with: - file: ./lcov.info - flags: unittests - name: codecov-umbrella - fail_ci_if_error: false - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/jlpkgbutler-codeformat-pr-workflow.yml b/.github/workflows/jlpkgbutler-codeformat-pr-workflow.yml deleted file mode 100644 index f1252a0..0000000 --- a/.github/workflows/jlpkgbutler-codeformat-pr-workflow.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Code Formatting - -on: - push: - branches: - - master - -jobs: - format: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/julia-codeformat@releases/v1 - - name: Create Pull Request - uses: peter-evans/create-pull-request@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Format files using DocumentFormat - title: '[AUTO] Format files using DocumentFormat' - body: '[DocumentFormat.jl](https://github.com/julia-vscode/DocumentFormat.jl) would suggest these formatting changes' - labels: no changelog diff --git a/.github/workflows/jlpkgbutler-compathelper-workflow.yml b/.github/workflows/jlpkgbutler-compathelper-workflow.yml deleted file mode 100644 index e41d211..0000000 --- a/.github/workflows/jlpkgbutler-compathelper-workflow.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Run CompatHelper - -on: - schedule: - - cron: '00 * * * *' - issues: - types: [opened, reopened] - -jobs: - compathelper: - name: "Run CompatHelper.jl" - runs-on: ubuntu-latest - steps: - - name: Pkg.add("CompatHelper") - run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - - name: CompatHelper.main() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: julia -e 'using CompatHelper; CompatHelper.main()' diff --git a/.github/workflows/jlpkgbutler-tagbot-workflow.yml b/.github/workflows/jlpkgbutler-tagbot-workflow.yml deleted file mode 100644 index 8c6b404..0000000 --- a/.github/workflows/jlpkgbutler-tagbot-workflow.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: TagBot -on: - schedule: - - cron: 0 * * * * -jobs: - TagBot: - runs-on: ubuntu-latest - steps: - - uses: JuliaRegistries/TagBot@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ssh: ${{ secrets.JLPKGBUTLER_TOKEN }} - branches: true diff --git a/.github/workflows/juliaci.yml b/.github/workflows/juliaci.yml new file mode 100644 index 0000000..6aa24b5 --- /dev/null +++ b/.github/workflows/juliaci.yml @@ -0,0 +1,17 @@ +name: Julia CI + +on: + push: {branches: [main,master]} + pull_request: {types: [opened,synchronize,reopened,ready_for_review,converted_to_draft]} + issue_comment: {types: [created]} + workflow_dispatch: {inputs: {feature: {type: choice, description: What to run, options: [DocDeploy,LintAndTest,TagBot]}}} + +jobs: + julia-ci: + uses: julia-testitems/testitem-workflow/.github/workflows/juliaci.yml@v2 + with: + include-all-compatible-minor-versions: true + include-rc-versions: true + permissions: write-all + secrets: + codecov_token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 6ee59bc..8534007 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ *.jl.*.cov *.jl.mem .vscode +docs/build/ +docs/Manifest.toml +test-output*.* +Manifest.toml diff --git a/.jlpkgbutler.toml b/.jlpkgbutler.toml deleted file mode 100644 index b72304f..0000000 --- a/.jlpkgbutler.toml +++ /dev/null @@ -1 +0,0 @@ -template = "bach" diff --git a/LICENSE.md b/LICENSE.md index 63dce16..af39f65 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The QueryableBackend.jl package is licensed under the MIT "Expat" License: -> Copyright (c) 2018-2019: David Anthoff. +> Copyright (c) 2018-2026: David Anthoff. > > > Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/Project.toml b/Project.toml index 9759d14..57f8f91 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "QueryableBackend" uuid = "0898d9ac-042b-5d31-8dcc-959fb3365f19" -version = "0.1.1-DEV" +version = "0.2.0-DEV" [deps] QueryOperators = "2aef5ad7-51ca-5a8f-8e88-e75cf067b44b" @@ -8,14 +8,15 @@ IteratorInterfaceExtensions = "82899510-4779-5014-852e-03e436cf321d" TableTraits = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" [compat] -julia = "1" +julia = "1.12" QueryOperators = "0.8, 0.9, 1" IteratorInterfaceExtensions = "1" TableTraits = "1" [extras] +TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Query = "1a8c2f83-1ff3-5112-b086-8aa67b057ba1" [targets] -test = ["Test", "Query"] +test = ["Test", "Query", "TestItemRunner"] diff --git a/README.md b/README.md index 9fff809..e7e9e2e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # QueryableBackend [![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) -[![Build Status](https://travis-ci.org/queryverse/QueryableBackend.jl.svg?branch=master)](https://travis-ci.org/queryverse/QueryableBackend.jl) -[![Build status](https://ci.appveyor.com/api/projects/status/mu4vb1aiwrubcc9e/branch/master?svg=true)](https://ci.appveyor.com/project/queryverse/queryablebackend-jl/branch/master) +[![Build Status](https://github.com/queryverse/QueryableBackend.jl/actions/workflows/juliaci.yml/badge.svg?branch=main)](https://github.com/queryverse/QueryableBackend.jl/actions/workflows/juliaci.yml) [![codecov.io](http://codecov.io/github/queryverse/QueryableBackend.jl/coverage.svg?branch=master)](http://codecov.io/github/queryverse/QueryableBackend.jl?branch=master) # Overview diff --git a/test/runtests.jl b/test/runtests.jl index 131aee0..c3554b2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,82 +1,5 @@ -using QueryableBackend -import QueryOperators -import IteratorInterfaceExtensions -using Query -using Test +using TestItemRunner -struct ExampleSource -end +include("test_queryablebackend.jl") -function QueryOperators.query(x::ExampleSource) - return QueryableBackend.QueryableSource() do querytree - return [(a = 1, b = 1), (a = 2, b = 2)] - end -end - -@testset "QueryableBackend" begin - - source = ExampleSource() - - @testset "filter + map builds correct tree" begin - q = source |> @filter(_.a > 3) |> @map(_.a) - - @test q isa QueryableBackend.QueryableMap - @test q.source isa QueryableBackend.QueryableFilter - @test QueryableBackend.get_source(q) isa QueryableBackend.QueryableSource - end - - @testset "tree traversal" begin - q = source |> @filter(_.a > 3) |> @map(_.a) - - nodes = QueryableBackend.walk_tree(q) - @test length(nodes) == 3 - @test nodes[1] isa QueryableBackend.QueryableSource - @test nodes[2] isa QueryableBackend.QueryableFilter - @test nodes[3] isa QueryableBackend.QueryableMap - end - - @testset "getiterator still works" begin - r = source |> @filter(_.a > 3) |> @map(_.a) |> - IteratorInterfaceExtensions.getiterator |> collect - - @test r == [(a = 1, b = 1), (a = 2, b = 2)] - end - - @testset "orderby + take builds correct tree" begin - q = source |> @orderby(_.a) |> @take(5) - - @test q isa QueryableBackend.QueryableTake - @test q.n == 5 - @test q.source isa QueryableBackend.QueryableOrderBy - @test q.source.descending == false - end - - @testset "orderby_descending" begin - q = source |> @orderby_descending(_.a) - - @test q isa QueryableBackend.QueryableOrderBy - @test q.descending == true - end - - @testset "drop" begin - q = source |> @drop(3) - - @test q isa QueryableBackend.QueryableDrop - @test q.n == 3 - end - - @testset "unique" begin - q = source |> @unique(_.a) - - @test q isa QueryableBackend.QueryableUnique - end - - @testset "thenby" begin - q = source |> @orderby(_.a) |> @thenby(_.b) - - @test q isa QueryableBackend.QueryableThenBy - @test q.descending == false - @test q.source isa QueryableBackend.QueryableOrderBy - end - -end +@run_package_tests diff --git a/test/test_queryablebackend.jl b/test/test_queryablebackend.jl new file mode 100644 index 0000000..6828fa4 --- /dev/null +++ b/test/test_queryablebackend.jl @@ -0,0 +1,78 @@ +@testsnippet ExampleBackend begin + import QueryOperators + import IteratorInterfaceExtensions + using Query + + struct ExampleSource + end + + function QueryOperators.query(x::ExampleSource) + return QueryableBackend.QueryableSource() do querytree + return [(a = 1, b = 1), (a = 2, b = 2)] + end + end + + source = ExampleSource() +end + +@testitem "filter + map builds correct tree" setup=[ExampleBackend] begin + q = source |> @filter(_.a > 3) |> @map(_.a) + + @test q isa QueryableBackend.QueryableMap + @test q.source isa QueryableBackend.QueryableFilter + @test QueryableBackend.get_source(q) isa QueryableBackend.QueryableSource +end + +@testitem "tree traversal" setup=[ExampleBackend] begin + q = source |> @filter(_.a > 3) |> @map(_.a) + + nodes = QueryableBackend.walk_tree(q) + @test length(nodes) == 3 + @test nodes[1] isa QueryableBackend.QueryableSource + @test nodes[2] isa QueryableBackend.QueryableFilter + @test nodes[3] isa QueryableBackend.QueryableMap +end + +@testitem "getiterator still works" setup=[ExampleBackend] begin + r = source |> @filter(_.a > 3) |> @map(_.a) |> + IteratorInterfaceExtensions.getiterator |> collect + + @test r == [(a = 1, b = 1), (a = 2, b = 2)] +end + +@testitem "orderby + take builds correct tree" setup=[ExampleBackend] begin + q = source |> @orderby(_.a) |> @take(5) + + @test q isa QueryableBackend.QueryableTake + @test q.n == 5 + @test q.source isa QueryableBackend.QueryableOrderBy + @test q.source.descending == false +end + +@testitem "orderby_descending" setup=[ExampleBackend] begin + q = source |> @orderby_descending(_.a) + + @test q isa QueryableBackend.QueryableOrderBy + @test q.descending == true +end + +@testitem "drop" setup=[ExampleBackend] begin + q = source |> @drop(3) + + @test q isa QueryableBackend.QueryableDrop + @test q.n == 3 +end + +@testitem "unique" setup=[ExampleBackend] begin + q = source |> @unique(_.a) + + @test q isa QueryableBackend.QueryableUnique +end + +@testitem "thenby" setup=[ExampleBackend] begin + q = source |> @orderby(_.a) |> @thenby(_.b) + + @test q isa QueryableBackend.QueryableThenBy + @test q.descending == false + @test q.source isa QueryableBackend.QueryableOrderBy +end From e824582058256eff1576c19ba1e99411f4f889f3 Mon Sep 17 00:00:00 2001 From: David Anthoff Date: Fri, 28 Aug 2026 18:20:33 -0700 Subject: [PATCH 2/3] Bump version to 1.0.0-DEV Move the package off 0.x to a proper 1.0 major version, and accept 1.0 versions of Queryverse sibling packages in compat. Co-Authored-By: Claude Fable 5 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 57f8f91..de9b79a 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "QueryableBackend" uuid = "0898d9ac-042b-5d31-8dcc-959fb3365f19" -version = "0.2.0-DEV" +version = "1.0.0-DEV" [deps] QueryOperators = "2aef5ad7-51ca-5a8f-8e88-e75cf067b44b" From abbdba49a9d01b7de598c9cd5f2001b67a1a98e5 Mon Sep 17 00:00:00 2001 From: David Anthoff Date: Fri, 28 Aug 2026 21:02:00 -0700 Subject: [PATCH 3/3] Restore original Julia compat range Keep supporting the Julia versions the package supported before the test item migration instead of raising the floor to 1.12. Co-Authored-By: Claude Fable 5 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index de9b79a..aa3914f 100644 --- a/Project.toml +++ b/Project.toml @@ -8,7 +8,7 @@ IteratorInterfaceExtensions = "82899510-4779-5014-852e-03e436cf321d" TableTraits = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" [compat] -julia = "1.12" +julia = "1" QueryOperators = "0.8, 0.9, 1" IteratorInterfaceExtensions = "1" TableTraits = "1"