-
Notifications
You must be signed in to change notification settings - Fork 455
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 the tests to Python 3 #19
Comments
I looked at this very briefly the other day when testing the CMake support in VS2017. I thought it may be trivial in terms of just fixing simple things like changing print statements into print functions etc. to make then compatible with both python 2 and 3. But it looks like we'll need to look into the differences between bytes and strings between python 2 and 3, in particular with SGPath. `ERROR: testAircrafts (main.CheckAircrafts)Traceback (most recent call last): |
FYI The folder contains a couple of preliminary tests made via Jupyter notebooks (formerly IPython) running a Python 3 kernel. There are some helper classes defined in the subfolder I run my simulations in Windows and I've put a recent build of |
So you didn't have any issues then with using Python 3 to call into the JSBSim code? Actually taking a quick glance at some of your Python code it looks like you're using os.system('JSBSim.exe --script...') to execute instances of JSBSim then and you're not using the Python API wrapper to call the JSBSim classes directly from Python? |
In fact, that was my approach. But I would love to adapt that work in order to use a Python 3 API wrapper. We might use it to make reports on engineering flight simulations via Jupyter. |
FYI |
@agodemar perfect, I was actually starting to write something very similar. My aim is to given an FDM generate a set of plots for a visual/graph representation, e.g. Cl vs AoA, Cd vs AoA, Cl vs Cd, plus graph the individual items that make up for example Cd, so Cd0, Cdi etc. Did you notice the funny kink in the ground effect curve of your C172 versus the one retrieved from GitHub? I checked in a fix for the kink a while ago. |
@seanmcleod Jupyter notebooks can help a lot in creating reports on FDM config files as well on results. The classes that I've put here have been designed with that in mind. They need to be enhanced with the task you were mentioning:
Yes, I did notice the kink and I knew you submitted a smother version of that curve. |
@agodemar yep I've used Jupyter notebooks on other non-JSBSim related projects. In terms of plotting data from the FDM I was thinking of using the JSBSim python API in order to be able to evaluate functions that are defined rather than parsing the xml looking for table data etc. So for example if Cdi is defined as a function using Cl^2 etc. the graphing code would evaluate it as well as handling functions with table data. The Cdi based on Cl^2 is actually more complicated since the code would need to first lookup the Cl values from the Cl vs AoA function and then use those when evaluating the Cdi function etc. |
FYI @ezietsman made the pull request #23 to update the tests to Python 3.6 and keep them compatible with Python 2.7. The PR is currently needing some changes before being merged but this is just a matter of a couple of details. I am confident they should be resolved quickly. |
@agodemar and @seanmcleod The PR #23 has been merged. I think we can close this issue. |
No description provided.
The text was updated successfully, but these errors were encountered: