-
Notifications
You must be signed in to change notification settings - Fork 188
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
Tutorials maintenance #3993
Merged
Merged
Tutorials maintenance #3993
Conversation
This file contains 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
Move parser to the end of the script and wrap the main logic into __main__, so that the script can be imported as a module. The subprocess module is then no longer needed in the testsuite.
Use the html_runner.py to convert exercise2 cells from Markdown to Python and back, while preserving metadata. This is helpful when editing notebooks, to avoid having to manually copy-paste the solutions to the empty code cells (to be able to run the notebook) and then clear these cells.
The python `assert` keyword does not behave like a function. Adding round brackets can lead to subtle bugs: `assert(a == b, "message")` actually evaluates a tuple and prints "SyntaxWarning: assertion is always true, perhaps remove parentheses?" without halting the flow of the program. Warnings cannot be caught by a try/except, instead one has to rely on the warnings module to convert them to exceptions.
Remove the numbered prefix from all tutorials. Rename html_runner.py to convert.py to better reflect its new design.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
RudolfWeeber
approved these changes
Nov 16, 2020
I assume, you ran the html build job locally for this. If not, please do before merging. |
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.
Description of changes:
espressomd.analyze.autocorrelation()
to calculate the ACF of 1-dimensional and 2-dimensional data