canvas 0.16.0__tar.gz → 0.17.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of canvas might be problematic. Click here for more details.
- canvas-0.17.0/.gitignore +15 -0
- {canvas-0.16.0 → canvas-0.17.0}/PKG-INFO +25 -31
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/plugin/plugin.py +1 -1
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/tests/protocol/tests.py +12 -2
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/tests/test_utils.py +4 -9
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/banner_alert/tests.py +5 -2
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/utils/http.py +1 -1
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/plugin_installer.py +21 -13
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/plugin_runner.py +67 -14
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/test_plugin_runner.py +37 -5
- canvas-0.17.0/protobufs/canvas_generated/messages/effects.proto +225 -0
- canvas-0.17.0/protobufs/canvas_generated/messages/events.proto +1049 -0
- canvas-0.17.0/protobufs/canvas_generated/messages/plugins.proto +9 -0
- canvas-0.17.0/protobufs/canvas_generated/services/plugin_runner.proto +12 -0
- {canvas-0.16.0 → canvas-0.17.0}/pyproject.toml +93 -80
- {canvas-0.16.0 → canvas-0.17.0}/settings.py +4 -1
- canvas-0.16.0/plugin_runner/plugin_synchronizer.py +0 -92
- {canvas-0.16.0 → canvas-0.17.0}/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/auth/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/auth/tests.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/auth/utils.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/emit.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/ALLERGY_INTOLERANCE_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/ALLERGY_INTOLERANCE_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/APPOINTMENT_CANCELED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/APPOINTMENT_CHECKED_IN.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/APPOINTMENT_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/APPOINTMENT_NO_SHOWED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/APPOINTMENT_RESCHEDULED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/APPOINTMENT_RESTORED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/APPOINTMENT_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/ASSESS_COMMAND__CONDITION_SELECTED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/ASSESS_COMMAND__POST_COMMIT.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/ASSESS_COMMAND__POST_ORIGINATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/ASSESS_COMMAND__POST_UPDATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/ASSESS_COMMAND__PRE_COMMIT.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/ASSESS_COMMAND__PRE_ORIGINATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/ASSESS_COMMAND__PRE_UPDATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/BILLING_LINE_ITEM_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/BILLING_LINE_ITEM_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/CONDITION_ASSESSED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/CONDITION_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/CONDITION_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/CRON.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/ENCOUNTER_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/ENCOUNTER_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/IMMUNIZATION_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/IMMUNIZATION_STATEMENT_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/IMMUNIZATION_STATEMENT_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/IMMUNIZATION_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/INTERVIEW_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/INTERVIEW_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/LAB_ORDER_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/LAB_ORDER_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/MEDICATION_LIST_ITEM_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/MEDICATION_LIST_ITEM_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/MEDICATION_STATEMENT_COMMAND__POST_COMMIT.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/MEDICATION_STATEMENT_COMMAND__POST_ORIGINATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/MEDICATION_STATEMENT_COMMAND__POST_UPDATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/MEDICATION_STATEMENT_COMMAND__PRE_COMMIT.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/MEDICATION_STATEMENT_COMMAND__PRE_ORIGINATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/MEDICATION_STATEMENT_COMMAND__PRE_UPDATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/MEDICATION_STATEMENT__MEDICATION__POST_SEARCH.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/PATIENT_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/PATIENT_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/PLAN_COMMAND__POST_ORIGINATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/PLAN_COMMAND__PRE_ORIGINATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/QUESTIONNAIRE_COMMAND__POST_COMMIT.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/QUESTIONNAIRE_COMMAND__POST_ORIGINATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/QUESTIONNAIRE_COMMAND__POST_UPDATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/QUESTIONNAIRE_COMMAND__PRE_COMMIT.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/QUESTIONNAIRE_COMMAND__PRE_ORIGINATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/QUESTIONNAIRE_COMMAND__PRE_UPDATE.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/QUESTIONNAIRE__QUESTIONNAIRE__POST_SEARCH.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/TASK_COMMENT_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/TASK_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/TASK_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/VITAL_SIGN_CREATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/emit/event_fixtures/VITAL_SIGN_UPDATED.ndjson +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/logs/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/logs/logs.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/plugin/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/plugin/tests.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/run_plugins/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/apps/run_plugins/run_plugins.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/conftest.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/main.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/templates/plugins/application/cookiecutter.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/templates/plugins/application/{{ cookiecutter.__project_slug }}/CANVAS_MANIFEST.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/templates/plugins/application/{{ cookiecutter.__project_slug }}/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/templates/plugins/application/{{ cookiecutter.__project_slug }}/applications/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/templates/plugins/application/{{ cookiecutter.__project_slug }}/applications/my_application.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/templates/plugins/application/{{ cookiecutter.__project_slug }}/assets/python-logo.png +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/templates/plugins/default/cookiecutter.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/CANVAS_MANIFEST.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/protocols/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/protocols/my_protocol.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/tests.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/context/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/context/context.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/context/tests.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/print/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/print/print.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/print/tests.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/urls/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/urls/tests.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/urls/urls.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/validators/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/validators/manifest_schema.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/validators/tests.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_cli/utils/validators/validators.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/messages/effects_pb2.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/messages/effects_pb2.pyi +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/messages/effects_pb2_grpc.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/messages/events_pb2.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/messages/events_pb2.pyi +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/messages/events_pb2_grpc.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/messages/plugins_pb2.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/messages/plugins_pb2.pyi +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/messages/plugins_pb2_grpc.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/services/plugin_runner_pb2.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/services/plugin_runner_pb2.pyi +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_generated/services/plugin_runner_pb2_grpc.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/allergy.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/assess.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/close_goal.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/diagnose.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/exam.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/family_history.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/goal.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/history_present_illness.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/instruct.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/lab_order.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/medical_history.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/medication_statement.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/past_surgical_history.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/perform.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/plan.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/prescribe.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/questionnaire.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/reason_for_visit.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/refill.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/remove_allergy.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/review_of_systems.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/stop_medication.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/structured_assessment.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/task.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/update_diagnosis.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/update_goal.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/commands/vitals.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/constants.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/tests/protocol/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/tests/schema/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/tests/schema/tests.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/tests/unit/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/commands/tests/unit/tests.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/banner_alert/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/banner_alert/add_banner_alert.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/banner_alert/remove_banner_alert.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/launch_modal.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/patient_chart_summary_configuration.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/patient_portal/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/patient_portal/intake_form_results.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/patient_profile_configuration.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/protocol_card/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/protocol_card/protocol_card.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/protocol_card/tests.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/questionnaire_result.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/show_button.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/surescripts/surescripts_messages.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/effects/task/task.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/events/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/events/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/handlers/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/handlers/action_button.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/handlers/application.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/handlers/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/handlers/cron_task.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/protocols/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/protocols/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/protocols/clinical_quality_measure.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/protocols/timeframe.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/templates/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/templates/tests/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/templates/tests/test_utils.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/templates/utils.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/tests/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/utils/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/utils/db.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/utils/stats.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/utils/tests.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/apps.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/allergy_intolerance.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/appointment.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/assessment.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/billing.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/care_team.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/command.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/common.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/condition.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/coverage.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/detected_issue.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/device.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/imaging.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/lab.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/medication.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/note.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/observation.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/organization.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/patient.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/practicelocation.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/protocol_override.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/questionnaire.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/staff.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/task.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/data/user.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/v1/models.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/custom.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/hcc2018.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/tests/test_value_sets.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/adverse_event.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/allergy.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/assessment.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/communication.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/condition.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/device.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/diagnostic_study.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/encounter.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/immunization.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/individual_characteristic.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/intervention.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/laboratory_test.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/medication.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/physical_exam.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/procedure.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/v2022/symptom.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/value_set/value_set.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/canvas_sdk/views/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/logger/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/logger/logger.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/authentication.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/aws_headers.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/exceptions.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/sandbox.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/data/plugins/.gitkeep +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/example_plugin/CANVAS_MANIFEST.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/example_plugin/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/example_plugin/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/example_plugin/protocols/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/example_plugin/protocols/my_protocol.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_implicit_imports_plugin/CANVAS_MANIFEST.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_implicit_imports_plugin/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_implicit_imports_plugin/protocols/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_implicit_imports_plugin/protocols/my_protocol.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_implicit_imports_plugin/templates/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_implicit_imports_plugin/templates/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_implicit_imports_plugin/utils/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_implicit_imports_plugin/utils/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_plugin/CANVAS_MANIFEST.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_plugin/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_plugin/other_module/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_plugin/other_module/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_plugin/protocols/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_plugin/protocols/my_protocol.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_runtime_plugin/CANVAS_MANIFEST.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_runtime_plugin/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_runtime_plugin/other_module/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_runtime_plugin/other_module/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_runtime_plugin/protocols/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_forbidden_imports_runtime_plugin/protocols/my_protocol.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v1/CANVAS_MANIFEST.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v1/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v1/other_module/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v1/other_module/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v1/protocols/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v1/protocols/my_protocol.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v2/CANVAS_MANIFEST.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v2/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v2/other_module/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v2/other_module/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v2/protocols/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v2/protocols/my_protocol.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v3/CANVAS_MANIFEST.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v3/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v3/other_module/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v3/other_module/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v3/protocols/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_outside_plugin_v3/protocols/my_protocol.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_plugin/CANVAS_MANIFEST.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_plugin/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_plugin/other_module/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_plugin/other_module/base.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_plugin/protocols/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_module_imports_plugin/protocols/my_protocol.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_render_template/CANVAS_MANIFEST.json +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_render_template/README.md +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_render_template/protocols/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_render_template/protocols/my_protocol.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/fixtures/plugins/test_render_template/templates/template.html +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/test_application.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/test_plugin_installer.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/plugin_runner/tests/test_sandbox.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/pubsub/__init__.py +0 -0
- {canvas-0.16.0 → canvas-0.17.0}/pubsub/pubsub.py +0 -0
canvas-0.17.0/.gitignore
ADDED
|
@@ -1,39 +1,34 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: canvas
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.17.0
|
|
4
4
|
Summary: SDK to customize event-driven actions in your Canvas instance
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Requires-Python: >=3.11,<3.13
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
5
|
+
Author-email: Canvas Team <engineering@canvasmedical.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: <3.13,>=3.11
|
|
13
8
|
Requires-Dist: cookiecutter
|
|
14
|
-
Requires-Dist: cron-converter
|
|
15
|
-
Requires-Dist: deprecation
|
|
16
|
-
Requires-Dist: django
|
|
17
|
-
Requires-Dist: django-
|
|
18
|
-
Requires-Dist: django
|
|
19
|
-
Requires-Dist: env-tools
|
|
20
|
-
Requires-Dist: grpcio
|
|
21
|
-
Requires-Dist: ipython
|
|
22
|
-
Requires-Dist: jsonschema
|
|
9
|
+
Requires-Dist: cron-converter<2,>=1.2.1
|
|
10
|
+
Requires-Dist: deprecation<3,>=2.1.0
|
|
11
|
+
Requires-Dist: django-stubs[compatible-mypy]<6,>=5.1.1
|
|
12
|
+
Requires-Dist: django-timezone-utils<0.16,>=0.15.0
|
|
13
|
+
Requires-Dist: django<6,>=5.1.1
|
|
14
|
+
Requires-Dist: env-tools<3,>=2.4.0
|
|
15
|
+
Requires-Dist: grpcio<2,>=1.60.1
|
|
16
|
+
Requires-Dist: ipython<9,>=8.21.0
|
|
17
|
+
Requires-Dist: jsonschema<5,>=4.21.1
|
|
23
18
|
Requires-Dist: keyring
|
|
24
|
-
Requires-Dist: protobuf
|
|
25
|
-
Requires-Dist: psycopg[binary]
|
|
26
|
-
Requires-Dist: pydantic
|
|
27
|
-
Requires-Dist: pyjwt
|
|
28
|
-
Requires-Dist: python-dotenv
|
|
29
|
-
Requires-Dist: rapidfuzz
|
|
30
|
-
Requires-Dist: redis
|
|
19
|
+
Requires-Dist: protobuf<5,>=4.25.3
|
|
20
|
+
Requires-Dist: psycopg[binary]<4,>=3.2.2
|
|
21
|
+
Requires-Dist: pydantic<3,>=2.6.1
|
|
22
|
+
Requires-Dist: pyjwt==2.10.1
|
|
23
|
+
Requires-Dist: python-dotenv<2,>=1.0.1
|
|
24
|
+
Requires-Dist: rapidfuzz<4,>=3.10.1
|
|
25
|
+
Requires-Dist: redis<6,>=5.0.4
|
|
31
26
|
Requires-Dist: requests
|
|
32
|
-
Requires-Dist: restrictedpython
|
|
33
|
-
Requires-Dist: statsd
|
|
27
|
+
Requires-Dist: restrictedpython>=8.0
|
|
28
|
+
Requires-Dist: statsd<5,>=4.0.1
|
|
34
29
|
Requires-Dist: typer
|
|
35
|
-
Requires-Dist: typing-extensions
|
|
36
|
-
Requires-Dist: websocket-client
|
|
30
|
+
Requires-Dist: typing-extensions<4.13,>=4.8
|
|
31
|
+
Requires-Dist: websocket-client<2,>=1.7.0
|
|
37
32
|
Description-Content-Type: text/markdown
|
|
38
33
|
|
|
39
34
|
### Getting Started
|
|
@@ -220,4 +215,3 @@ $ canvas logs [OPTIONS]
|
|
|
220
215
|
|
|
221
216
|
- `--host TEXT`: Canvas instance to connect to
|
|
222
217
|
- `--help`: Show this message and exit.
|
|
223
|
-
|
|
@@ -40,7 +40,7 @@ def validate_package(package: Path) -> Path:
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
def _build_package(package: Path) -> Path:
|
|
43
|
-
"""
|
|
43
|
+
"""Compresses `package` and returns the built archive, ignoring symlinks, hidden folders, and hidden files."""
|
|
44
44
|
package = package.resolve()
|
|
45
45
|
|
|
46
46
|
if not package.exists() or not package.is_dir():
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
from collections.abc import Generator
|
|
2
2
|
from datetime import datetime
|
|
3
|
+
from typing import cast
|
|
3
4
|
|
|
4
5
|
import pytest
|
|
5
6
|
|
|
7
|
+
import settings
|
|
6
8
|
from canvas_sdk.commands.tests.test_utils import (
|
|
7
9
|
COMMANDS,
|
|
8
10
|
MaskedValue,
|
|
@@ -12,6 +14,7 @@ from canvas_sdk.commands.tests.test_utils import (
|
|
|
12
14
|
get_token,
|
|
13
15
|
install_plugin,
|
|
14
16
|
trigger_plugin_event,
|
|
17
|
+
wait_for_log,
|
|
15
18
|
write_protocol_code,
|
|
16
19
|
)
|
|
17
20
|
|
|
@@ -40,10 +43,18 @@ def write_and_install_protocol_and_clean_up(
|
|
|
40
43
|
) -> Generator[None, None, None]:
|
|
41
44
|
"""Write the protocol code, install the plugin, and clean up after the test."""
|
|
42
45
|
write_protocol_code(new_note["externallyExposableId"], plugin_name, COMMANDS)
|
|
46
|
+
message_received_event, thread, ws = wait_for_log(
|
|
47
|
+
cast(str, settings.INTEGRATION_TEST_URL),
|
|
48
|
+
token.value,
|
|
49
|
+
f"Loading plugin '{plugin_name}",
|
|
50
|
+
)
|
|
43
51
|
install_plugin(plugin_name, token)
|
|
52
|
+
message_received_event.wait(timeout=5.0)
|
|
44
53
|
|
|
45
54
|
yield
|
|
46
55
|
|
|
56
|
+
ws.close()
|
|
57
|
+
thread.join()
|
|
47
58
|
clean_up_files_and_plugins(plugin_name, token)
|
|
48
59
|
|
|
49
60
|
|
|
@@ -57,8 +68,7 @@ def test_protocol_that_inserts_every_command(
|
|
|
57
68
|
commands_in_body = get_original_note_body_commands(new_note["id"], token)
|
|
58
69
|
|
|
59
70
|
# TODO: Temporary workaround to ignore the updateGoal command until the integration test instance is fixed.
|
|
60
|
-
command_keys = [c.Meta.key for c in COMMANDS
|
|
61
|
-
|
|
71
|
+
command_keys = [c.Meta.key for c in COMMANDS]
|
|
62
72
|
assert len(command_keys) == len(commands_in_body)
|
|
63
73
|
for i, command_key in enumerate(command_keys):
|
|
64
74
|
assert commands_in_body[i] == command_key
|
|
@@ -190,11 +190,6 @@ class Protocol(BaseProtocol):
|
|
|
190
190
|
def install_plugin(plugin_name: str, token: MaskedValue) -> None:
|
|
191
191
|
"""Install a plugin."""
|
|
192
192
|
with open(_build_package(Path(f"./custom-plugins/{plugin_name}")), "rb") as package:
|
|
193
|
-
message_received_event = wait_for_log(
|
|
194
|
-
cast(str, settings.INTEGRATION_TEST_URL),
|
|
195
|
-
token.value,
|
|
196
|
-
f"Loading plugin '{plugin_name}",
|
|
197
|
-
)
|
|
198
193
|
response = requests.post(
|
|
199
194
|
plugin_url(cast(str, settings.INTEGRATION_TEST_URL)),
|
|
200
195
|
data={"is_enabled": True},
|
|
@@ -203,8 +198,6 @@ def install_plugin(plugin_name: str, token: MaskedValue) -> None:
|
|
|
203
198
|
)
|
|
204
199
|
response.raise_for_status()
|
|
205
200
|
|
|
206
|
-
message_received_event.wait(timeout=5.0)
|
|
207
|
-
|
|
208
201
|
|
|
209
202
|
def trigger_plugin_event(token: MaskedValue) -> None:
|
|
210
203
|
"""Trigger a plugin event."""
|
|
@@ -328,7 +321,9 @@ def get_token() -> MaskedValue:
|
|
|
328
321
|
return MaskedValue(response.json()["access_token"])
|
|
329
322
|
|
|
330
323
|
|
|
331
|
-
def wait_for_log(
|
|
324
|
+
def wait_for_log(
|
|
325
|
+
host: str, token: str, message: str
|
|
326
|
+
) -> tuple[threading.Event, threading.Thread, websocket.WebSocketApp]:
|
|
332
327
|
"""Wait for a specific log message."""
|
|
333
328
|
hostname = cast(str, urlparse(host).hostname)
|
|
334
329
|
instance = hostname.removesuffix(".canvasmedical.com")
|
|
@@ -362,4 +357,4 @@ def wait_for_log(host: str, token: str, message: str) -> threading.Event:
|
|
|
362
357
|
|
|
363
358
|
connected_event.wait(timeout=5.0)
|
|
364
359
|
|
|
365
|
-
return message_received_event
|
|
360
|
+
return message_received_event, thread, ws
|
|
@@ -92,10 +92,10 @@ class Protocol(BaseProtocol):
|
|
|
92
92
|
protocol.write(protocol_code)
|
|
93
93
|
|
|
94
94
|
with open(_build_package(Path(f"./custom-plugins/{plugin_name}")), "rb") as package:
|
|
95
|
-
message_received_event = wait_for_log(
|
|
95
|
+
message_received_event, thread, ws = wait_for_log(
|
|
96
96
|
settings.INTEGRATION_TEST_URL,
|
|
97
97
|
token.value,
|
|
98
|
-
f"Loading plugin '{plugin_name}
|
|
98
|
+
f"Loading plugin '{plugin_name}",
|
|
99
99
|
)
|
|
100
100
|
|
|
101
101
|
# install the plugin
|
|
@@ -111,6 +111,9 @@ class Protocol(BaseProtocol):
|
|
|
111
111
|
|
|
112
112
|
yield
|
|
113
113
|
|
|
114
|
+
ws.close()
|
|
115
|
+
thread.join()
|
|
116
|
+
|
|
114
117
|
# clean up
|
|
115
118
|
if Path(f"./custom-plugins/{plugin_name}").exists():
|
|
116
119
|
shutil.rmtree(Path(f"./custom-plugins/{plugin_name}"))
|
|
@@ -26,7 +26,7 @@ class Http:
|
|
|
26
26
|
result = fn(self, *args, **kwargs)
|
|
27
27
|
end_time = time.time()
|
|
28
28
|
timing = int((end_time - start_time) * 1000)
|
|
29
|
-
self.statsd_client.timing(f"http_{fn.__name__}", timing)
|
|
29
|
+
self.statsd_client.timing(f"plugins.http_{fn.__name__}", timing)
|
|
30
30
|
return result
|
|
31
31
|
|
|
32
32
|
return cast(F, wrapper)
|
|
@@ -14,9 +14,17 @@ import requests
|
|
|
14
14
|
from psycopg import Connection
|
|
15
15
|
from psycopg.rows import dict_row
|
|
16
16
|
|
|
17
|
-
import settings
|
|
18
17
|
from plugin_runner.aws_headers import aws_sig_v4_headers
|
|
19
18
|
from plugin_runner.exceptions import InvalidPluginFormat, PluginInstallationError
|
|
19
|
+
from settings import (
|
|
20
|
+
AWS_ACCESS_KEY_ID,
|
|
21
|
+
AWS_REGION,
|
|
22
|
+
AWS_SECRET_ACCESS_KEY,
|
|
23
|
+
CUSTOMER_IDENTIFIER,
|
|
24
|
+
MEDIA_S3_BUCKET_NAME,
|
|
25
|
+
PLUGIN_DIRECTORY,
|
|
26
|
+
SECRETS_FILE_NAME,
|
|
27
|
+
)
|
|
20
28
|
|
|
21
29
|
# Plugin "packages" include this prefix in the database record for the plugin and the S3 bucket key.
|
|
22
30
|
UPLOAD_TO_PREFIX = "plugins"
|
|
@@ -100,19 +108,19 @@ def _extract_rows_to_dict(rows: list) -> dict[str, PluginAttributes]:
|
|
|
100
108
|
def download_plugin(plugin_package: str) -> Generator[Path, None, None]:
|
|
101
109
|
"""Download the plugin package from the S3 bucket."""
|
|
102
110
|
method = "GET"
|
|
103
|
-
host = f"s3-{
|
|
104
|
-
bucket =
|
|
105
|
-
customer_identifier =
|
|
111
|
+
host = f"s3-{AWS_REGION}.amazonaws.com"
|
|
112
|
+
bucket = MEDIA_S3_BUCKET_NAME
|
|
113
|
+
customer_identifier = CUSTOMER_IDENTIFIER
|
|
106
114
|
path = f"/{bucket}/{customer_identifier}/{plugin_package}"
|
|
107
115
|
payload = b"This is required for the AWS headers because it is part of the signature"
|
|
108
116
|
pre_auth_headers: dict[str, str] = {}
|
|
109
117
|
query: dict[str, str] = {}
|
|
110
118
|
headers = aws_sig_v4_headers(
|
|
111
|
-
|
|
112
|
-
|
|
119
|
+
AWS_ACCESS_KEY_ID,
|
|
120
|
+
AWS_SECRET_ACCESS_KEY,
|
|
113
121
|
pre_auth_headers,
|
|
114
122
|
"s3",
|
|
115
|
-
|
|
123
|
+
AWS_REGION,
|
|
116
124
|
host,
|
|
117
125
|
method,
|
|
118
126
|
path,
|
|
@@ -135,7 +143,7 @@ def install_plugin(plugin_name: str, attributes: PluginAttributes) -> None:
|
|
|
135
143
|
try:
|
|
136
144
|
print(f"Installing plugin '{plugin_name}'")
|
|
137
145
|
|
|
138
|
-
plugin_installation_path = Path(
|
|
146
|
+
plugin_installation_path = Path(PLUGIN_DIRECTORY) / plugin_name
|
|
139
147
|
|
|
140
148
|
# if plugin exists, first uninstall it
|
|
141
149
|
if plugin_installation_path.exists():
|
|
@@ -175,7 +183,7 @@ def install_plugin_secrets(plugin_name: str, secrets: dict[str, str]) -> None:
|
|
|
175
183
|
"""Write the plugin's secrets to disk in the package's directory."""
|
|
176
184
|
print(f"Writing plugin secrets for '{plugin_name}'")
|
|
177
185
|
|
|
178
|
-
secrets_path = Path(
|
|
186
|
+
secrets_path = Path(PLUGIN_DIRECTORY) / plugin_name / SECRETS_FILE_NAME
|
|
179
187
|
|
|
180
188
|
# Did the plugin ship a secrets.json? TOO BAD, IT'S GONE NOW.
|
|
181
189
|
if Path(secrets_path).exists():
|
|
@@ -199,7 +207,7 @@ def disable_plugin(plugin_name: str) -> None:
|
|
|
199
207
|
|
|
200
208
|
def uninstall_plugin(plugin_name: str) -> None:
|
|
201
209
|
"""Remove the plugin from the filesystem."""
|
|
202
|
-
plugin_path = Path(
|
|
210
|
+
plugin_path = Path(PLUGIN_DIRECTORY) / plugin_name
|
|
203
211
|
|
|
204
212
|
if plugin_path.exists():
|
|
205
213
|
shutil.rmtree(plugin_path)
|
|
@@ -207,10 +215,10 @@ def uninstall_plugin(plugin_name: str) -> None:
|
|
|
207
215
|
|
|
208
216
|
def install_plugins() -> None:
|
|
209
217
|
"""Install all enabled plugins."""
|
|
210
|
-
if Path(
|
|
211
|
-
shutil.rmtree(
|
|
218
|
+
if Path(PLUGIN_DIRECTORY).exists():
|
|
219
|
+
shutil.rmtree(PLUGIN_DIRECTORY)
|
|
212
220
|
|
|
213
|
-
os.mkdir(
|
|
221
|
+
os.mkdir(PLUGIN_DIRECTORY)
|
|
214
222
|
|
|
215
223
|
for plugin_name, attributes in enabled_plugins().items():
|
|
216
224
|
try:
|
|
@@ -2,17 +2,17 @@ import asyncio
|
|
|
2
2
|
import json
|
|
3
3
|
import os
|
|
4
4
|
import pathlib
|
|
5
|
+
import pickle
|
|
5
6
|
import pkgutil
|
|
6
|
-
import signal
|
|
7
7
|
import sys
|
|
8
8
|
import time
|
|
9
9
|
import traceback
|
|
10
10
|
from collections import defaultdict
|
|
11
11
|
from collections.abc import AsyncGenerator
|
|
12
|
-
from types import FrameType
|
|
13
12
|
from typing import Any, TypedDict
|
|
14
13
|
|
|
15
14
|
import grpc
|
|
15
|
+
import redis.asyncio as redis
|
|
16
16
|
import statsd
|
|
17
17
|
|
|
18
18
|
from canvas_generated.messages.effects_pb2 import EffectType
|
|
@@ -30,9 +30,15 @@ from canvas_sdk.protocols import ClinicalQualityMeasure
|
|
|
30
30
|
from canvas_sdk.utils.stats import get_duration_ms, tags_to_line_protocol
|
|
31
31
|
from logger import log
|
|
32
32
|
from plugin_runner.authentication import token_for_plugin
|
|
33
|
-
from plugin_runner.
|
|
33
|
+
from plugin_runner.plugin_installer import install_plugins
|
|
34
34
|
from plugin_runner.sandbox import Sandbox
|
|
35
|
-
from settings import
|
|
35
|
+
from settings import (
|
|
36
|
+
CHANNEL_NAME,
|
|
37
|
+
MANIFEST_FILE_NAME,
|
|
38
|
+
PLUGIN_DIRECTORY,
|
|
39
|
+
REDIS_ENDPOINT,
|
|
40
|
+
SECRETS_FILE_NAME,
|
|
41
|
+
)
|
|
36
42
|
|
|
37
43
|
# when we import plugins we'll use the module name directly so we need to add the plugin
|
|
38
44
|
# directory to the path
|
|
@@ -192,14 +198,50 @@ class PluginRunner(PluginRunnerServicer):
|
|
|
192
198
|
self, request: ReloadPluginsRequest, context: Any
|
|
193
199
|
) -> AsyncGenerator[ReloadPluginsResponse, None]:
|
|
194
200
|
"""This is invoked when we need to reload plugins."""
|
|
201
|
+
log.info("Reloading plugins...")
|
|
195
202
|
try:
|
|
196
|
-
publish_message({"action": "
|
|
203
|
+
await publish_message(message={"action": "reload"})
|
|
197
204
|
except ImportError:
|
|
198
205
|
yield ReloadPluginsResponse(success=False)
|
|
199
206
|
else:
|
|
200
207
|
yield ReloadPluginsResponse(success=True)
|
|
201
208
|
|
|
202
209
|
|
|
210
|
+
async def synchronize_plugins(max_iterations: None | int = None) -> None:
|
|
211
|
+
"""Listen for messages on the pubsub channel that will indicate it is necessary to reinstall and reload plugins."""
|
|
212
|
+
client, pubsub = get_client()
|
|
213
|
+
await pubsub.psubscribe(CHANNEL_NAME)
|
|
214
|
+
log.info("Listening for messages on pubsub channel")
|
|
215
|
+
iterations: int = 0
|
|
216
|
+
while (
|
|
217
|
+
max_iterations is None or iterations < max_iterations
|
|
218
|
+
): # max_iterations == -1 means infinite iterations
|
|
219
|
+
iterations += 1
|
|
220
|
+
message = await pubsub.get_message(ignore_subscribe_messages=True, timeout=None)
|
|
221
|
+
if message is not None:
|
|
222
|
+
log.info("Received message from pubsub channel")
|
|
223
|
+
|
|
224
|
+
message_type = message.get("type", "")
|
|
225
|
+
|
|
226
|
+
if message_type != "pmessage":
|
|
227
|
+
continue
|
|
228
|
+
|
|
229
|
+
data = pickle.loads(message.get("data", pickle.dumps({})))
|
|
230
|
+
|
|
231
|
+
if "action" not in data:
|
|
232
|
+
continue
|
|
233
|
+
|
|
234
|
+
if data["action"] == "reload":
|
|
235
|
+
try:
|
|
236
|
+
log.info(
|
|
237
|
+
"plugin-synchronizer: installing and reloading plugins after receiving command"
|
|
238
|
+
)
|
|
239
|
+
install_plugins()
|
|
240
|
+
load_plugins()
|
|
241
|
+
except Exception as e:
|
|
242
|
+
print("plugin-synchronizer: `install_plugins` failed:", e)
|
|
243
|
+
|
|
244
|
+
|
|
203
245
|
def validate_effects(effects: list[Effect]) -> list[Effect]:
|
|
204
246
|
"""Validates the effects based on predefined rules.
|
|
205
247
|
Keeps only the first AUTOCOMPLETE_SEARCH_RESULTS effect and preserve all non-search-related effects.
|
|
@@ -237,12 +279,6 @@ def apply_effects_to_context(effects: list[Effect], event: Event) -> Event:
|
|
|
237
279
|
return event
|
|
238
280
|
|
|
239
281
|
|
|
240
|
-
def handle_hup_cb(_signum: int, _frame: FrameType | None) -> None:
|
|
241
|
-
"""handle_hup_cb."""
|
|
242
|
-
log.info("Received SIGHUP, reloading plugins...")
|
|
243
|
-
load_plugins()
|
|
244
|
-
|
|
245
|
-
|
|
246
282
|
def find_modules(base_path: pathlib.Path, prefix: str | None = None) -> list[str]:
|
|
247
283
|
"""Find all modules in the specified package path."""
|
|
248
284
|
modules: list[str] = []
|
|
@@ -273,6 +309,22 @@ def sandbox_from_module(base_path: pathlib.Path, module_name: str) -> Any:
|
|
|
273
309
|
return sandbox.execute()
|
|
274
310
|
|
|
275
311
|
|
|
312
|
+
async def publish_message(message: dict) -> None:
|
|
313
|
+
"""Publish a message to the pubsub channel."""
|
|
314
|
+
log.info("Publishing message to pubsub channel")
|
|
315
|
+
client, _ = get_client()
|
|
316
|
+
|
|
317
|
+
await client.publish(CHANNEL_NAME, pickle.dumps(message))
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
def get_client() -> tuple[redis.Redis, redis.client.PubSub]:
|
|
321
|
+
"""Return an async Redis client and pubsub object."""
|
|
322
|
+
client = redis.Redis.from_url(REDIS_ENDPOINT)
|
|
323
|
+
pubsub = client.pubsub()
|
|
324
|
+
|
|
325
|
+
return client, pubsub
|
|
326
|
+
|
|
327
|
+
|
|
276
328
|
def load_or_reload_plugin(path: pathlib.Path) -> None:
|
|
277
329
|
"""Given a path, load or reload a plugin."""
|
|
278
330
|
log.info(f"Loading {path}")
|
|
@@ -415,6 +467,7 @@ async def serve(specified_plugin_paths: list[str] | None = None) -> None:
|
|
|
415
467
|
|
|
416
468
|
log.info(f"Starting server, listening on port {port}")
|
|
417
469
|
|
|
470
|
+
install_plugins()
|
|
418
471
|
load_plugins(specified_plugin_paths)
|
|
419
472
|
|
|
420
473
|
await server.start()
|
|
@@ -434,10 +487,10 @@ def run_server(specified_plugin_paths: list[str] | None = None) -> None:
|
|
|
434
487
|
|
|
435
488
|
asyncio.set_event_loop(loop)
|
|
436
489
|
|
|
437
|
-
signal.signal(signal.SIGHUP, handle_hup_cb)
|
|
438
|
-
|
|
439
490
|
try:
|
|
440
|
-
loop.run_until_complete(
|
|
491
|
+
loop.run_until_complete(
|
|
492
|
+
asyncio.gather(serve(specified_plugin_paths), synchronize_plugins())
|
|
493
|
+
)
|
|
441
494
|
except KeyboardInterrupt:
|
|
442
495
|
pass
|
|
443
496
|
finally:
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import asyncio
|
|
1
2
|
import logging
|
|
3
|
+
import pickle
|
|
2
4
|
import shutil
|
|
3
5
|
from pathlib import Path
|
|
4
|
-
from unittest.mock import MagicMock, patch
|
|
6
|
+
from unittest.mock import AsyncMock, MagicMock, patch
|
|
5
7
|
|
|
6
8
|
import pytest
|
|
7
9
|
|
|
@@ -14,6 +16,7 @@ from plugin_runner.plugin_runner import (
|
|
|
14
16
|
PluginRunner,
|
|
15
17
|
load_or_reload_plugin,
|
|
16
18
|
load_plugins,
|
|
19
|
+
synchronize_plugins,
|
|
17
20
|
)
|
|
18
21
|
|
|
19
22
|
|
|
@@ -229,24 +232,53 @@ async def test_handle_plugin_event_returns_expected_result(
|
|
|
229
232
|
|
|
230
233
|
|
|
231
234
|
@pytest.mark.asyncio
|
|
232
|
-
@pytest.mark.parametrize("install_test_plugin", ["example_plugin"], indirect=True)
|
|
233
235
|
async def test_reload_plugins_event_handler_successfully_publishes_message(
|
|
234
|
-
|
|
236
|
+
plugin_runner: PluginRunner,
|
|
235
237
|
) -> None:
|
|
236
238
|
"""Test ReloadPlugins Event handler successfully publishes a message with restart action."""
|
|
237
|
-
with patch(
|
|
239
|
+
with patch(
|
|
240
|
+
"plugin_runner.plugin_runner.publish_message", new_callable=AsyncMock
|
|
241
|
+
) as mock_publish_message:
|
|
238
242
|
request = ReloadPluginsRequest()
|
|
239
243
|
|
|
240
244
|
result = []
|
|
241
245
|
async for response in plugin_runner.ReloadPlugins(request, None):
|
|
242
246
|
result.append(response)
|
|
243
247
|
|
|
244
|
-
mock_publish_message.assert_called_once_with({"action": "
|
|
248
|
+
mock_publish_message.assert_called_once_with(message={"action": "reload"})
|
|
245
249
|
|
|
246
250
|
assert len(result) == 1
|
|
247
251
|
assert result[0].success is True
|
|
248
252
|
|
|
249
253
|
|
|
254
|
+
@pytest.mark.asyncio
|
|
255
|
+
async def test_synchronize_plugins_calls_install_and_load_plugins() -> None:
|
|
256
|
+
"""Test that synchronize_plugins calls install_plugins and load_plugins."""
|
|
257
|
+
with (
|
|
258
|
+
patch("plugin_runner.plugin_runner.get_client", new_callable=MagicMock) as mock_get_client,
|
|
259
|
+
patch(
|
|
260
|
+
"plugin_runner.plugin_runner.install_plugins", new_callable=AsyncMock
|
|
261
|
+
) as mock_install_plugins,
|
|
262
|
+
patch(
|
|
263
|
+
"plugin_runner.plugin_runner.load_plugins", new_callable=AsyncMock
|
|
264
|
+
) as mock_load_plugins,
|
|
265
|
+
):
|
|
266
|
+
mock_client = AsyncMock()
|
|
267
|
+
mock_pubsub = AsyncMock()
|
|
268
|
+
mock_get_client.return_value = (mock_client, mock_pubsub)
|
|
269
|
+
mock_pubsub.get_message.return_value = {
|
|
270
|
+
"type": "pmessage",
|
|
271
|
+
"data": pickle.dumps({"action": "reload"}),
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
task = asyncio.create_task(synchronize_plugins(max_iterations=1))
|
|
275
|
+
await asyncio.sleep(0.1) # Give some time for the coroutine to run
|
|
276
|
+
task.cancel()
|
|
277
|
+
|
|
278
|
+
mock_install_plugins.assert_called_once()
|
|
279
|
+
mock_load_plugins.assert_called_once()
|
|
280
|
+
|
|
281
|
+
|
|
250
282
|
@pytest.mark.asyncio
|
|
251
283
|
@pytest.mark.parametrize("install_test_plugin", ["test_module_imports_plugin"], indirect=True)
|
|
252
284
|
async def test_changes_to_plugin_modules_should_be_reflected_after_reload(
|