Skip to content

Improvements to the Python module#1275

Merged
agodemar merged 3 commits intoJSBSim-Team:masterfrom
bcoconni:python_improvements
May 8, 2025
Merged

Improvements to the Python module#1275
agodemar merged 3 commits intoJSBSim-Team:masterfrom
bcoconni:python_improvements

Conversation

@bcoconni
Copy link
Member

@bcoconni bcoconni commented May 7, 2025

A number of improvements to the Python module:

  • Add the methods get_attribute() and set_attribute() to the Python class FGPropertyNode to give access to the C++ methods SGPropertyNode::setAttribute() and SGPropertyNode::getAttribute(). These methods are useful to check the property access to a property: either R/W or read-only or write-only.
  • Add the method get_aircraft_name() to the Python class FGAircraft which allows to get the full aircraft name (the one specified in the XML element <fdm_config name="..."/>).
  • Add an equality operator between instances of FGPropertyNode. Currently the only way to check equality between two property nodes instances is to compare their fully qualified names (via FGPropertyNode.get_fully_qualified_name() which neither fast nor convenient). This is allowing to check if a node is contained in a list of nodes and that kind of things.

@codecov
Copy link

codecov bot commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.76%. Comparing base (a222488) to head (423f510).
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1275      +/-   ##
==========================================
- Coverage   24.77%   24.76%   -0.01%     
==========================================
  Files         169      169              
  Lines       19598    19598              
==========================================
- Hits         4855     4854       -1     
- Misses      14743    14744       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@agodemar agodemar merged commit 9f9a0e6 into JSBSim-Team:master May 8, 2025
29 checks passed
@bcoconni bcoconni deleted the python_improvements branch May 8, 2025 15:47
bcoconni added a commit to bcoconni/jsbsim that referenced this pull request Jun 7, 2025
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.

2 participants