Md/optimize (DO NOT REVIEW YET)#29
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds CI-driven code coverage reporting (including markdown summaries/badges and Codecov upload) and extends the main tidal run to support multiple (n, m, k) mode bookkeeping plus optional NetCDF output of spectra/maps, alongside a small fix to system-variable column mapping in solid1d_mush_relax.
Changes:
- Add
test/runcoverage.jlto generate coverage artifacts (LCOV/JSON/markdown) and test-count badges, and update the CI workflow to run tests with coverage + upload to Codecov. - Refactor parts of
run_tidesinsrc/Obliqua.jlto build an (n,m,k) mode list, propagate per-mode parameters through module calls, compute maps, and write results to NetCDF. - Fix target column mapping for the 6×6 variables embedded in the 8×8 system in
solid1d_mush_relax.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
test/runcoverage.jl |
New coverage/reporting script (coverage aggregation, markdown summary, badges, upload). |
src/solid1d_mush_relax.jl |
Adjusts the target column mapping used when reducing the 8×8 system to the 6×6 system. |
src/Obliqua.jl |
Mode bookkeeping refactor, map accumulation, Love-number combination changes, and NetCDF output helper. |
.github/workflows/runtests.yml |
Runs tests with coverage enabled, generates coverage summary, uploads to Codecov. |
.gitignore |
Ignores additional local environment directories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| μc = Matrix{ComplexF64} # layer x frequency | ||
|
|
||
| # Output containers that will hold data per (n, m, k) mode | ||
| knms_T = Matrix{ComplexF64} | ||
| knms_L = Matrix{ComplexF64} | ||
| prf_total = Matrix{Float64} | ||
| map_total = Array{Float64, 4} |
| for iss in 1:N_σ | ||
| unorm_prf = radial_profile_at_sigma(Float64(σ_range[iss]), prf_itp_shells) | ||
| P_T_1_prf[iss, :] = unorm_prf .* U2 | ||
| unorm_prf = prf_total[iss, :] | ||
| unorm_map = sum(map_total[iss, :, :, :], dims=1) # sum over layers to get surface map | ||
|
|
||
| P_T_1_prf[iss, :] = Float64.(unorm_prf .* U2) | ||
| P_T_1_map[iss, :, :] = Float64.(unorm_map .* U2) | ||
|
|
| P_T_s_prf = zeros(Float64, N_σ, length(shear)) | ||
| P_T_s_map = zeros(Float64, N_σ, length(collect(0:res:180)), length(collect(0:res:360-0.001))) | ||
|
|
| - `P_T_blk::Float64` : Tidal heating in the black hole. | ||
| - `P_T_prf_blk::Float64` : Tidal heating profile in the black hole. |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
Description
This pull request adds a comprehensive automated code coverage reporting workflow to the project. It introduces a new script for generating detailed coverage and test statistics, updates the CI pipeline to collect and upload coverage data to Codecov, and makes a minor fix in the system variable mapping in the
solid1d_mush_relaxmodule.Continuous Integration and Coverage Reporting:
.github/workflows/runtests.yml) is updated to run tests with code coverage enabled, generate a coverage report and markdown summary, and upload results to Codecov. This ensures coverage metrics are always up-to-date and visible in CI.test/runcoverage.jlis added, which:coverage.md) with per-file coverage statistics, highlighting files needing attention and quick wins for test coverage improvements.Code Quality and Maintenance:
src/solid1d_mush_relax.jl, the mapping of target columns for system variables is corrected to use explicit column indices, improving clarity and correctness in the system setup.A short summary of the changes made in this pull-request.Will close #11 #28
Include screenshots or log files if appropriate.
Validation of changes
Testing on linux, ubuntu, with Julia Version 1.11.6.
Checklist
Relevant people
@nichollsh