-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CircleCI pipeline optimisations #138
Conversation
Simplifying CI
Latest updates
Adding Cubit to Dockerfile and making moab and jupyter_cadquery optional
making use of cad_to_h5m
using new char for sed cmd
modularisation of h5m functionality
Update setup.py
improved reactor attributes
adding reactor attributes
refactor and removal of redundant neutronics/h5m related code
merged breps, improved stl export, default parameters for reactors
Adding system code model of FLF reactor and typos fixing
add another test suite add parametric rectors tests try test splitting add store tests results parallelism for parametric components tests
Here's some docs on test splitting and parallelisation: https://circleci.com/docs/2.0/parallelism-faster-jobs/ |
I also played around with the branch that was timing out often because of the 1hr job duration limit: https://app.circleci.com/pipelines/github/zmarkan/paramak?branch=negative_triangularity_MC With the new test splitting in place it shouldn't break, but if you can refactor the tests into multiple files (where it makes sense of course) it could go much faster still. The longest running test is by far in |
@RemDelaporteMathurin I think you might like this PR, I meet with CircleCI pro @zmarkan and he has some nice tricks for splitting up the tests which should speed it up considerably. The magic lines include TEST_FILES=$(circleci tests glob "tests/test_parametric_components/**/*.py" | circleci tests split)
pytest -v --cov=paramak --cov-append --cov-report term --cov-report xml --junitxml=test-reports/junit.xml $TEST_FILES |
Previously all tests ran in serial and took between 16m and 1 hour to run and would sometimes time out Now the tests finish in 3 mins as they run in parallel Here is a break down of the timings parametric-components-tests times were 2:30 and 2.08 mins |
Codecov Report
@@ Coverage Diff @@
## main #138 +/- ##
=======================================
Coverage 97.56% 97.56%
=======================================
Files 76 76
Lines 4717 4717
=======================================
Hits 4602 4602
Misses 115 115 Continue to review full report at Codecov.
|
This is super stuff, @zmarkan We have been trying to add everyone who helps to the CITATIONS.md file, would you be happy if we add you there? |
@mateczentye looks like your new reactor is the most complex one so far :-) |
@shimwell thank you! I'm glad it's useful - yes please I'd be happy to be added to CITATIONS.md! |
Proposed changes
Optimisations to the CircleCI pipeline:
test_parametric_components
(2x) andtest_parametric_reactors
(4x)test_parametric_reactors
to utilise 4x virtual CPUs instead of 2Types of changes
What types of changes does your code introduce to the Paramak?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.