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

Expose task commands #384

Merged
merged 14 commits into from
May 16, 2024
Merged

Expose task commands #384

merged 14 commits into from
May 16, 2024

Conversation

FedericoNegri
Copy link
Contributor

@FedericoNegri FedericoNegri commented Apr 23, 2024

Exposing commands as available in the JMS API:

  • adding task command definition and task commands schemas + resources
  • exposing corresponding api endpoints in the ProjectApi class:
    • get_task_command_definitions, get_task_commands and create_task_commands are the usual minimal wrapper around the REST endpoints
    • queue_task_command is a helper function to easily send a command to a task (it mimics what a user does in the web ui), for example:
      command = project_api.queue_task_command(task.id, "my_command", arg1=6.5, arg2="test")
  • changes in the src/ansys/hps/client/jms/resource folder are due to a different header used to auto-generate JMS resources
  • will follow up with some doc (user guide and/or an example)

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 98.88889% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 93.91%. Comparing base (a6cabb0) to head (5fbced1).

Files Patch % Lines
src/ansys/hps/client/jms/api/project_api.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #384      +/-   ##
==========================================
+ Coverage   93.72%   93.91%   +0.18%     
==========================================
  Files          62       66       +4     
  Lines        2408     2498      +90     
==========================================
+ Hits         2257     2346      +89     
- Misses        151      152       +1     

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

@davel94 davel94 changed the title [WIP] Expose task commands Exec script task commands example Apr 30, 2024
@davel94 davel94 changed the title Exec script task commands example [WIP] Expose task commands Apr 30, 2024
@FedericoNegri FedericoNegri changed the title [WIP] Expose task commands Expose task commands May 16, 2024
@FedericoNegri FedericoNegri added the enhancement New features or code improvements label May 16, 2024
@FedericoNegri FedericoNegri marked this pull request as ready for review May 16, 2024 06:42
@FedericoNegri FedericoNegri merged commit ed9b55a into main May 16, 2024
21 checks passed
@FedericoNegri FedericoNegri deleted the fnegri/commands branch May 16, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants