Skip to content

Md/optimize (DO NOT REVIEW YET)#29

Open
MarijnJ0 wants to merge 9 commits into
mainfrom
md/optimize
Open

Md/optimize (DO NOT REVIEW YET)#29
MarijnJ0 wants to merge 9 commits into
mainfrom
md/optimize

Conversation

@MarijnJ0
Copy link
Copy Markdown
Member

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_relax module.

Continuous Integration and Coverage Reporting:

  • The GitHub Actions workflow (.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.
  • A new script test/runcoverage.jl is added, which:
    • Collects and processes code coverage data.
    • Generates badge files for unit, integration, and total test counts.
    • Produces a detailed markdown report (coverage.md) with per-file coverage statistics, highlighting files needing attention and quick wins for test coverage improvements.
    • Uploads coverage data to Codecov.

Code Quality and Maintenance:

  • In 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

  • I have followed the contributing guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • My changes generate no new warnings or errors
  • I have checked that the tests still pass on my computer
  • I have updated the docs, as appropriate
  • I have added tests for these changes, as appropriate
  • I have checked that all dependencies have been updated, as required

Relevant people

@nichollsh

Copilot AI review requested due to automatic review settings May 25, 2026 09:57
@MarijnJ0 MarijnJ0 requested a review from a team as a code owner May 25, 2026 09:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.jl to 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_tides in src/Obliqua.jl to 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.

Comment thread test/runcoverage.jl
Comment thread test/runcoverage.jl
Comment thread test/runcoverage.jl Outdated
Comment thread .github/workflows/runtests.yml
Comment thread src/Obliqua.jl
Comment on lines +415 to +421
μ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}
Comment thread src/Obliqua.jl
Comment on lines 760 to 766
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)

Comment thread src/Obliqua.jl
Comment on lines +820 to 822
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)))

Comment thread src/solid1d_mush_relax.jl
Comment thread src/Obliqua.jl Outdated
Comment on lines +1839 to +1840
- `P_T_blk::Float64` : Tidal heating in the black hole.
- `P_T_prf_blk::Float64` : Tidal heating profile in the black hole.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

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 ☂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement tests for all major Obliqua functions

2 participants