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

feat(python): create require approval decorator #25

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

edwinkys
Copy link
Contributor

Description

Fixes #12

This adds a require_approval() decorator to Phantasm. Instead of having 2 decorators as written in the issue, we only add a decorator with an optional argument with_parameters which defaults to true. Users can disable this to ignore approver-modified parameters when calling the function.

How Has This Been Tested?

  • New and existing unit tests pass locally with my changes.
  • I have added tests that prove my changes are working as expected.

I have tested this manually by:

  1. Running the server and the dashboard.
  2. Connecting the dashboard to the coordinator server.
  3. Running the updated test_get_approval script in the Python client.

Checklist

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.

@edwinkys edwinkys added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 23, 2024
@edwinkys edwinkys self-assigned this Nov 23, 2024
@edwinkys edwinkys linked an issue Nov 23, 2024 that may be closed by this pull request
@edwinkys edwinkys merged commit 8c93c2e into main Nov 25, 2024
@edwinkys edwinkys deleted the 12-create-python-decorator branch November 25, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] create python decorator for get approval
1 participant