Skip to content
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

Update tutorials and improve tutorial testing framework #3408

Merged
merged 18 commits into from
Jan 22, 2020

Conversation

jngrad
Copy link
Member

@jngrad jngrad commented Jan 8, 2020

Description of changes:

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

You'll be able to see Jupyter notebook diff and discuss changes. Powered by ReviewNB.

@jngrad
Copy link
Member Author

jngrad commented Jan 8, 2020

Further considerations:

  • the theoretical RDF discussion in tutorial 01 may break the flow of the lecture and could be moved to the bottom of the notebook if necessary
  • the new html_runner test fixture takes 7 seconds to run, which is noticeable when running a specific tutorial test with make -j$(nproc) check_tutorials ARGS='-R tutorial_01' for troubleshooting purposes
  • new AST processing logic
    • enables a much more reliable handling of IPython magic commands that prevent the matplotlib command plt.show() from generating a picture in some tutorials (e.g. 04 Part 2)
    • requires a lot of calls to hasattr (e.g. importlib_wrapper.py#L388-L395), which could make importlib_wrapper.py fragile; please let me know if you're aware of a better strategy
    • doesn't use ast.NodeTransformer as we need to write the transformed code to disk to get clean tracebacks and create intermediate files for CMake dependency resolution

@codecov
Copy link

codecov bot commented Jan 8, 2020

Codecov Report

Merging #3408 into python will increase coverage by <1%.
The diff coverage is 95%.

Impacted file tree graph

@@           Coverage Diff           @@
##           python   #3408    +/-   ##
=======================================
+ Coverage      86%     86%   +<1%     
=======================================
  Files         538     534     -4     
  Lines       25306   25099   -207     
=======================================
- Hits        21829   21701   -128     
+ Misses       3477    3398    -79
Impacted Files Coverage Δ
src/utils/tests/matrix_vector_product.cpp 100% <ø> (ø) ⬆️
src/core/communication.hpp 100% <ø> (ø) ⬆️
src/core/forces_inline.hpp 85% <ø> (ø) ⬆️
src/core/cells.hpp 100% <ø> (ø) ⬆️
src/core/ghosts.hpp 100% <ø> (ø) ⬆️
...bonded_interactions/nonbonded_interaction_data.cpp 100% <ø> (ø) ⬆️
src/core/shapes/Cylinder.hpp 86% <ø> (ø) ⬆️
src/core/shapes/SimplePore.hpp 86% <ø> (ø) ⬆️
src/core/electrostatics_magnetostatics/elc.cpp 98% <ø> (ø) ⬆️
src/core/ghosts.cpp 100% <ø> (ø) ⬆️
... and 91 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1a4798...f16a590. Read the comment docs.

Fixes a regression introduced by 1cc931f
Allows users to run the script with option `--help` and get the
documentation even if the script dependencies are not installed
or if CMake variables were not substituted.
@KaiSzuttor KaiSzuttor added the automerge Merge with kodiak label Jan 22, 2020
@kodiakhq kodiakhq bot merged commit 5705c67 into espressomd:python Jan 22, 2020
@jngrad jngrad added this to the Espresso 4.2 milestone Jan 22, 2020
@jngrad jngrad deleted the fix-3058 branch January 18, 2022 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants