-
Notifications
You must be signed in to change notification settings - Fork 0
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
Failing to create variables in euler1d.py #1
base: master
Are you sure you want to change the base?
Conversation
Please paste the complete traceback with the error |
I ran the python files in VSCODE and got the traceback below.
|
What is the command you run? If you |
Sorry, I think I ran the |
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.
Where is your pybind11 wrapper?
@@ -0,0 +1,3 @@ | |||
import modmesh.view as mv |
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.
It is not necessary to use a file to run code like this. A one-liner python3 -c 'import modmesh.view as v ; v.launch()'
would do it.
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.
But I'm not sure which file is appropriate to add this code. Is there anything wrong to add the startup.py
in modmesh?
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.
You do not need to add the code in a file. That is a one-liner you type in command line.
It is at /Users/genelin/devenv/flavors/new/usr/lib/python3.11/site-packages/pybind11 |
That is where you install (*this)
.def_property_readonly(
"coord",
[](wrapped_type & self)
{ return to_ndarray(self.coord()); })
.def_property_readonly(
"cfl",
[](wrapped_type & self)
{ return to_ndarray(self.cfl()); })
.def_property_readonly(
"so0",
[](wrapped_type & self)
{ return to_ndarray(self.so0()); })
.def_property_readonly(
"so1",
[](wrapped_type & self)
{ return to_ndarray(self.so1()); }); |
The wrap |
Please provide a link to a file in your repository, not to your local path. |
You can also add in-line annotation in this PR. |
The link to the |
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.
@Gene0315 your comment in #1 (comment) was not clear enough. Please see how the inline annotation in this review comment makes discussions more accurate.
Please try to resolve the testing failures shown in CI (e.g., https://github.com/Gene0315/modmesh/actions/runs/9817249358/job/27108402762?pr=1).
@@ -109,6 +109,10 @@ class MODMESH_PYTHON_WRAPPER_VISIBILITY WrapEuler1DCore | |||
{ return to_ndarray(self.gamma()); }); | |||
|
|||
(*this) | |||
.def_property_readonly( |
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.
An inline annotation can be added like this.
@yungyuc sorry, I don't know what is resolving the testing failure mentioned above. Does it mean that I have to execute the code by terminal with command
or how can I do it? |
In that link, you can see Github Actions encountered a testing failure:
|
Following the issue solvcon#361
The PR sets the plotting points as an array 'pt_plot'. And then, it changes the points shown on the figure from coord[::2] to coord[self.st.svr.pt_plot].
However, there is something wrong in this code. It failed to create the variable 'svr.pt_plot' in 'modmesh/modmesh/onedim/euler1d.py'.