addpath(genpath) for future ops in subdirs#413
Open
jbrzensk wants to merge 2 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates MATLAB/Octave tests and example scripts to add the src/matlab_octave directory recursively to the MATLAB path (via addpath(genpath(...))), so future library subfolders are picked up automatically.
Changes:
- Switched many scripts/tests from
addpath('../../src/matlab_octave')toaddpath(genpath('../../src/matlab_octave')). - Applied the same recursive-path approach consistently across MATLAB/Octave unit tests and examples.
Reviewed changes
Copilot reviewed 76 out of 76 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/matlab_octave/testLapPolynomial.m | Use recursive path add to include src/matlab_octave subfolders during tests. |
| tests/matlab_octave/testLaplacian.m | Use recursive path add to include src/matlab_octave subfolders during tests. |
| tests/matlab_octave/testGradPolynomial.m | Use recursive path add to include src/matlab_octave subfolders during tests. |
| tests/matlab_octave/testGradient.m | Use recursive path add to include src/matlab_octave subfolders during tests. |
| tests/matlab_octave/testEnergy.m | Use recursive path add to include src/matlab_octave subfolders during tests. |
| tests/matlab_octave/testDivPolynomial.m | Use recursive path add to include src/matlab_octave subfolders during tests. |
| tests/matlab_octave/testDivergence.m | Use recursive path add to include src/matlab_octave subfolders during tests. |
| tests/matlab_octave/testBCConsistency.m | Use recursive path add to include src/matlab_octave subfolders during tests. |
| tests/matlab_octave/testAddScalarBC.m | Use recursive path add to include src/matlab_octave subfolders during tests. |
| examples/matlab_octave/wave2D.m | Use recursive path add so examples can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/wave2D_case2.m | Use recursive path add so examples can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/wave1DTimeVaryingBC.m | Use recursive path add so examples can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/wave1D.m | Use recursive path add so examples can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/wave1D_convergence/wave1D_convergence.m | Use recursive path add so convergence example can find nested src/matlab_octave functions. |
| examples/matlab_octave/wave1D_case2.m | Use recursive path add so examples can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/van_der_pol.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/tutorials/two_way_wave_equation/comparison_two_way_wave_md_vs_fd.m | Use recursive path add so tutorial can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/test_nodal2DCurv.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/test_lap3DCurv.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/test_lap3DCurv_case2.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/test_grad3DCurv.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/test_grad2DCurv.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/test_div3DCurv.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/test_div2DCurv.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/test_curl.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/terzaghi1D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/sturmLiouvilleLegendre.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/sturmLiouvilleLaguerre.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/sturmLiouvilleHermite.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/sturmLiouvilleHelmholtzDirichletRobin.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/sturmLiouvilleHelmholtzDirichletDirichlet.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/sturmLiouvilleChebyshev.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/sturmLiouvilleBessel.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/schrodinger2D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/richards.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/poisson2D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/parabolic2D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/parabolic1D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/maxwell1D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/lock_exchange.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/KG_product.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/integration1D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/hyperbolic1D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/hyperbolic1D_upwind.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/hyperbolic1D_lax_friedrichs.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/helmholtz2D_wifi.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic3DXNeumannYPeriodicZPeriodic.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic3DXDirichletYPerZPer.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic3DXDirichletYPerZNeumann.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic3DXDirichletYPeriodicZPeriodic.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic3DXDirichletYDirichletZDirichlet.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic3DaddScalarBC3D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic3D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic2DXPerYDirichlet.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic2DXPeriodicYPeriodic.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic2DXDirichletYDirichlet.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic2DPeriodic.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic2D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic2D_nodal_curv.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic2D_nodal_curv_sinusoidal.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic2D_case2.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic1DPeriodicBC.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic1DNonPeriodicBC.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic1DNonHomogeneousDirichlet.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic1DLeftRobinRightRobin.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic1DLeftNeumannRightRobin.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic1DLeftNeumannRightNeumann.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic1DLeftNeumannRightDirichlet.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic1DLeftDirichletRightRobin.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic1DHomogeneousDirichlet.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic1DaddScalarBC.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/elliptic1D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/cylinder_flow_2D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/convection_diffusion3D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/Compact_operators/compact.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
| examples/matlab_octave/burgers1D.m | Use recursive path add so example can find functions in nested src/matlab_octave folders. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| methods (Test) | ||
| function testDivOfPolynomial1D(testCase) | ||
| addpath('../../src/matlab_octave') | ||
| addpath(genpath('../../src/matlab_octave')) |
Collaborator
Author
There was a problem hiding this comment.
Is this Octave safe?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
Adds a recursive path to the MATLAB examples. This future-izes the MATLAB_Octave examples, by taking subfolders from the src library.
Related Issues & Documents