armonik 3.15.2.dev1533__tar.gz → 3.15.2.dev1536__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.
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/PKG-INFO +44 -1
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/README.md +44 -1
- armonik-3.15.2.dev1536/src/armonik/_version.py +3 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/worker/__init__.py +6 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/worker/taskhandler.py +92 -11
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik.egg-info/PKG-INFO +44 -1
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik.egg-info/SOURCES.txt +3 -1
- armonik-3.15.2.dev1536/tests/test_taskhandler.py +108 -0
- armonik-3.15.2.dev1536/tests/test_worker.py +80 -0
- armonik-3.15.2.dev1533/src/armonik/_version.py +0 -3
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/pyproject.toml +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/setup.cfg +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/__init__.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/client/__init__.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/client/partitions.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/client/results.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/client/sessions.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/client/submitter.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/client/tasks.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/client/versions.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/common/__init__.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/common/enumwrapper.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/common/filter.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/common/helpers.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/common/objects.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/__init__.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/applications_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/applications_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/applications_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/auth_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/auth_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/auth_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/events_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/events_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/events_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/health_checks_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/health_checks_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/health_checks_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/partitions_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/partitions_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/partitions_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/results_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/results_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/results_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/sessions_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/sessions_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/sessions_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/submitter_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/submitter_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/submitter_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/tasks_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/tasks_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/tasks_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/versions_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/versions_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/versions_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/__init__.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/agent_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/agent_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/agent_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/applications_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/applications_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/applications_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/applications_fields_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/applications_fields_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/applications_fields_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/applications_filters_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/applications_filters_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/applications_filters_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/auth_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/auth_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/auth_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/events_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/events_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/events_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/filters_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/filters_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/filters_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/health_checks_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/health_checks_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/health_checks_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/objects_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/objects_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/objects_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/partitions_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/partitions_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/partitions_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/partitions_fields_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/partitions_fields_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/partitions_fields_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/partitions_filters_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/partitions_filters_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/partitions_filters_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/result_status_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/result_status_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/result_status_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_fields_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_fields_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_fields_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_filters_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_filters_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_filters_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/session_status_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/session_status_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/session_status_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sessions_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sessions_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sessions_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sessions_fields_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sessions_fields_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sessions_fields_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sessions_filters_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sessions_filters_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sessions_filters_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sort_direction_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sort_direction_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sort_direction_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/submitter_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/submitter_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/submitter_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/task_status_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/task_status_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/task_status_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_fields_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_fields_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_fields_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_filters_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_filters_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_filters_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/versions_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/versions_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/versions_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/worker_common_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/worker_common_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/worker_common_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/worker/__init__.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/worker/agent_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/worker/agent_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/worker/agent_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/worker/worker_service_pb2.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/worker/worker_service_pb2.pyi +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/worker/worker_service_pb2_grpc.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/worker/seqlogger.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/worker/worker.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik.egg-info/dependency_links.txt +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik.egg-info/requires.txt +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik.egg-info/top_level.txt +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/tests/test_filters.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/tests/test_helpers.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/tests/test_partitions.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/tests/test_results.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/tests/test_sessions.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/tests/test_tasks.py +0 -0
- {armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/tests/test_versions.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: armonik
|
|
3
|
-
Version: 3.15.2.
|
|
3
|
+
Version: 3.15.2.dev1536
|
|
4
4
|
Summary: GRPC python binding for the ArmoniK orchestrator API
|
|
5
5
|
License: Apache v2.0 LICENSE
|
|
6
6
|
Project-URL: Homepage, https://github.com/aneoconsulting/ArmoniK.Api
|
|
@@ -40,6 +40,7 @@ Requirements :
|
|
|
40
40
|
If the python command doesn't link to python3 on your system, you may be able to install the package python-is-python3, which links python to python3.
|
|
41
41
|
|
|
42
42
|
To generate the package from sources, run the [proto2python.sh](proto2python.sh) script from its folder. You need to specify a directory where the virtual environment used for the build will be located. For example the following command will generate the packages and will create the build environment "pyvenv" in the current user's home directory:
|
|
43
|
+
|
|
43
44
|
```bash
|
|
44
45
|
./proto2python.sh ~/pyvenv
|
|
45
46
|
```
|
|
@@ -49,6 +50,12 @@ To generate the package from sources, run the [proto2python.sh](proto2python.sh)
|
|
|
49
50
|
- build : contains the source files used to create the wheel package
|
|
50
51
|
- pkg : contains the sdist and wheel packages
|
|
51
52
|
|
|
53
|
+
Instead of running the script you can install the armonik package in "editable" mode, allowing you to make changes to the source code, and the changes will be reflected immediately without reinstalling the package.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install -e ./packages/python
|
|
57
|
+
```
|
|
58
|
+
|
|
52
59
|
### **How to install the generated package**
|
|
53
60
|
From this directory, use the following command:
|
|
54
61
|
```code
|
|
@@ -58,3 +65,39 @@ The generated package will be installed to your current python environment
|
|
|
58
65
|
|
|
59
66
|
## Windows
|
|
60
67
|
Coming soon
|
|
68
|
+
|
|
69
|
+
## Tests
|
|
70
|
+
|
|
71
|
+
### **Test Environment Setup**
|
|
72
|
+
|
|
73
|
+
Before running tests, ensure the following setup steps are completed:
|
|
74
|
+
|
|
75
|
+
1. Install Dependencies:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
sudo apt install dotnet-sdk-6.0 jq
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
2. Launch the Mock Server:
|
|
83
|
+
|
|
84
|
+
Verify that port 5000 is available (Armonik and the mock server communicate on the same port, uninstall armonik if necessary):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
lsof -i :5000
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
3. Launch the server from the project's root directory in a separate terminal:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
cd packages/csharp/ArmoniK.Api.Mock
|
|
94
|
+
dotnet run
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### **Test Environment Summary**
|
|
98
|
+
|
|
99
|
+
The test environment utilizes a mock endpoint to assert if the ArmoniK service has been triggered. It leverages the requests library to query the /calls.json endpoint, examining the JSON response to validate the count of remote procedure calls made to specific services and methods
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
curl localhost:5000/calls.json | jq
|
|
103
|
+
```
|
|
@@ -20,6 +20,7 @@ Requirements :
|
|
|
20
20
|
If the python command doesn't link to python3 on your system, you may be able to install the package python-is-python3, which links python to python3.
|
|
21
21
|
|
|
22
22
|
To generate the package from sources, run the [proto2python.sh](proto2python.sh) script from its folder. You need to specify a directory where the virtual environment used for the build will be located. For example the following command will generate the packages and will create the build environment "pyvenv" in the current user's home directory:
|
|
23
|
+
|
|
23
24
|
```bash
|
|
24
25
|
./proto2python.sh ~/pyvenv
|
|
25
26
|
```
|
|
@@ -29,6 +30,12 @@ To generate the package from sources, run the [proto2python.sh](proto2python.sh)
|
|
|
29
30
|
- build : contains the source files used to create the wheel package
|
|
30
31
|
- pkg : contains the sdist and wheel packages
|
|
31
32
|
|
|
33
|
+
Instead of running the script you can install the armonik package in "editable" mode, allowing you to make changes to the source code, and the changes will be reflected immediately without reinstalling the package.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pip install -e ./packages/python
|
|
37
|
+
```
|
|
38
|
+
|
|
32
39
|
### **How to install the generated package**
|
|
33
40
|
From this directory, use the following command:
|
|
34
41
|
```code
|
|
@@ -37,4 +44,40 @@ pip install pkg/armonik*.whl
|
|
|
37
44
|
The generated package will be installed to your current python environment
|
|
38
45
|
|
|
39
46
|
## Windows
|
|
40
|
-
Coming soon
|
|
47
|
+
Coming soon
|
|
48
|
+
|
|
49
|
+
## Tests
|
|
50
|
+
|
|
51
|
+
### **Test Environment Setup**
|
|
52
|
+
|
|
53
|
+
Before running tests, ensure the following setup steps are completed:
|
|
54
|
+
|
|
55
|
+
1. Install Dependencies:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
sudo apt install dotnet-sdk-6.0 jq
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
2. Launch the Mock Server:
|
|
63
|
+
|
|
64
|
+
Verify that port 5000 is available (Armonik and the mock server communicate on the same port, uninstall armonik if necessary):
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
lsof -i :5000
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
3. Launch the server from the project's root directory in a separate terminal:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cd packages/csharp/ArmoniK.Api.Mock
|
|
74
|
+
dotnet run
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### **Test Environment Summary**
|
|
78
|
+
|
|
79
|
+
The test environment utilizes a mock endpoint to assert if the ArmoniK service has been triggered. It leverages the requests library to query the /calls.json endpoint, examining the JSON response to validate the count of remote procedure calls made to specific services and methods
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
curl localhost:5000/calls.json | jq
|
|
83
|
+
```
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
import os
|
|
3
|
+
from deprecation import deprecated
|
|
3
4
|
from typing import Optional, Dict, List, Tuple, Union, cast
|
|
4
5
|
|
|
5
|
-
from ..common import TaskOptions, TaskDefinition, Task
|
|
6
|
-
from ..protogen.common.agent_common_pb2 import CreateTaskRequest, CreateResultsMetaDataRequest, CreateResultsMetaDataResponse, NotifyResultDataRequest
|
|
6
|
+
from ..common import TaskOptions, TaskDefinition, Task, Result
|
|
7
|
+
from ..protogen.common.agent_common_pb2 import CreateTaskRequest, CreateResultsMetaDataRequest, CreateResultsMetaDataResponse, NotifyResultDataRequest, CreateResultsRequest, CreateResultsResponse, SubmitTasksRequest, SubmitTasksResponse
|
|
7
8
|
from ..protogen.common.objects_pb2 import TaskRequest, DataChunk, InitTaskRequest, TaskRequestHeader, Configuration
|
|
8
9
|
from ..protogen.worker.agent_service_pb2_grpc import AgentStub
|
|
9
10
|
from ..protogen.common.worker_common_pb2 import ProcessRequest
|
|
11
|
+
from ..common.helpers import batched
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
class TaskHandler:
|
|
@@ -31,6 +33,7 @@ class TaskHandler:
|
|
|
31
33
|
with open(os.path.join(self.data_folder, dd), "rb") as f:
|
|
32
34
|
self.data_dependencies[dd] = f.read()
|
|
33
35
|
|
|
36
|
+
@deprecated(deprecated_in="3.15.0", details="Use submit_tasks and instead and create the payload using create_result_metadata and send_result")
|
|
34
37
|
def create_tasks(self, tasks: List[TaskDefinition], task_options: Optional[TaskOptions] = None) -> Tuple[List[Task], List[str]]:
|
|
35
38
|
"""Create new tasks for ArmoniK
|
|
36
39
|
|
|
@@ -67,21 +70,99 @@ class TaskHandler:
|
|
|
67
70
|
raise Exception("Unknown value")
|
|
68
71
|
return tasks_created, tasks_creation_failed
|
|
69
72
|
|
|
70
|
-
def
|
|
71
|
-
"""
|
|
73
|
+
def submit_tasks(self, tasks: List[TaskDefinition], default_task_options: Optional[TaskOptions] = None, batch_size: Optional[int] = 100) -> None:
|
|
74
|
+
"""Submit tasks to the agent.
|
|
72
75
|
|
|
73
76
|
Args:
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
tasks: List of task definitions
|
|
78
|
+
default_task_options: Default Task Options used if a task has its options not set
|
|
79
|
+
batch_size: Batch size for submission
|
|
76
80
|
"""
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
for tasks_batch in batched(tasks, batch_size):
|
|
82
|
+
task_creations = []
|
|
83
|
+
|
|
84
|
+
for t in tasks_batch:
|
|
85
|
+
task_creation = SubmitTasksRequest.TaskCreation(
|
|
86
|
+
expected_output_keys=t.expected_output_ids,
|
|
87
|
+
payload_id=t.payload_id,
|
|
88
|
+
data_dependencies=t.data_dependencies
|
|
89
|
+
)
|
|
90
|
+
if t.options:
|
|
91
|
+
task_creation.task_options=t.options.to_message()
|
|
92
|
+
task_creations.append(task_creation)
|
|
93
|
+
|
|
94
|
+
request = SubmitTasksRequest(
|
|
95
|
+
session_id=self.session_id,
|
|
96
|
+
communication_token=self.token,
|
|
97
|
+
task_creations=task_creations
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
if default_task_options:
|
|
101
|
+
request.task_options=default_task_options.to_message(),
|
|
79
102
|
|
|
80
|
-
|
|
103
|
+
self._client.SubmitTasks(request)
|
|
81
104
|
|
|
82
|
-
def
|
|
83
|
-
|
|
105
|
+
def send_results(self, results_data: Dict[str, bytes | bytearray]) -> None:
|
|
106
|
+
"""Send results.
|
|
84
107
|
|
|
108
|
+
Args:
|
|
109
|
+
result_data: A dictionnary mapping each result ID to its data.
|
|
110
|
+
"""
|
|
111
|
+
for result_id, result_data in results_data.items():
|
|
112
|
+
with open(os.path.join(self.data_folder, result_id), "wb") as f:
|
|
113
|
+
f.write(result_data)
|
|
114
|
+
|
|
115
|
+
request = NotifyResultDataRequest(
|
|
116
|
+
ids=[NotifyResultDataRequest.ResultIdentifier(session_id=self.session_id, result_id=result_id) for result_id in results_data.keys()],
|
|
117
|
+
communication_token=self.token
|
|
118
|
+
)
|
|
119
|
+
self._client.NotifyResultData(request)
|
|
120
|
+
|
|
121
|
+
def create_results_metadata(self, result_names: List[str], batch_size: int = 100) -> Dict[str, List[Result]]:
|
|
122
|
+
"""
|
|
123
|
+
Create the metadata of multiple results at once.
|
|
124
|
+
Data have to be uploaded separately.
|
|
125
|
+
|
|
126
|
+
Args:
|
|
127
|
+
result_names: The names of the results to create.
|
|
128
|
+
batch_size: Batch size for querying.
|
|
129
|
+
|
|
130
|
+
Return:
|
|
131
|
+
A dictionnary mapping each result name to its result summary.
|
|
132
|
+
"""
|
|
133
|
+
results = {}
|
|
134
|
+
for result_names_batch in batched(result_names, batch_size):
|
|
135
|
+
request = CreateResultsMetaDataRequest(
|
|
136
|
+
results=[CreateResultsMetaDataRequest.ResultCreate(name=result_name) for result_name in result_names],
|
|
137
|
+
session_id=self.session_id,
|
|
138
|
+
communication_token=self.token
|
|
139
|
+
)
|
|
140
|
+
response: CreateResultsMetaDataResponse = self._client.CreateResultsMetaData(request)
|
|
141
|
+
for result_message in response.results:
|
|
142
|
+
results[result_message.name] = Result.from_message(result_message)
|
|
143
|
+
return results
|
|
144
|
+
|
|
145
|
+
def create_results(self, results_data: Dict[str, bytes], batch_size: int = 1) -> Dict[str, Result]:
|
|
146
|
+
"""Create one result with data included in the request.
|
|
147
|
+
|
|
148
|
+
Args:
|
|
149
|
+
results_data: A dictionnary mapping the result names to their actual data.
|
|
150
|
+
batch_size: Batch size for querying.
|
|
151
|
+
|
|
152
|
+
Return:
|
|
153
|
+
A dictionnary mappin each result name to its corresponding result summary.
|
|
154
|
+
"""
|
|
155
|
+
results = {}
|
|
156
|
+
for results_ids_batch in batched(results_data.keys(), batch_size):
|
|
157
|
+
request = CreateResultsRequest(
|
|
158
|
+
results=[CreateResultsRequest.ResultCreate(name=name, data=results_data[name]) for name in results_ids_batch],
|
|
159
|
+
session_id=self.session_id,
|
|
160
|
+
communication_token=self.token
|
|
161
|
+
)
|
|
162
|
+
response: CreateResultsResponse = self._client.CreateResults(request)
|
|
163
|
+
for message in response.results:
|
|
164
|
+
results[message.name] = Result.from_message(message)
|
|
165
|
+
return results
|
|
85
166
|
|
|
86
167
|
def _to_request_stream_internal(request, communication_token, is_last, chunk_max_size):
|
|
87
168
|
req = CreateTaskRequest(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: armonik
|
|
3
|
-
Version: 3.15.2.
|
|
3
|
+
Version: 3.15.2.dev1536
|
|
4
4
|
Summary: GRPC python binding for the ArmoniK orchestrator API
|
|
5
5
|
License: Apache v2.0 LICENSE
|
|
6
6
|
Project-URL: Homepage, https://github.com/aneoconsulting/ArmoniK.Api
|
|
@@ -40,6 +40,7 @@ Requirements :
|
|
|
40
40
|
If the python command doesn't link to python3 on your system, you may be able to install the package python-is-python3, which links python to python3.
|
|
41
41
|
|
|
42
42
|
To generate the package from sources, run the [proto2python.sh](proto2python.sh) script from its folder. You need to specify a directory where the virtual environment used for the build will be located. For example the following command will generate the packages and will create the build environment "pyvenv" in the current user's home directory:
|
|
43
|
+
|
|
43
44
|
```bash
|
|
44
45
|
./proto2python.sh ~/pyvenv
|
|
45
46
|
```
|
|
@@ -49,6 +50,12 @@ To generate the package from sources, run the [proto2python.sh](proto2python.sh)
|
|
|
49
50
|
- build : contains the source files used to create the wheel package
|
|
50
51
|
- pkg : contains the sdist and wheel packages
|
|
51
52
|
|
|
53
|
+
Instead of running the script you can install the armonik package in "editable" mode, allowing you to make changes to the source code, and the changes will be reflected immediately without reinstalling the package.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install -e ./packages/python
|
|
57
|
+
```
|
|
58
|
+
|
|
52
59
|
### **How to install the generated package**
|
|
53
60
|
From this directory, use the following command:
|
|
54
61
|
```code
|
|
@@ -58,3 +65,39 @@ The generated package will be installed to your current python environment
|
|
|
58
65
|
|
|
59
66
|
## Windows
|
|
60
67
|
Coming soon
|
|
68
|
+
|
|
69
|
+
## Tests
|
|
70
|
+
|
|
71
|
+
### **Test Environment Setup**
|
|
72
|
+
|
|
73
|
+
Before running tests, ensure the following setup steps are completed:
|
|
74
|
+
|
|
75
|
+
1. Install Dependencies:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
sudo apt install dotnet-sdk-6.0 jq
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
2. Launch the Mock Server:
|
|
83
|
+
|
|
84
|
+
Verify that port 5000 is available (Armonik and the mock server communicate on the same port, uninstall armonik if necessary):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
lsof -i :5000
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
3. Launch the server from the project's root directory in a separate terminal:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
cd packages/csharp/ArmoniK.Api.Mock
|
|
94
|
+
dotnet run
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### **Test Environment Summary**
|
|
98
|
+
|
|
99
|
+
The test environment utilizes a mock endpoint to assert if the ArmoniK service has been triggered. It leverages the requests library to query the /calls.json endpoint, examining the JSON response to validate the count of remote procedure calls made to specific services and methods
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
curl localhost:5000/calls.json | jq
|
|
103
|
+
```
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
import logging
|
|
3
|
+
import warnings
|
|
4
|
+
|
|
5
|
+
from .conftest import all_rpc_called, rpc_called, get_client, data_folder
|
|
6
|
+
from armonik.common import TaskDefinition, TaskOptions
|
|
7
|
+
from armonik.worker import TaskHandler
|
|
8
|
+
from armonik.protogen.worker.agent_service_pb2_grpc import AgentStub
|
|
9
|
+
from armonik.protogen.common.worker_common_pb2 import ProcessRequest
|
|
10
|
+
from armonik.protogen.common.objects_pb2 import Configuration
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
logging.basicConfig()
|
|
14
|
+
logging.getLogger().setLevel(logging.INFO)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class TestTaskHandler:
|
|
18
|
+
|
|
19
|
+
request =ProcessRequest(
|
|
20
|
+
communication_token="token",
|
|
21
|
+
session_id="session-id",
|
|
22
|
+
task_id="task-id",
|
|
23
|
+
expected_output_keys=["result-id"],
|
|
24
|
+
payload_id="payload-id",
|
|
25
|
+
data_dependencies=["dd-id"],
|
|
26
|
+
data_folder=data_folder,
|
|
27
|
+
configuration=Configuration(data_chunk_max_size=8000),
|
|
28
|
+
task_options=TaskOptions(
|
|
29
|
+
max_duration=datetime.timedelta(seconds=1),
|
|
30
|
+
priority=1,
|
|
31
|
+
max_retries=1
|
|
32
|
+
).to_message()
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
def test_taskhandler_init(self):
|
|
36
|
+
task_handler = TaskHandler(self.request, get_client("Agent"))
|
|
37
|
+
|
|
38
|
+
assert task_handler.session_id == "session-id"
|
|
39
|
+
assert task_handler.task_id == "task-id"
|
|
40
|
+
assert task_handler.task_options == TaskOptions(
|
|
41
|
+
max_duration=datetime.timedelta(seconds=1),
|
|
42
|
+
priority=1,
|
|
43
|
+
max_retries=1,
|
|
44
|
+
partition_id='',
|
|
45
|
+
application_name='',
|
|
46
|
+
application_version='',
|
|
47
|
+
application_namespace='',
|
|
48
|
+
application_service='',
|
|
49
|
+
engine_type='',
|
|
50
|
+
options={}
|
|
51
|
+
)
|
|
52
|
+
assert task_handler.token == "token"
|
|
53
|
+
assert task_handler.expected_results == ["result-id"]
|
|
54
|
+
assert task_handler.configuration == Configuration(data_chunk_max_size=8000)
|
|
55
|
+
assert task_handler.payload_id == "payload-id"
|
|
56
|
+
assert task_handler.data_folder == data_folder
|
|
57
|
+
assert task_handler.payload == "payload".encode()
|
|
58
|
+
assert task_handler.data_dependencies == {"dd-id": "dd".encode()}
|
|
59
|
+
|
|
60
|
+
def test_create_task(self):
|
|
61
|
+
with warnings.catch_warnings(record=True) as w:
|
|
62
|
+
# Cause all warnings to always be triggered.
|
|
63
|
+
warnings.simplefilter("always")
|
|
64
|
+
|
|
65
|
+
task_handler = TaskHandler(self.request, get_client("Agent"))
|
|
66
|
+
tasks, errors = task_handler.create_tasks([TaskDefinition(
|
|
67
|
+
payload=b"payload",
|
|
68
|
+
expected_output_ids=["result-id"],
|
|
69
|
+
data_dependencies=[])])
|
|
70
|
+
|
|
71
|
+
assert issubclass(w[-1].category, DeprecationWarning)
|
|
72
|
+
assert rpc_called("Agent", "CreateTask")
|
|
73
|
+
assert tasks == []
|
|
74
|
+
assert errors == []
|
|
75
|
+
|
|
76
|
+
def test_submit_tasks(self):
|
|
77
|
+
task_handler = TaskHandler(self.request, get_client("Agent"))
|
|
78
|
+
tasks = task_handler.submit_tasks([TaskDefinition(payload_id="payload-id",
|
|
79
|
+
expected_output_ids=["result-id"],
|
|
80
|
+
data_dependencies=[])]
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
assert rpc_called("Agent", "SubmitTasks")
|
|
84
|
+
assert tasks is None
|
|
85
|
+
|
|
86
|
+
def test_send_results(self):
|
|
87
|
+
task_handler = TaskHandler(self.request, get_client("Agent"))
|
|
88
|
+
resuls = task_handler.send_results({"result-id": b"result data"})
|
|
89
|
+
assert rpc_called("Agent", "NotifyResultData")
|
|
90
|
+
assert resuls is None
|
|
91
|
+
|
|
92
|
+
def test_create_result_metadata(self):
|
|
93
|
+
task_handler = TaskHandler(self.request, get_client("Agent"))
|
|
94
|
+
results = task_handler.create_results_metadata(["result-name"])
|
|
95
|
+
|
|
96
|
+
assert rpc_called("Agent", "CreateResultsMetaData")
|
|
97
|
+
# TODO: Mock must be updated to return something and so that changes the following assertions
|
|
98
|
+
assert results == {}
|
|
99
|
+
|
|
100
|
+
def test_create_results(self):
|
|
101
|
+
task_handler = TaskHandler(self.request, get_client("Agent"))
|
|
102
|
+
results = task_handler.create_results({"result-name": b"test data"})
|
|
103
|
+
|
|
104
|
+
assert rpc_called("Agent", "CreateResults")
|
|
105
|
+
assert results == {}
|
|
106
|
+
|
|
107
|
+
def test_service_fully_implemented(self):
|
|
108
|
+
assert all_rpc_called("Agent", missings=["GetCommonData", "GetDirectData", "GetResourceData"])
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
import grpc
|
|
3
|
+
import logging
|
|
4
|
+
import os
|
|
5
|
+
import pytest
|
|
6
|
+
|
|
7
|
+
from .conftest import data_folder, grpc_endpoint
|
|
8
|
+
from armonik.worker import ArmoniKWorker, TaskHandler, ClefLogger
|
|
9
|
+
from armonik.common import Output, TaskOptions
|
|
10
|
+
from armonik.protogen.common.objects_pb2 import Empty, Configuration
|
|
11
|
+
from armonik.protogen.common.worker_common_pb2 import ProcessRequest
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def do_nothing(_: TaskHandler) -> Output:
|
|
15
|
+
return Output()
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def throw_error(_: TaskHandler) -> Output:
|
|
19
|
+
raise ValueError("TestError")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def return_error(_: TaskHandler) -> Output:
|
|
23
|
+
return Output("TestError")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def return_and_send(th: TaskHandler) -> Output:
|
|
27
|
+
th.send_results({th.expected_results[0]: b"result"})
|
|
28
|
+
return Output()
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class TestWorker:
|
|
32
|
+
|
|
33
|
+
request = ProcessRequest(
|
|
34
|
+
communication_token="token",
|
|
35
|
+
session_id="session-id",
|
|
36
|
+
task_id="task-id",
|
|
37
|
+
expected_output_keys=["result-id"],
|
|
38
|
+
payload_id="payload-id",
|
|
39
|
+
data_dependencies=["dd-id"],
|
|
40
|
+
data_folder=data_folder,
|
|
41
|
+
configuration=Configuration(data_chunk_max_size=8000),
|
|
42
|
+
task_options=TaskOptions(
|
|
43
|
+
max_duration=datetime.timedelta(seconds=1),
|
|
44
|
+
priority=1,
|
|
45
|
+
max_retries=1
|
|
46
|
+
).to_message()
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
def test_do_nothing(self):
|
|
50
|
+
with grpc.insecure_channel(grpc_endpoint) as agent_channel:
|
|
51
|
+
worker = ArmoniKWorker(agent_channel, do_nothing, logger=ClefLogger("TestLogger", level=logging.CRITICAL))
|
|
52
|
+
reply = worker.Process(self.request, None)
|
|
53
|
+
assert Output(reply.output.error.details if reply.output.WhichOneof("type") == "error" else None).success
|
|
54
|
+
worker.HealthCheck(Empty(), None)
|
|
55
|
+
|
|
56
|
+
def test_should_return_none(self):
|
|
57
|
+
with grpc.insecure_channel(grpc_endpoint) as agent_channel:
|
|
58
|
+
worker = ArmoniKWorker(agent_channel, throw_error, logger=ClefLogger("TestLogger", level=logging.CRITICAL))
|
|
59
|
+
reply = worker.Process(self.request, None)
|
|
60
|
+
assert reply is None
|
|
61
|
+
|
|
62
|
+
def test_should_error(self):
|
|
63
|
+
with grpc.insecure_channel(grpc_endpoint) as agent_channel:
|
|
64
|
+
worker = ArmoniKWorker(agent_channel, return_error, logger=ClefLogger("TestLogger", level=logging.CRITICAL))
|
|
65
|
+
reply = worker.Process(self.request, None)
|
|
66
|
+
output = Output(reply.output.error.details if reply.output.WhichOneof("type") == "error" else None)
|
|
67
|
+
assert not output.success
|
|
68
|
+
assert output.error == "TestError"
|
|
69
|
+
|
|
70
|
+
def test_should_write_result(self):
|
|
71
|
+
with grpc.insecure_channel(grpc_endpoint) as agent_channel:
|
|
72
|
+
worker = ArmoniKWorker(agent_channel, return_and_send, logger=ClefLogger("TestLogger", level=logging.DEBUG))
|
|
73
|
+
reply = worker.Process(self.request, None)
|
|
74
|
+
assert reply is not None
|
|
75
|
+
output = Output(reply.output.error.details if reply.output.WhichOneof("type") == "error" else None)
|
|
76
|
+
assert output.success
|
|
77
|
+
assert os.path.exists(os.path.join(data_folder, self.request.expected_output_keys[0]))
|
|
78
|
+
with open(os.path.join(data_folder, self.request.expected_output_keys[0]), "rb") as f:
|
|
79
|
+
value = f.read()
|
|
80
|
+
assert len(value) > 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/auth_service_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/auth_service_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/events_service_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/events_service_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/results_service_pb2.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/tasks_service_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/client/tasks_service_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/agent_common_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/agent_common_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/auth_common_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/auth_common_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/events_common_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/events_common_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/filters_common_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/filters_common_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/objects_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/objects_pb2.pyi
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/objects_pb2_grpc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/result_status_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/result_status_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_common_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_common_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_fields_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_fields_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/results_filters_pb2.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/session_status_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/session_status_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sessions_common_pb2.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sessions_fields_pb2.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sort_direction_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/sort_direction_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/task_status_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/task_status_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_common_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_common_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_fields_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_fields_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_filters_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/tasks_filters_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/versions_common_pb2.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/worker_common_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/common/worker_common_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/worker/agent_service_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/worker/agent_service_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/worker/worker_service_pb2.py
RENAMED
|
File without changes
|
{armonik-3.15.2.dev1533 → armonik-3.15.2.dev1536}/src/armonik/protogen/worker/worker_service_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|