Skip to content

Rework some tests for shorter CI runs#575

Open
campospinto wants to merge 28 commits intodevelfrom
shorter_CI
Open

Rework some tests for shorter CI runs#575
campospinto wants to merge 28 commits intodevelfrom
shorter_CI

Conversation

@campospinto
Copy link
Collaborator

@campospinto campospinto commented Feb 13, 2026

In this PR we speed-up some tests by using coarser grids and fewer patches in multi-patch domains.

The error asserts in feec/tests/test_global_projectors.py are also improved by using the expected convergence orders.

We also add some folders in .gitignore:

  • prof folders generated by profiling tools
  • __*pyccel__*/ generated by pyccel

(Since these changes are really minor I don't think they deserve to be mentioned in the changelog)

@campospinto campospinto added performance Make the code run faster testing Unit tests, coverage, benchmarks labels Feb 13, 2026
@campospinto campospinto marked this pull request as draft February 13, 2026 14:30
@campospinto campospinto marked this pull request as ready for review February 13, 2026 14:30
@codacy-production
Copy link

codacy-production bot commented Feb 13, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.01% 50.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (16fb9d3) 31788 19587 61.62%
Head commit (7bc8654) 63566 (+31778) 39160 (+19573) 61.61% (-0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#575) 2 1 50.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@yguclu yguclu changed the title rework some tests for shorter CI tests Rework some tests for shorter CI runs Feb 13, 2026
@campospinto campospinto marked this pull request as draft February 18, 2026 11:45
@campospinto campospinto marked this pull request as ready for review February 18, 2026 11:45
Copy link
Member

@yguclu yguclu left a comment

Choose a reason for hiding this comment

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

Thanks for this PR! It can probably be merged very soon

def test_maxwell_2d_2_patch_dirichlet_1():

domain = build_pretzel()
# domain = build_pretzel() # a lot of patches, takes a long time
Copy link
Member

Choose a reason for hiding this comment

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

Do we have other unit tests which actually use the pretzel-like domain?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good question! there are actually two tests left that use this domain:

  • "test_poisson_2d_2_patches_dirichlet_3"
  • "test_maxwell_2d_2_patch_dirichlet_1"

given the names of these tests, this does not make much sense. I'll fix this.

Also, I see that some tests use a domain written in 'multipatch/square.h5' but it's not clear where (and how) this domain is created. The search for 'multipatch/square.h5' or 'square.h5' or even 'multipatch/square' only return places where this domain (file) is read

@campospinto campospinto marked this pull request as draft February 26, 2026 15:02
@campospinto campospinto marked this pull request as ready for review February 26, 2026 15:02
Copy link
Member

@yguclu yguclu left a comment

Choose a reason for hiding this comment

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

Thanks for this PR, @campospinto!

I have a few minor comments

Comment on lines +317 to +346
#==============================================================================
if __name__ == '__main__':

domain = (0, 2*np.pi)
degree = 3
degrees = [[2,2,2], [2,3,2], [3,3,3]] #3
periodic = True
ncells = [10, 20, 40, 80, 160, 320, 640]
mult = [[1,1,1], [1,2,2], [2,2,2]]

for nc in ncells:
test_derham_projector_2d_hdiv([nc, nc], [degree, degree], [periodic, periodic], [2, 2])
# for nc in ncells:
# test_derham_projector_2d_hdiv([nc, nc], [degree, degree], [periodic, periodic], [2, 2])

for nc in ncells:
test_H1_projector_1d(domain, nc, degree, periodic, multiplicity = 2)
# for nc in ncells:
# test_H1_projector_1d(domain, nc, degree, periodic, multiplicity = 2)

nquads = degree
for nc in ncells:
test_L2_projector_1d(domain, nc, degree, periodic, nquads)
# nquads = degree
# for nc in ncells:
# test_L2_projector_1d(domain, nc, degree, periodic, nquads)

for nc in ncells:
test_derham_projector_2d_hdiv_2([nc, nc], [degree, degree], [periodic, periodic])
test_derham_projector_2d_hdiv([nc, nc], [degree, degree], [periodic, periodic], 2)
# for nc in ncells:
# test_derham_projector_2d_hdiv_2([nc, nc], [degree, degree], [periodic, periodic])
# test_derham_projector_2d_hdiv([nc, nc], [degree, degree], [periodic, periodic], 2)

for nc in ncells :
test_derham_projector_2d_hcurl([nc, nc], [degree, degree], [periodic, periodic])
# for nc in ncells :
# test_derham_projector_2d_hcurl([nc, nc], [degree, degree], [periodic, periodic])

for nc in ncells[:3] :
test_derham_projector_3d([nc, nc, nc], [degree, degree, degree], [periodic, periodic, periodic])
for nc in ncells[:3]:
for deg in degrees:
for m in mult:
test_derham_projector_3d([nc, nc, nc], deg, [periodic, periodic, periodic], multiplicity=m)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we could write three separate functions in 1/2/3 dimensions and use them for this "manual" convergence verification?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a few functions and improved the error tests using the expected convergence orders

@yguclu yguclu marked this pull request as draft March 3, 2026 07:09
@yguclu yguclu marked this pull request as ready for review March 3, 2026 07:09
@yguclu yguclu marked this pull request as draft March 3, 2026 08:54
@yguclu yguclu marked this pull request as ready for review March 3, 2026 08:54
campospinto and others added 5 commits March 3, 2026 10:29
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
@yguclu yguclu marked this pull request as draft March 9, 2026 15:02
@yguclu yguclu marked this pull request as ready for review March 9, 2026 15:02
@yguclu yguclu marked this pull request as draft March 9, 2026 22:10
@yguclu yguclu marked this pull request as ready for review March 9, 2026 22:10
@yguclu yguclu marked this pull request as draft March 9, 2026 22:31
@yguclu yguclu marked this pull request as ready for review March 9, 2026 22:31
@yguclu yguclu marked this pull request as draft March 10, 2026 07:55
@yguclu yguclu marked this pull request as ready for review March 10, 2026 07:55
@campospinto
Copy link
Collaborator Author

I think all the requests have been addressed. I'm switching on the tests again.

@campospinto campospinto marked this pull request as draft March 13, 2026 14:41
@campospinto campospinto marked this pull request as ready for review March 13, 2026 14:41
@campospinto campospinto marked this pull request as draft March 13, 2026 16:09
@campospinto campospinto marked this pull request as ready for review March 13, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Make the code run faster testing Unit tests, coverage, benchmarks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants