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

Feature/bsk 200 python modules #239

Merged
merged 6 commits into from
Mar 29, 2023

Conversation

juan-g-bonilla
Copy link
Contributor

Description

A SWIG file was created for sys_model.i so that the type is available for subclassing on the Python layer. The "director" feature was used so that polymorphism is two-directional: not only can Python objects call C++ methods, but C++ calls can be redirected to Python implementations. This means that one simply needs to overload the ´Reset´ and ´UpdateState´ methods in the Python layer and C++ will call the overloaded methods.

Verification

An automatic test was added, which checks that the ´Reset´ and ´UpdateState´ Python methods are called, that they are called in the appropriate order (respecting priority), and that messages can be linked as expected.

Documentation

scenarioAttitudePointingPy was updated to reflect the new Python module architecture. /Learn/makingModules/pyModules.rst was also updated to remove a warning that no longer applies with the new system.

Future work

  • Python versions of DynamicEffector and StateEffector.
  • Using the new Python modules to allow variable logging in a similar style to message recorders (prototype works).

@juan-g-bonilla
Copy link
Contributor Author

Tagging @joaogvcarneiro and @schaubh for review

@patkenneally patkenneally self-requested a review March 10, 2023 05:30
@joaogvcarneiro joaogvcarneiro self-requested a review March 10, 2023 19:16
@juan-g-bonilla juan-g-bonilla force-pushed the feature/bsk-200-python-modules branch from cdddc09 to 633c1ef Compare March 10, 2023 19:43
@schaubh schaubh self-requested a review March 11, 2023 22:01
@schaubh schaubh added the enhancement New feature or request label Mar 11, 2023
@juan-g-bonilla juan-g-bonilla force-pushed the feature/bsk-200-python-modules branch from 15ad398 to 3ceca94 Compare March 14, 2023 19:52
Copy link
Contributor

@schaubh schaubh left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together. I'm good with this branch and the associated documentation.

@schaubh schaubh force-pushed the feature/bsk-200-python-modules branch from 3ceca94 to 9b6bd75 Compare March 23, 2023 23:14
Copy link
Contributor

@patkenneally patkenneally left a comment

Choose a reason for hiding this comment

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

Legend:
🔻 Issues to address before merge
🔶 Requests that should not block merge, but should at least be discussed
🔵 Recommendations that can be ignored if desired

src/architecture/_GeneralModuleFiles/sys_model.i Outdated Show resolved Hide resolved
src/architecture/system_model/_UnitTest/test_PySysModel.py Outdated Show resolved Hide resolved
src/utilities/SimulationBaseClass.py Outdated Show resolved Hide resolved
src/utilities/SimulationBaseClass.py Outdated Show resolved Hide resolved
@juan-g-bonilla juan-g-bonilla force-pushed the feature/bsk-200-python-modules branch 2 times, most recently from ad4aec8 to bd1373d Compare March 24, 2023 20:13
@juan-g-bonilla juan-g-bonilla requested review from patkenneally and removed request for joaogvcarneiro March 24, 2023 20:13
@juan-g-bonilla juan-g-bonilla force-pushed the feature/bsk-200-python-modules branch 2 times, most recently from d43f744 to 3f0c000 Compare March 26, 2023 04:28
@juan-g-bonilla juan-g-bonilla force-pushed the feature/bsk-200-python-modules branch from 3f0c000 to 56fa9df Compare March 26, 2023 04:29
@schaubh schaubh merged commit dcaf7a0 into AVSLab:develop Mar 29, 2023
@juan-g-bonilla juan-g-bonilla deleted the feature/bsk-200-python-modules branch April 2, 2023 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
3 participants