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

Enhance Python API to not expose bit masks #114

Closed
Stuckya opened this issue May 19, 2023 · 2 comments
Closed

Enhance Python API to not expose bit masks #114

Stuckya opened this issue May 19, 2023 · 2 comments

Comments

@Stuckya
Copy link
Contributor

Stuckya commented May 19, 2023

Describe the bug
The Python bindings no longer expose is_sc_active()
The sample code encourages users to call a missing method on line 105 of cp_app.py:

    if (count % 100) == 99 and cp.is_sc_active(PD_0):

Expected behavior
The ability to educate users of this library which python method to call for checking if a PD is active.

Observed behavior
Runtime error when attempting to run the sample.

Additional context
While trying to find alternatives, the following code was successful:

    if (count % 100) == 99 and bool(cp.sc_status() & 1 << PD_0):

Will open a PR to fix.

@sidcha
Copy link
Member

sidcha commented Jun 13, 2023

Will keep this issue open to track the change: enhance the API to abstract bitmask details.

@sidcha sidcha changed the title CP Python Sample Outdated Enhance Python API to not expose bit masks Jun 30, 2023
@sidcha
Copy link
Member

sidcha commented Oct 24, 2023

This will be handled in a different approach. The idea is to promote tests/pytest/testlib into a proper python module. Closing this for now.

@sidcha sidcha closed this as completed Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants