smithery.ai

coverage-expansion

Mycelia-specific test coverage expansion workflow

First seen Mar 21, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,924 B
  • docs SUMMARY.md 75 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Mycelia Test Coverage Expansion

Systematically expand test coverage for the Mycelia Julia package.

Prerequisites

  1. Check for existing coverage files:

``bash find . -name "*.cov" -mtime -1 2>/dev/null `` If recent .cov files exist, use them to identify gaps without re-running.

  1. Environment flags - ALWAYS enable these for accurate coverage:

``bash export MYCELIARUNALL=true export MYCELIARUNEXTERNAL=true ` Coverage needs non-precompiled code for accurate line hits. Use --compiled-modules=no (matches ci/hpc/runhpcci.sh`).

Running Coverage Analysis

# Full coverage with all tests enabled (matches HPC CI flags)
MYCELIA_RUN_ALL=true MYCELIA_RUN_EXTERNAL=true \
  julia --project=. --compiled-modules=no \
  -e "import Pkg; Pkg.test(coverage=true)"

# Coverage files will be generated as src/*.jl.cov

Optional parity with HPC CI (skips Codecov upload):

ci/hpc/run_hpc_ci.sh --tests-only --no-codecov

Analyzing Coverage

Coverage files are generated alongside source files (e.g., src/utility-functions.jl.cov).

Format: Each line shows execution count, then source line:

    1  function foo(x)
    0      if x < 0      # uncovered branch
    -          return -x
    1      end
    1      return x
    -  end
  • Number = times executed
  • 0 = never executed (needs test)
  • - = non-executable line

Test Placement

Match source file to test stage:

Source File Test Stage
reference-databases.jl test/1dataacquisition/
fastx.jl, preprocessing.jl test/2preprocessingqc/
kmer-analysis.jl test/3featureextraction_kmer/
src/rhizomorph/ test/4_assembly/
quality-control-and-benchmarking.jl test/5_validation/
annotation.jl, genome-features.jl test/6_annotation/
taxonomy-and-trees.jl, pangenome.jl test/7comparativepangenomics/
bioconda.jl, sentencepiece.jl test/8toolintegration/

Test Template

import Test
import StableRNGs
import Mycelia

Test.@testset "FunctionName - description" begin
    rng = StableRNGs.StableRNG(42)

    Test.@testset "normal case" begin
        result = Mycelia.function_name(input)
        Test.@test result == expected
    end

    Test.@testset "edge case - empty input" begin
        result = Mycelia.function_name([])
        Test.@test isempty(result)
    end

    Test.@testset "error case" begin
        Test.@test_throws ArgumentError Mycelia.function_name(invalid)
    end
end

Priority Order

  1. Core utilities - utility-functions.jl (used everywhere)
  2. Data I/O - fastx.jl, reference-databases.jl
  3. Assembly core - src/rhizomorph/ modules
  4. Analysis - kmer-analysis.jl, taxonomy-and-trees.jl
  5. External tools - bioconda.jl, sentencepiece.jl (require MYCELIARUNEXTERNAL)

Rules

  • NEVER disable tests because functionality is broken - fix the implementation
  • Use Test.@test_skip ONLY for explicitly planned but unimplemented features
  • Always use fully qualified names: Mycelia.function_name(), not imported functions
  • Use StableRNGs.StableRNG(seed) for any randomness
  • Use small synthetic data, not large external files
  • Commit after each file's tests pass

Commit Format

add: tests for utility-functions.jl coverage

- Add tests for memory_estimate() normal and edge cases
- Add tests for safe_mkdir() error handling
- Coverage: 45% -> 72% for utility-functions.jl

Verifying Progress

After adding tests, re-run coverage and compare:

# Quick check of specific file coverage
MYCELIA_RUN_ALL=true MYCELIA_RUN_EXTERNAL=true \
  julia --project=. --compiled-modules=no -e '
    import Pkg; Pkg.test()
' && grep -c "^    0" src/utility-functions.jl.cov