BazerUtils.jl

Assorted Julia utilities including custom logging
Log | Files | Refs | README | LICENSE

commit 5f9cc7580b328c3826621ad0141e8d66e1d2d3dd
parent ae86651cd3c0bfb15f5475109bb0b6155cd6a12d
Author: Erik Loualiche <eloualic@umn.edu>
Date:   Sun, 15 Feb 2026 23:44:07 -0600

clean up CI workflows, tests, and gitignore

CI:
- Delete redundant Documenter.yml (dead template targeting wrong branch)
- Remove commented-out preview cleanup block from Documentation.yaml
- Pin julia-runtest to @v1, remove irrelevant DATADEPS_ALWAYS_ACCEPT

Tests:
- Add missing close_logger calls to prevent file handle leaks
- Replace silent try/catch with @test_throws EOFError

.gitignore:
- Narrow docs/ to docs/build/ (was ignoring doc source files)
- Add coverage artifacts (*.jl.cov, *.jl.mem, lcov.info)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Diffstat:
M.github/workflows/CI.yml | 4+---
M.github/workflows/Documentation.yaml | 27---------------------------
D.github/workflows/Documenter.yml | 51---------------------------------------------------
M.gitignore | 11+++++++----
Mtest/UnitTests/customlogger.jl | 9+++------
Mtest/UnitTests/jsonlines.jl | 5+----
6 files changed, 12 insertions(+), 95 deletions(-)

diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml @@ -32,9 +32,7 @@ jobs: arch: ${{ matrix.arch }} - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@latest - env: - DATADEPS_ALWAYS_ACCEPT: true + - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v5 with: diff --git a/.github/workflows/Documentation.yaml b/.github/workflows/Documentation.yaml @@ -28,30 +28,3 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988 run: julia --project=docs/ docs/make.jl - - - - - - - -# jobs: -# doc-preview-cleanup: -# runs-on: ubuntu-latest -# steps: -# - name: Checkout gh-pages branch -# uses: actions/checkout@v2 -# with: -# ref: gh-pages -# - name: Delete preview and history + push changes -# run: | -# if [ -d "previews/PR$PRNUM" ]; then -# git config user.name "EL" -# git config user.email "EL@EL.com" -# git rm -rf "previews/PR$PRNUM" -# git commit -m "delete preview" -# git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) -# git push --force origin gh-pages-new:gh-pages -# fi -# env: -# PRNUM: ${{ github.event.number }} diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml @@ -1,51 +0,0 @@ -# Sample workflow for building and deploying a VitePress site to GitHub Pages - -name: Documenter - -on: - # Runs on pushes targeting the `master` branch. Change this to `main` if you're - # using the `main` branch as the default branch. - push: - branches: - - master - tags: ['*'] - pull_request: - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: write - pages: write - id-token: write - statuses: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: pages - cancel-in-progress: false - -jobs: - # Build job - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Julia - uses: julia-actions/setup-julia@v2 - - name: Pull Julia cache - uses: julia-actions/cache@v2 - - name: Install documentation dependencies - run: julia --project=docs -e 'using Pkg; pkg"dev ."; Pkg.instantiate(); Pkg.precompile(); Pkg.status()' - #- name: Creating new mds from src - - name: Build and deploy docs - uses: julia-actions/julia-docdeploy@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key - GKSwstype: "100" # for Plots.jl plots (if you have them) - JULIA_DEBUG: "Documenter" - DATADEPS_ALWAYS_ACCEPT: true diff --git a/.gitignore b/.gitignore @@ -3,12 +3,15 @@ # STANDARD JULIA IGNORE /Manifest.toml /Manifest*.toml -docs/ -docs/node_modules +docs/build/ +docs/node_modules/ .DS_Store -docs/.DS_Store .env .env.gpg .vscode -# --------------------------------------------------------- +# Coverage artifacts +*.jl.cov +*.jl.mem +/lcov.info +# --------------------------------------------------------- diff --git a/test/UnitTests/customlogger.jl b/test/UnitTests/customlogger.jl @@ -57,7 +57,7 @@ @test contains(log_content[2], "WARN MESSAGE") @test contains(log_content[3], "INFO MESSAGE") @test contains(log_content[4], "DEBUG MESSAGE") - rm.(log_files) + close_logger(logger_multiple, remove_files=true) # -- logger with absolute filtering logger_multiple = custom_logger( @@ -73,6 +73,7 @@ @test countlines(log_files[3]) == 0 @test countlines(log_files[4]) != 0 # TranscodingStreams write here @test !contains(log_content[4], r"HTTP"i) + close_logger(logger_multiple, remove_files=true) # -- logger with specific filtering logger_multiple = custom_logger( @@ -89,7 +90,7 @@ @test countlines(log_files[3]) == 0; # this is getting filtered out @test countlines(log_files[4]) != 0 # TranscodingStreams write here @test contains(log_content[4], r"HTTP"i) - + close_logger(logger_multiple, remove_files=true) # -- logger with formatting logger_single = custom_logger( @@ -175,7 +176,3 @@ end - - - - diff --git a/test/UnitTests/jsonlines.jl b/test/UnitTests/jsonlines.jl @@ -50,10 +50,7 @@ third_obj = popfirst!(stateful_stream) @test third_obj["a"] == 3 @test third_obj["b"] == "baz" - try popfirst!(stateful_stream) - catch e - @test isa(e, EOFError) - end + @test_throws EOFError popfirst!(stateful_stream) # --- collect # Test that the iterator can be collected fully