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

Fix PiecewisePolytropicFluid Python test, add some bindings #4682

Merged
merged 2 commits into from
Feb 6, 2023

Conversation

nilsvu
Copy link
Member

@nilsvu nilsvu commented Feb 2, 2023

Proposed changes

Fixes #4523. I also added some bindings while I was touching the files.

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

@@ -1,19 +1,27 @@
# Distributed under the MIT License.
# See LICENSE.txt for details.

import spectre.PointwiseFunctions.Hydro.EquationsOfState as spectre_eos

import unittest
Copy link
Contributor

@pajkosmi pajkosmi Feb 2, 2023

Choose a reason for hiding this comment

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

@nilsvu are the imports required to be alphabetized in .py files, or is that just with #include in .cpp/.hpp files? If not, then everything looks good to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

We haven't established a rule for sorting imports yet. I started to use isort recently, which puts system modules before third-party modules, then alphabetizes.

pajkosmi
pajkosmi previously approved these changes Feb 2, 2023
Copy link
Contributor

@pajkosmi pajkosmi left a comment

Choose a reason for hiding this comment

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

The ctest summary does not produce the long piecewise polytrope name anymore and isort has certain ordering for .py imports, so I approve.

Comment on lines 7 to 8
#include "PointwiseFunctions/Hydro/EquationsOfState/Python/PiecewisePolytropicFluid.hpp"
#include "PointwiseFunctions/Hydro/EquationsOfState/Python/PolytropicFluid.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

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

[Commit message]
This isn't a PiecewisePolynomial it's a PiecewisePolytrope

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦‍♂️ fixed

@nilsvu nilsvu changed the title Fix PiecewisePolynomial Python test, add some bindings Fix PiecewisePolytropicFluid Python test, add some bindings Feb 2, 2023
Copy link
Member

@nilsdeppe nilsdeppe left a comment

Choose a reason for hiding this comment

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

Looks good, just @knelli2's comment about the commit message. Your first commit still says "PiecewisePolynomial"

@nilsdeppe nilsdeppe merged commit 158b9cd into sxs-collaboration:develop Feb 6, 2023
@nilsvu nilsvu deleted the fix_test_label branch February 16, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A test has label "unit.hydro.equationsofstate.python.piecewisepolytropicfluid"
4 participants