com um clique
coverage-expansion
Mycelia-specific test coverage expansion workflow
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Mycelia-specific test coverage expansion workflow
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Rules for test isolation — preventing global state leakage from @eval monkeypatching
Staged test organization and testing guidelines for Mycelia
Diagnose and fix Lustre scratch "disk full" errors on /global/scratch when filesystem space appears available. Use for failed downloads/writes in scratch, TMPDIR issues, OST/MDT saturation, quota checks, and re-striping temp paths to healthy pools.
External tool integration and citation requirements for Mycelia
SLURM and HPC guidance for Mycelia benchmarks and large-scale analysis
Julia coding style and import rules for Mycelia package
| name | coverage-expansion |
| description | Mycelia-specific test coverage expansion workflow |
Systematically expand test coverage for the Mycelia Julia package.
Check for existing coverage files:
find . -name "*.cov" -mtime -1 2>/dev/null
If recent .cov files exist, use them to identify gaps without re-running.
Environment flags - ALWAYS enable these for accurate coverage:
export MYCELIA_RUN_ALL=true
export MYCELIA_RUN_EXTERNAL=true
Coverage needs non-precompiled code for accurate line hits. Use --compiled-modules=no
(matches ci/hpc/run_hpc_ci.sh).
# 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
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
0 = never executed (needs test)- = non-executable lineMatch source file to test stage:
| Source File | Test Stage |
|---|---|
reference-databases.jl | test/1_data_acquisition/ |
fastx.jl, preprocessing.jl | test/2_preprocessing_qc/ |
kmer-analysis.jl | test/3_feature_extraction_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/7_comparative_pangenomics/ |
bioconda.jl, sentencepiece.jl | test/8_tool_integration/ |
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
utility-functions.jl (used everywhere)fastx.jl, reference-databases.jlsrc/rhizomorph/ moduleskmer-analysis.jl, taxonomy-and-trees.jlbioconda.jl, sentencepiece.jl (require MYCELIA_RUN_EXTERNAL)Test.@test_skip ONLY for explicitly planned but unimplemented featuresMycelia.function_name(), not imported functionsStableRNGs.StableRNG(seed) for any randomnessadd: 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
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