Skip to content

MOLE.jl: New Grids module - #411

Merged
Tony-Drummond merged 8 commits into
mainfrom
valeria/mole-jl-grids-module
Oct 26, 2026
Merged

Tony-Drummond merged 8 commits into
mainfrom
valeria/mole-jl-grids-module

Conversation

@valeriabarra

Copy link
Copy Markdown
Collaborator

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Example
  • Documentation

Description

This PR adds a Grids module for the MOLE.jl Julia implementation. This contains new functions, tests, and documentation. A follow-up PR will be created to make the Operators compatible (and retro-compatible) with the new Grid module.

Related Issues & Documents

Added/updated tests?

_We encourage you to test all code included with MOLE, including examples.

  • Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

Read Contributing Guide and Code of Conduct

@valeriabarra valeriabarra self-assigned this Jul 2, 2026
@valeriabarra valeriabarra added Enhancement New feature or request MOLE.jl MOLE-2.0 Ideas and issues relating to the MOLE 2.0 development branch and or update. labels Jul 2, 2026
@codecov

codecov Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.76923% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
julia/MOLE.jl/src/Grids/validate_grid.jl 94.58% 11 Missing ⚠️

📢 Thoughts on this report? Let us know!

@valeriabarra
valeriabarra requested a review from joehellmers July 2, 2026 21:16
@valeriabarra
valeriabarra force-pushed the valeria/mole-jl-grids-module branch from 9dcc97f to f8a2ae9 Compare July 7, 2026 16:59
@valeriabarra

Copy link
Copy Markdown
Collaborator Author

@Tony-Drummond and @joehellmers , can you still review this PR? Thank you

@valeriabarra
valeriabarra force-pushed the valeria/mole-jl-grids-module branch 2 times, most recently from 6261599 to 6da444b Compare July 22, 2026 16:30
@valeriabarra
valeriabarra force-pushed the valeria/mole-jl-grids-module branch from 6da444b to 22319dc Compare August 4, 2026 16:25
@valeriabarra

Copy link
Copy Markdown
Collaborator Author

@joehellmers , @Tony-Drummond , are you still able to review this PR?
The Julia formatter action that is failing is a fluke. Locally for me the formatter passes. Thanks

@github-actions

Copy link
Copy Markdown

This pull request has had no activity for 14 days. It will be marked stale in 14 days if there is no further activity.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a Julia Grids module for constructing and validating computational grids.

Changes:

  • Adds grid types, coordinate generation, validation, and constructors.
  • Supports uniform grids, boundary metadata, and 2D curvilinear grids.
  • Adds documentation and automated tests.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docs/src/index.md Documents the Grids API.
src/MOLE.jl Loads the new module.
src/Grids/Grids.jl Defines module exports and includes.
src/Grids/coordinates.jl Generates grid coordinates.
src/Grids/make_grid.jl Adds grid constructors.
src/Grids/topologies.jl Defines grid data structures.
src/Grids/validate_grid.jl Implements validation and normalization.
test/runtests.jl Registers grid tests.
test/Grids/make_grid.jl Tests grid construction.
test/Grids/validate_grid.jl Tests validation and edge cases.
Suppressed comments (3)

julia/MOLE.jl/src/Grids/validate_grid.jl:257

  • The 2D partial fallback drops all valid supplied values (m, n, and any available spacing or boundary data), leaving only dim and topology. Preserve and validate the fields that are present so the returned object can actually be completed incrementally.
    return Grid{Float64}(dim = 2, topology = topology)

julia/MOLE.jl/src/Grids/validate_grid.jl:314

  • The 3D partial fallback discards m, n, o, and any supplied spacing or boundary values. A partial grid should retain and validate its present fields rather than returning an empty shell, otherwise subsequent makeGrid(grid) calls cannot recover the user's definition.
    return Grid{Float64}(dim = 3, topology = topology)

julia/MOLE.jl/src/Grids/validate_grid.jl:209

  • If either m or n is absent, this partial-grid branch calls the parametric Grid{T} constructor without a type-bearing value from which T can be inferred. Thus validateGrid(Dict(:dim=>2, :topology=>:curvilinear); allowPartial=true) throws instead of returning a partial grid. Specify an element type here (consistent with the other partial branches), while separately retaining any supplied fields.
        return Grid(dim = 2, topology = :curvilinear)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown

This pull request has had no activity for 14 days. It will be marked stale in 14 days if there is no further activity.

@valeriabarra

Copy link
Copy Markdown
Collaborator Author

I am working to address the review. However, other work has taken precedence (see PR #460 )

@valeriabarra
valeriabarra force-pushed the valeria/mole-jl-grids-module branch from 4a84910 to ef9dda2 Compare September 16, 2026 17:32
@joehellmers

Copy link
Copy Markdown
Collaborator

@valeriabarra I'd like to add some tests for MOLE.jl. Should I add to this branch directly or via a fork?

@valeriabarra

Copy link
Copy Markdown
Collaborator Author

@valeriabarra I'd like to add some tests for MOLE.jl. Should I add to this branch directly or via a fork?

Hi @joehellmers thank you for considering contributing. Please use a separate fork and describe your intended contribution idea in an Issue first. Thank you!

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

This pull request has had no activity for 14 days. It will be marked stale in 14 days if there is no further activity.

@valeriabarra

Copy link
Copy Markdown
Collaborator Author

Hi, I'm planning to work on this next week!

@valeriabarra
valeriabarra force-pushed the valeria/mole-jl-grids-module branch from 87faff4 to 23de907 Compare October 12, 2026 22:15
@valeriabarra

Copy link
Copy Markdown
Collaborator Author

Hi @joehellmers , this PR is ready to be merged and has been reviewed by me.

We need at least one approval from a reviewer to be able to merge the PR. Please approve or provide additional feedback if you wish. Thank you!

@valeriabarra

Copy link
Copy Markdown
Collaborator Author

Hi @joehellmers and @Tony-Drummond , This PR is ready. Please approve or provide additional feedback if you wish. We need at least one approving review to be able to merge and I can't be it. Please approve/review as soon as possible as we need to merge this ASAP. Thank you!

@Tony-Drummond

Copy link
Copy Markdown
Collaborator

Hi @valeriabarra, I can start looking at this next week after Tuesday. I can't work on it now.

@valeriabarra

Copy link
Copy Markdown
Collaborator Author

Hi @valeriabarra, I can start looking at this next week after Tuesday. I can't work on it now.

Thank you @Tony-Drummond , are you able to review and approve? Thanks

@Tony-Drummond
Tony-Drummond merged commit e7e809a into main Oct 26, 2026
31 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request MOLE.jl MOLE-2.0 Ideas and issues relating to the MOLE 2.0 development branch and or update.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MOLE.jl: Add new Grids module

5 participants