From d5fcce406f30f5a574f050bebcb6d39126370df1 Mon Sep 17 00:00:00 2001 From: Christopher Jefferson Date: Thu, 1 Oct 2026 14:49:22 +0100 Subject: [PATCH 1/4] Skip the Digraphs tests when Digraphs is not available Co-Authored-By: Claude Opus 5.5 --- tst/digraphs.tst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tst/digraphs.tst b/tst/digraphs.tst index 125660a..4146ae9 100644 --- a/tst/digraphs.tst +++ b/tst/digraphs.tst @@ -1,3 +1,4 @@ +#@if TestPackageAvailability("digraphs") <> fail gap> LoadPackage("digraphs", false); true gap> LoadPackage("quickcheck", false); @@ -14,3 +15,4 @@ gap> Reset(GlobalMersenneTwister, 77);; Random([1..10]);; gap> rs := RandomSource(IsMersenneTwister, 3);; gap> l = List([1..20], i -> QC_MakeRandomArgument(IsDigraph, rs, 9)); true +#@fi From 50344562ab26989674a737adc96a027ff8e0a502 Mon Sep 17 00:00:00 2001 From: Christopher Jefferson Date: Thu, 1 Oct 2026 14:50:21 +0100 Subject: [PATCH 2/4] Load the IsFreeAbelian generator only when polycyclic is loaded IsFreeAbelian is defined by polycyclic, which was a needed package only for this generator. It is now an extension, like the Digraphs one. Co-Authored-By: Claude Opus 5.5 --- PackageInfo.g | 8 ++++++-- gap/generators.g | 1 - gap/polycyclic.g | 1 + tst/polycyclic.tst | 8 ++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 gap/polycyclic.g create mode 100644 tst/polycyclic.tst diff --git a/PackageInfo.g b/PackageInfo.g index 0f9bc70..499d6d5 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -65,7 +65,7 @@ PackageDoc := rec( Dependencies := rec( GAP := ">= 4.13", - NeededOtherPackages := [ ["polycyclic", ">=1.1"] ], + NeededOtherPackages := [ ], SuggestedOtherPackages := [ ], ExternalConditions := [ ], ), @@ -74,7 +74,11 @@ Extensions := [ rec( needed := [ ["digraphs", "1.0.0" ] ], filename := "gap/digraphs.g", - ) + ), + rec( + needed := [ ["polycyclic", "1.1" ] ], + filename := "gap/polycyclic.g", + ), ], AvailabilityTest := ReturnTrue, diff --git a/gap/generators.g b/gap/generators.g index 38a63e6..243fce1 100644 --- a/gap/generators.g +++ b/gap/generators.g @@ -78,4 +78,3 @@ end); QC_RegisterFilterGen(IsCyclic, {rg, limit} -> CyclicGroup(Random(rg, [1..limit]))); -QC_RegisterFilterGen(IsFreeAbelian, {rg, limit} -> FreeAbelianGroup(Random(rg, [1..limit]))); diff --git a/gap/polycyclic.g b/gap/polycyclic.g new file mode 100644 index 0000000..bc9736d --- /dev/null +++ b/gap/polycyclic.g @@ -0,0 +1 @@ +QC_RegisterFilterGen(IsFreeAbelian, {rg, limit} -> FreeAbelianGroup(Random(rg, [1..limit]))); diff --git a/tst/polycyclic.tst b/tst/polycyclic.tst new file mode 100644 index 0000000..a0c5201 --- /dev/null +++ b/tst/polycyclic.tst @@ -0,0 +1,8 @@ +#@if TestPackageAvailability("polycyclic") <> fail +gap> LoadPackage("polycyclic", false); +true +gap> LoadPackage("quickcheck", false); +true +gap> QC_Check([IsFreeAbelian], G -> IsAbelian(G) and IsFreeAbelian(G)); +true +#@fi From a288335d0c0def6316f8d74b9acd3da54a1b597d Mon Sep 17 00:00:00 2001 From: Christopher Jefferson Date: Thu, 1 Oct 2026 15:01:09 +0100 Subject: [PATCH 3/4] CI: test with only needed packages, and restrict workflow permissions Running the tests with only the needed packages loaded catches code which depends on a package that is not declared, and exercises the #@if guards on the extension tests. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/CI.yml | 8 ++++++++ .github/workflows/docs.yml | 4 ++++ .github/workflows/release.yml | 7 ++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index eaa4165..b2b5798 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,12 +2,16 @@ name: CI # Trigger the workflow on push or pull request on: + workflow_dispatch: push: branches: - master - main pull_request: +permissions: + contents: read + # the `concurrency` settings ensure that not too many CI jobs run in parallel concurrency: # group by workflow and ref; the last slightly strange component ensures that for pull @@ -36,6 +40,10 @@ jobs: gap-version: ${{ matrix.gap-version }} - uses: gap-actions/build-pkg@v3 - uses: gap-actions/run-pkg-tests@v4 + - uses: gap-actions/run-pkg-tests@v4 + with: + mode: onlyneeded + coverage: false - uses: gap-actions/process-coverage@v3 - uses: codecov/codecov-action@v6 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index aec31f0..517aec4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,12 +2,16 @@ name: Docs # Trigger the workflow on push or pull request on: + workflow_dispatch: push: branches: - main - master pull_request: +permissions: + contents: read + # the `concurrency` settings ensure that not too many CI jobs run in parallel concurrency: # group by workflow and ref; the last slightly strange component ensures that for pull diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1ced017..0d1e34c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,12 @@ on: required: false default: false -permissions: write-all +permissions: + contents: write + +concurrency: + group: release + cancel-in-progress: false jobs: release: From 6639946dc51b306bffac2951bf0d81148589375d Mon Sep 17 00:00:00 2001 From: Christopher Jefferson Date: Thu, 1 Oct 2026 15:01:09 +0100 Subject: [PATCH 4/4] Prepare for v1.1.0 Co-Authored-By: Claude Opus 5.5 --- PackageInfo.g | 14 ++++++++++---- history.md | 8 +++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/PackageInfo.g b/PackageInfo.g index 499d6d5..5d9c5e2 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -10,8 +10,8 @@ SetPackageInfo( rec( PackageName := "quickcheck", Subtitle := "Randomised Testing for GAP Functions", -Version := "1.0.2", -Date := "10/06/2026", # dd/mm/yyyy format +Version := "1.1.0", +Date := "01/10/2026", # dd/mm/yyyy format License := "MPL-2.0", Persons := [ @@ -52,7 +52,13 @@ ArchiveFormats := ".tar.gz", ## Status := "dev", -AbstractHTML := "", +AbstractHTML := Concatenation( + "The QuickCheck package provides ", + "property-based testing for GAP. It lets users easily test that a ", + "function always passes (or two functions return the same value) on ", + "many randomly generated inputs. The package can generate many types ", + "of GAP objects. Small inputs are tried first, so the first ", + "counterexample found is usually small."), PackageDoc := rec( BookName := "quickcheck", @@ -85,7 +91,7 @@ AvailabilityTest := ReturnTrue, TestFile := "tst/testall.g", -#Keywords := [ "TODO" ], +Keywords := [ "testing", "property-based testing", "randomised testing", "QuickCheck" ], )); diff --git a/history.md b/history.md index 66c7911..1e95a26 100644 --- a/history.md +++ b/history.md @@ -1,3 +1,9 @@ +v1.1.0 +====== + +* Significant documentation improvements +* Many small fixes + v1.0.2 ====== @@ -16,4 +22,4 @@ No user-visible changes to the package were made. v1.0.0 ====== -First polished release \ No newline at end of file +First polished release