-
Notifications
You must be signed in to change notification settings - Fork 189
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
Support modern compilers, Python, Jupyter and NumPy releases #5034
base: python
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Use standard CMake targets to configure tutorials. Mark figure files as dependencies of the Jupyter notebooks that actually use them. Make python and html targets depend on the original tutorial file in the source directory. Convert solution cells to hidden solutions.
Replace Utils functionality by equivalent C++20 features. Remove unused or duplicated code. Improve code coverage.
f *= np.sign(r - offset) | ||
b1 * e1 * np.power(sigma / np.sqrt(h), e1) - | ||
b2 * e2 * np.power(sigma / np.sqrt(h), e2)) / h | ||
f *= np.sign(r - offset) if generic and not has_ljgen_softcore else 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the benefit in using a ternary operator here? If this line wasn't reached in coverage before, I'm not in favor of "green washing" this line with this.
if p.id == 1: | ||
# Parse the bond | ||
self.assertEqual(len(p.bonds), 2) | ||
# Bond type | ||
self.assertEqual(p.bonds[0][0], self.bond_pair) | ||
self.assertEqual(p.bonds[1][0], self.bond_vs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my understanding, it means that this branch was never reached in CI?
python3 -m pip install --user -c requirements.txt \ | ||
nbformat nbconvert jupyterlab | ||
python3 -m pip install -c requirements.txt \ | ||
jupyterlab>=4.3 nbformat nbconvert lxml[html_clean] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this lxml
-package do?
@@ -44,24 +45,18 @@ auto mask_impl(Integral mask, T t, std::index_sequence<I...>) { | |||
* instance of the type). | |||
* | |||
* Example: | |||
* mask(0b1011, {1, 2, 3, 4}) => {1, 0, 3, 4} | |||
* <tt>mask(0b1011u, {1, 2, 3, 4}) => {1, 2, 0, 4}</tt> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? If this is true, I don't understand the masking.
@@ -5,7 +5,8 @@ How to get started with Sphinx | |||
|
|||
.. code-block:: bash | |||
|
|||
pip3 install --user --upgrade 'sphinx>=2.3.0,!=3.0.0' 'sphinxcontrib-bibtex>=0.3.5' | |||
python3 -m pip install -c requirements.txt \ | |||
sphinx sphinx-toggleprompt sphinxcontrib-bibtex numpydoc pybtex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we need pybtex
for?
std::transform(node_ids[this_node].cbegin(), node_ids[this_node].cend(), | ||
parts.begin(), [](int p_id) { | ||
auto const p = get_cell_structure().get_local_particle(p_id); | ||
assert(p != nullptr); | ||
return *p; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that we don't have particles of the head node in the cache after the call to prefetch_particle_data
?
Description of changes: