From 54b2503fdb0318d50ac3a20110ae6601e016780b Mon Sep 17 00:00:00 2001 From: David Little Date: Thu, 11 Apr 2024 13:21:07 -0400 Subject: [PATCH 1/8] fix doc ci --- .github/workflows/Documenter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml index 8517975..9f27cee 100644 --- a/.github/workflows/Documenter.yml +++ b/.github/workflows/Documenter.yml @@ -40,7 +40,7 @@ jobs: version: "1" show-versioninfo: true - uses: julia-actions/cache@v1 - - uses: julia-actions/add-julia-registry@v1 + - uses: julia-actions/add-julia-registry@v2 with: key: ${{ secrets.BEACONBUDDY_SSH_KEY }} registry: beacon-biosignals/BeaconRegistry From 1f20db4da2a9242f5d7a7d524b21a9903b043c28 Mon Sep 17 00:00:00 2001 From: David Little Date: Thu, 11 Apr 2024 13:31:56 -0400 Subject: [PATCH 2/8] cleanup some ci, remove docs --- .github/workflows/CI.yml | 7 ---- .github/workflows/Documenter.yml | 68 -------------------------------- README.md | 2 - codecov.yml | 9 ----- docs/.gitignore | 1 - docs/Project.toml | 6 --- docs/fix_doctests.jl | 21 ---------- docs/make.jl | 10 ----- docs/src/index.md | 13 ------ 9 files changed, 137 deletions(-) delete mode 100644 .github/workflows/Documenter.yml delete mode 100644 codecov.yml delete mode 100644 docs/.gitignore delete mode 100644 docs/Project.toml delete mode 100644 docs/fix_doctests.jl delete mode 100644 docs/make.jl delete mode 100644 docs/src/index.md diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 89fb87c..c244dab 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -92,10 +92,3 @@ jobs: files: lcov.info flags: WeakKeyIdDicts token: ${{ secrets.CODECOV_TOKEN }} - # - name: Percy Upload - # if: ${{ matrix.version == '1' }} - # uses: percy/exec-action@v0.3.1 - # with: - # custom-command: "npx @percy/cli upload ./WeakKeyIdDicts.jl/test/test_images" - # env: - # PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_WEAKKEYIDDICTS }} diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml deleted file mode 100644 index 9f27cee..0000000 --- a/.github/workflows/Documenter.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- -name: Documenter -on: - workflow_dispatch: - push: - tags: ["*"] - branches: - - main - paths: - - "docs/**" - - "src/**" - - "Project.toml" - - ".github/workflows/Documenter.yml" - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - paths: - - "docs/**" - - "src/**" - - "Project.toml" - - ".github/workflows/Documenter.yml" - - ".github/workflows/DocPreviewCleanup.yml" -jobs: - docs: - name: Build - # Run on non-draft PRs - if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} - # These permissions are needed to: - # - Deploying documentation: https://github.com/JuliaDocs/Documenter.jl/pull/2478 - # - Delete old caches: https://github.com/julia-actions/cache#usage - permissions: - actions: write - contents: write - pull-requests: read - statuses: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v2 - with: - version: "1" - show-versioninfo: true - - uses: julia-actions/cache@v1 - - uses: julia-actions/add-julia-registry@v2 - with: - key: ${{ secrets.BEACONBUDDY_SSH_KEY }} - registry: beacon-biosignals/BeaconRegistry - - name: Install dependencies - shell: julia --project=docs --color=yes {0} - run: | - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate() - - name: Build docs - uses: julia-actions/julia-docdeploy@v1 - with: - install-package: false # Avoid instantiating twice - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Preview URL - if: ${{ github.event_name == 'pull_request' }} - run: | - repo_owner="${repo%/*}" # e.g. JuliaLang - repo_name="${repo#*/}" # e.g. Example.jl - echo ":books: Documentation preview available at:" | tee -a "$GITHUB_STEP_SUMMARY" - echo "" | tee -a "$GITHUB_STEP_SUMMARY" - env: - repo: ${{ github.repository }} # e.g. JuliaLang/Example.jl - PR: ${{ github.event.number }} diff --git a/README.md b/README.md index 210d2c1..60f0ebc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # WeakKeyIdDicts -[![docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://beacon-biosignals.github.io/WeakKeyIdDicts.jl/dev) -[![docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://beacon-biosignals.github.io/WeakKeyIdDicts.jl/stable) [![CI](https://github.com/beacon-biosignals/WeakKeyIdDicts.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/beacon-biosignals/WeakKeyIdDicts.jl/actions/workflows/CI.yml?query=branch%3Amain) [![codecov](https://codecov.io/gh/beacon-biosignals/WeakKeyIdDicts.jl/branch/main/graph/badge.svg?token=IeRxFxQwG8&flag=WeakKeyIdDicts)](https://app.codecov.io/gh/beacon-biosignals/WeakKeyIdDicts.jl/tree/main) diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 8ca2b56..0000000 --- a/codecov.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -comment: off -flag_management: - default_rules: - carryforward: true - individual_flags: - - name: WeakKeyIdDicts - paths: - - src/** diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index a007fea..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build/* diff --git a/docs/Project.toml b/docs/Project.toml deleted file mode 100644 index 3243236..0000000 --- a/docs/Project.toml +++ /dev/null @@ -1,6 +0,0 @@ -[deps] -Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -WeakKeyIdDicts = "ecbed89c-9d59-4137-ae1f-d1084086d01c" - -[compat] -Documenter = "1" diff --git a/docs/fix_doctests.jl b/docs/fix_doctests.jl deleted file mode 100644 index bd5b528..0000000 --- a/docs/fix_doctests.jl +++ /dev/null @@ -1,21 +0,0 @@ -# run this script in the `docs` project to fix the doctests if they are out of date -# carefully review the changes before committing! - -# One needs to be careful because `fix=true` will edit the source to fix -# the doctests, and it's good to separate those changes so you can check -# they are correct (and be easily revertable if they do something wrong). - -using Documenter, WeakKeyIdDicts - -DocMeta.setdocmeta!(WeakKeyIdDicts, :DocTestSetup, :(using WeakKeyIdDicts); - recursive=true) - -if get(ENV, "CI", "false") == "true" || success(`git diff --quiet`) - # Uncommment if a special aws configuration is required to run tests (as additionally set in CI) - # if ismissing(get(ENV, "AWS_PROFILE", missing)) - # @warn """You may need to set `ENV["AWS_PROFILE"] = weakkeyiddicts-ci` in order to successfully run the doctests""" - # end - doctest(WeakKeyIdDicts; fix=true) -else - error("Git repo dirty; commit changes before fixing doctests.") -end diff --git a/docs/make.jl b/docs/make.jl deleted file mode 100644 index 98d3d76..0000000 --- a/docs/make.jl +++ /dev/null @@ -1,10 +0,0 @@ -using WeakKeyIdDicts -using Documenter - -makedocs(; modules=[WeakKeyIdDicts], - sitename="WeakKeyIdDicts.jl", - authors="Beacon Biosignals") - -deploydocs(; repo="github.com/beacon-biosignals/WeakKeyIdDicts.jl.git", - push_preview=true, - devbranch="main") diff --git a/docs/src/index.md b/docs/src/index.md deleted file mode 100644 index 1b9e11d..0000000 --- a/docs/src/index.md +++ /dev/null @@ -1,13 +0,0 @@ -# WeakKeyIdDicts.jl - -```@autodocs -Modules = [WeakKeyIdDicts] -Private = false -``` - -## Non-exported functions and types - -```@autodocs -Modules = [WeakKeyIdDicts] -Public = false -``` From 58d3cdf64d8218b80bf08c3745b4bc58e4c65698 Mon Sep 17 00:00:00 2001 From: David Little Date: Thu, 11 Apr 2024 13:37:19 -0400 Subject: [PATCH 3/8] update readme --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 60f0ebc..f6f283e 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,19 @@ Implements a WeakKeyIdDict which constructs a hash table where the keys are weak references to objects that may be garbage collected even when referenced in a hash table. + +It defines one type, `WeakKeyIdDict`, that follows the same API as `Dict`. + +```julia +_tmp_key = [1] +wkd = WeakKeyIdDict(_tmp_key => 1) +let tmp = [42] + wkd[tmp] = 2 + @show length(wkd) # 2 +end +# at this point there is no strong reference left to the vector [42] +# previously reachable via tmp +GC.gc(true) + +@show length(wkd) # 1 +``` From fd1962214a312b587789cf460f95188bd13fefbc Mon Sep 17 00:00:00 2001 From: David Little Date: Thu, 11 Apr 2024 15:38:11 -0400 Subject: [PATCH 4/8] bump ci action version --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c244dab..91de295 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -77,7 +77,7 @@ jobs: version: ${{ steps.version_resolver.outputs.version }} arch: ${{ matrix.arch }} - uses: julia-actions/cache@v1 - - uses: julia-actions/add-julia-registry@v1 + - uses: julia-actions/add-julia-registry@v2 with: key: ${{ secrets.BEACONBUDDY_SSH_KEY }} registry: beacon-biosignals/BeaconRegistry From b4a7955806efe029e7c2ee4a3e29639e21474305 Mon Sep 17 00:00:00 2001 From: David Little Date: Thu, 11 Apr 2024 15:40:56 -0400 Subject: [PATCH 5/8] more ci bumping --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 91de295..5e7bacd 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -76,7 +76,7 @@ jobs: with: version: ${{ steps.version_resolver.outputs.version }} arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v1 + - uses: julia-actions/cache@v2 - uses: julia-actions/add-julia-registry@v2 with: key: ${{ secrets.BEACONBUDDY_SSH_KEY }} From f58f179295bbff4bb53261b1a5dbb031ee5c8f9a Mon Sep 17 00:00:00 2001 From: David Little Date: Thu, 11 Apr 2024 15:42:33 -0400 Subject: [PATCH 6/8] wip ci --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5e7bacd..91de295 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -76,7 +76,7 @@ jobs: with: version: ${{ steps.version_resolver.outputs.version }} arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v2 + - uses: julia-actions/cache@v1 - uses: julia-actions/add-julia-registry@v2 with: key: ${{ secrets.BEACONBUDDY_SSH_KEY }} From 64481fbeffdd98cd5d5b6acc7bdd70683d0179f3 Mon Sep 17 00:00:00 2001 From: David Little Date: Thu, 11 Apr 2024 15:46:46 -0400 Subject: [PATCH 7/8] ci wip --- .github/workflows/CI.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 91de295..df0fba5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -76,11 +76,16 @@ jobs: with: version: ${{ steps.version_resolver.outputs.version }} arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v1 + - uses: actions/cache@v2 + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-artifacts-${{ hashFiles('**/Project.toml') }} + restore-keys: ${{ runner.os }}-test-artifacts - uses: julia-actions/add-julia-registry@v2 with: key: ${{ secrets.BEACONBUDDY_SSH_KEY }} registry: beacon-biosignals/BeaconRegistry + - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 with: annotate: true From e3208fa237aa72db342a8c840dc457faacd3b7cf Mon Sep 17 00:00:00 2001 From: David Little Date: Thu, 11 Apr 2024 16:20:27 -0400 Subject: [PATCH 8/8] remove internal registry --- .github/workflows/CI.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index df0fba5..739a452 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -81,10 +81,6 @@ jobs: path: ~/.julia/artifacts key: ${{ runner.os }}-test-artifacts-${{ hashFiles('**/Project.toml') }} restore-keys: ${{ runner.os }}-test-artifacts - - uses: julia-actions/add-julia-registry@v2 - with: - key: ${{ secrets.BEACONBUDDY_SSH_KEY }} - registry: beacon-biosignals/BeaconRegistry - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 with: