From 0a6d9da28698b0de5dc42a6e78ab2d112f4934e4 Mon Sep 17 00:00:00 2001 From: eric Date: Wed, 15 Oct 2025 15:03:51 -0400 Subject: [PATCH] Reorganize source tree Signed-off-by: eric --- .github/actions/run-test/action.yml | 6 +++--- CMakeLists.txt | 6 ++++-- docs/source/conf.py | 4 ++-- pyproject.toml | 10 ++++++++-- scripts/build.sh | 4 ++-- {scaler => src/cpp/scaler}/CMakeLists.txt | 0 {scaler => src/cpp/scaler}/io/ymq/CMakeLists.txt | 7 +++++-- {scaler => src/cpp/scaler}/io/ymq/bytes.h | 0 {scaler => src/cpp/scaler}/io/ymq/common.h | 0 {scaler => src/cpp/scaler}/io/ymq/configuration.h | 0 {scaler => src/cpp/scaler}/io/ymq/epoll_context.cpp | 0 {scaler => src/cpp/scaler}/io/ymq/epoll_context.h | 0 {scaler => src/cpp/scaler}/io/ymq/error.h | 0 {scaler => src/cpp/scaler}/io/ymq/event_loop.h | 0 .../cpp/scaler}/io/ymq/event_loop_thread.cpp | 0 .../cpp/scaler}/io/ymq/event_loop_thread.h | 0 {scaler => src/cpp/scaler}/io/ymq/event_manager.h | 0 .../scaler}/io/ymq/interruptive_concurrent_queue.h | 0 {scaler => src/cpp/scaler}/io/ymq/io_context.cpp | 0 {scaler => src/cpp/scaler}/io/ymq/io_context.h | 0 {scaler => src/cpp/scaler}/io/ymq/io_socket.cpp | 0 {scaler => src/cpp/scaler}/io/ymq/io_socket.h | 0 {scaler => src/cpp/scaler}/io/ymq/iocp_context.cpp | 0 {scaler => src/cpp/scaler}/io/ymq/iocp_context.h | 0 {scaler => src/cpp/scaler}/io/ymq/logging.h | 0 {scaler => src/cpp/scaler}/io/ymq/message.h | 0 .../cpp/scaler}/io/ymq/message_connection.h | 0 .../cpp/scaler}/io/ymq/message_connection_tcp.cpp | 0 .../cpp/scaler}/io/ymq/message_connection_tcp.h | 0 {scaler => src/cpp/scaler}/io/ymq/network_utils.h | 0 {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/bytes.h | 0 .../cpp/scaler}/io/ymq/pymod_ymq/exception.h | 0 {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/gil.h | 0 .../cpp/scaler}/io/ymq/pymod_ymq/io_context.h | 0 .../cpp/scaler}/io/ymq/pymod_ymq/io_socket.h | 0 .../cpp/scaler}/io/ymq/pymod_ymq/message.h | 0 {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/python.h | 0 {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/ymq.cpp | 0 {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/ymq.h | 1 + {scaler => src/cpp/scaler}/io/ymq/readme.md | 0 .../cpp/scaler}/io/ymq/simple_interface.cpp | 0 {scaler => src/cpp/scaler}/io/ymq/simple_interface.h | 0 {scaler => src/cpp/scaler}/io/ymq/tcp_client.cpp | 0 {scaler => src/cpp/scaler}/io/ymq/tcp_client.h | 0 {scaler => src/cpp/scaler}/io/ymq/tcp_operations.h | 0 {scaler => src/cpp/scaler}/io/ymq/tcp_server.cpp | 0 {scaler => src/cpp/scaler}/io/ymq/tcp_server.h | 0 .../cpp/scaler}/io/ymq/third_party/concurrentqueue.h | 0 {scaler => src/cpp/scaler}/io/ymq/timed_queue.h | 0 {scaler => src/cpp/scaler}/io/ymq/timestamp.h | 0 {scaler => src/cpp/scaler}/io/ymq/typedefs.h | 0 {scaler => src/cpp/scaler}/io/ymq/utils.h | 0 .../cpp/scaler}/object_storage/CMakeLists.txt | 12 ++++++++---- .../cpp/scaler}/object_storage/constants.h | 0 {scaler => src/cpp/scaler}/object_storage/defs.h | 0 .../cpp/scaler}/object_storage/io_helper.cpp | 2 +- .../cpp/scaler}/object_storage/io_helper.h | 0 .../cpp/scaler}/object_storage/message.cpp | 0 {scaler => src/cpp/scaler}/object_storage/message.h | 2 +- .../cpp/scaler}/object_storage/object_manager.cpp | 0 .../cpp/scaler}/object_storage/object_manager.h | 0 .../scaler}/object_storage/object_storage_server.cpp | 0 .../scaler}/object_storage/object_storage_server.h | 0 .../object_storage/pymod_object_storage_server.cpp | 0 run_cluster.py => src/run_cluster.py | 0 .../run_object_storage_server.py | 0 run_scheduler.py => src/run_scheduler.py | 0 run_top.py => src/run_top.py | 0 run_webui.py => src/run_webui.py | 0 .../run_worker_adapter_native.py | 0 .../run_worker_adapter_symphony.py | 0 {scaler => src/scaler}/__init__.py | 0 {scaler => src/scaler}/about.py | 0 {scaler => src/scaler}/client/__init__.py | 0 {scaler => src/scaler}/client/agent/__init__.py | 0 {scaler => src/scaler}/client/agent/client_agent.py | 0 .../scaler}/client/agent/disconnect_manager.py | 0 .../scaler}/client/agent/future_manager.py | 0 .../scaler}/client/agent/heartbeat_manager.py | 0 {scaler => src/scaler}/client/agent/mixins.py | 0 .../scaler}/client/agent/object_manager.py | 0 {scaler => src/scaler}/client/agent/task_manager.py | 0 {scaler => src/scaler}/client/client.py | 0 {scaler => src/scaler}/client/future.py | 0 {scaler => src/scaler}/client/object_buffer.py | 0 {scaler => src/scaler}/client/object_reference.py | 0 {scaler => src/scaler}/client/serializer/__init__.py | 0 {scaler => src/scaler}/client/serializer/default.py | 0 {scaler => src/scaler}/client/serializer/mixins.py | 0 {scaler => src/scaler}/cluster/__init__.py | 0 {scaler => src/scaler}/cluster/cluster.py | 0 {scaler => src/scaler}/cluster/combo.py | 0 .../scaler}/cluster/object_storage_server.py | 0 {scaler => src/scaler}/cluster/scheduler.py | 0 {scaler => src/scaler}/config/__init__.py | 0 {scaler => src/scaler}/config/defaults.py | 0 {scaler => src/scaler}/config/loader.py | 0 {scaler => src/scaler}/config/mixins.py | 0 {scaler => src/scaler}/config/section/__init__.py | 0 {scaler => src/scaler}/config/section/cluster.py | 0 .../scaler}/config/section/native_worker_adapter.py | 0 .../scaler}/config/section/object_storage_server.py | 0 {scaler => src/scaler}/config/section/scheduler.py | 0 .../config/section/symphony_worker_adapter.py | 0 {scaler => src/scaler}/config/section/top.py | 0 {scaler => src/scaler}/config/section/webui.py | 0 {scaler => src/scaler}/config/types/__init__.py | 0 .../scaler}/config/types/network_backend.py | 0 .../scaler}/config/types/object_storage_server.py | 0 {scaler => src/scaler}/config/types/worker.py | 0 {scaler => src/scaler}/config/types/zmq.py | 0 {scaler => src/scaler}/entry_points/__init__.py | 0 {scaler => src/scaler}/entry_points/cluster.py | 0 .../scaler}/entry_points/object_storage_server.py | 0 {scaler => src/scaler}/entry_points/scheduler.py | 0 {scaler => src/scaler}/entry_points/top.py | 0 {scaler => src/scaler}/entry_points/webui.py | 0 .../scaler}/entry_points/worker_adapter_native.py | 0 .../scaler}/entry_points/worker_adapter_symphony.py | 0 {scaler => src/scaler}/io/__init__.py | 0 {scaler => src/scaler}/io/async_binder.py | 0 {scaler => src/scaler}/io/async_connector.py | 0 .../scaler}/io/async_object_storage_connector.py | 0 {scaler => src/scaler}/io/mixins.py | 0 {scaler => src/scaler}/io/sync_connector.py | 0 .../scaler}/io/sync_object_storage_connector.py | 0 {scaler => src/scaler}/io/sync_subscriber.py | 0 {scaler => src/scaler}/io/utility.py | 0 {scaler => src/scaler}/io/ymq/__init__.py | 0 {scaler => src/scaler}/io/ymq/_ymq.pyi | 0 {scaler => src/scaler}/io/ymq/ymq.py | 0 .../scaler}/io/ymq_async_object_storage_connector.py | 0 .../scaler}/io/ymq_sync_object_storage_connector.py | 0 {scaler => src/scaler}/object_storage/__init__.py | 0 {scaler => src/scaler}/protocol/__init__.py | 0 {scaler => src/scaler}/protocol/capnp/__init__.py | 0 {scaler => src/scaler}/protocol/capnp/_python.py | 0 {scaler => src/scaler}/protocol/capnp/common.capnp | 0 {scaler => src/scaler}/protocol/capnp/message.capnp | 0 .../scaler}/protocol/capnp/object_storage.capnp | 0 {scaler => src/scaler}/protocol/capnp/status.capnp | 0 {scaler => src/scaler}/protocol/introduction.md | 0 {scaler => src/scaler}/protocol/python/__init__.py | 0 {scaler => src/scaler}/protocol/python/common.py | 0 {scaler => src/scaler}/protocol/python/message.py | 0 {scaler => src/scaler}/protocol/python/mixins.py | 0 .../scaler}/protocol/python/object_storage.py | 0 {scaler => src/scaler}/protocol/python/status.py | 0 {scaler => src/scaler}/protocol/worker.md | 0 {scaler => src/scaler}/scheduler/__init__.py | 0 .../scaler}/scheduler/allocate_policy/__init__.py | 0 .../scheduler/allocate_policy/allocate_policy.py | 0 .../allocate_policy/capability_allocate_policy.py | 0 .../allocate_policy/even_load_allocate_policy.py | 0 .../scaler}/scheduler/allocate_policy/mixins.py | 0 .../scaler}/scheduler/controllers/__init__.py | 0 .../scheduler/controllers/balance_controller.py | 0 .../scheduler/controllers/client_controller.py | 0 .../scheduler/controllers/config_controller.py | 0 .../scheduler/controllers/graph_controller.py | 0 .../scheduler/controllers/information_controller.py | 0 .../scaler}/scheduler/controllers/mixins.py | 0 .../scheduler/controllers/object_controller.py | 0 .../scheduler/controllers/scaling_controller.py | 0 .../scaler}/scheduler/controllers/task_controller.py | 0 .../scheduler/controllers/worker_controller.py | 0 .../scaler}/scheduler/object_usage/__init__.py | 0 .../scaler}/scheduler/object_usage/object_tracker.py | 0 {scaler => src/scaler}/scheduler/scheduler.py | 0 {scaler => src/scaler}/scheduler/task/__init__.py | 0 .../scaler}/scheduler/task/task_state_machine.py | 0 .../scaler}/scheduler/task/task_state_manager.py | 0 {scaler => src/scaler}/ui/__init__.py | 0 {scaler => src/scaler}/ui/constants.py | 0 {scaler => src/scaler}/ui/live_display.py | 0 {scaler => src/scaler}/ui/memory_window.py | 0 {scaler => src/scaler}/ui/setting_page.py | 0 {scaler => src/scaler}/ui/task_graph.py | 0 {scaler => src/scaler}/ui/task_log.py | 0 {scaler => src/scaler}/ui/utility.py | 0 {scaler => src/scaler}/ui/webui.py | 0 {scaler => src/scaler}/ui/worker_processors.py | 0 {scaler => src/scaler}/utility/__init__.py | 0 {scaler => src/scaler}/utility/debug.py | 0 {scaler => src/scaler}/utility/event_list.py | 0 {scaler => src/scaler}/utility/event_loop.py | 0 {scaler => src/scaler}/utility/exceptions.py | 0 {scaler => src/scaler}/utility/formatter.py | 0 {scaler => src/scaler}/utility/graph/__init__.py | 0 {scaler => src/scaler}/utility/graph/optimization.py | 0 .../scaler}/utility/graph/topological_sorter.py | 0 .../utility/graph/topological_sorter_graphblas.py | 0 {scaler => src/scaler}/utility/identifiers.py | 0 {scaler => src/scaler}/utility/logging/__init__.py | 0 {scaler => src/scaler}/utility/logging/decorators.py | 0 .../scaler}/utility/logging/scoped_logger.py | 0 {scaler => src/scaler}/utility/logging/utility.py | 0 {scaler => src/scaler}/utility/many_to_many_dict.py | 0 {scaler => src/scaler}/utility/metadata/__init__.py | 0 .../scaler}/utility/metadata/profile_result.py | 0 .../scaler}/utility/metadata/task_flags.py | 0 {scaler => src/scaler}/utility/mixins.py | 0 {scaler => src/scaler}/utility/network_util.py | 0 {scaler => src/scaler}/utility/one_to_many_dict.py | 0 {scaler => src/scaler}/utility/queues/__init__.py | 0 .../scaler}/utility/queues/async_indexed_queue.py | 0 .../scaler}/utility/queues/async_priority_queue.py | 0 .../utility/queues/async_sorted_priority_queue.py | 0 .../scaler}/utility/queues/indexed_queue.py | 0 {scaler => src/scaler}/utility/serialization.py | 0 {scaler => src/scaler}/version.txt | 0 {scaler => src/scaler}/worker/__init__.py | 0 {scaler => src/scaler}/worker/agent/__init__.py | 0 .../scaler}/worker/agent/heartbeat_manager.py | 0 {scaler => src/scaler}/worker/agent/mixins.py | 0 .../scaler}/worker/agent/processor/__init__.py | 0 .../scaler}/worker/agent/processor/object_cache.py | 0 .../scaler}/worker/agent/processor/processor.py | 0 .../worker/agent/processor/streaming_buffer.py | 0 .../scaler}/worker/agent/processor_holder.py | 0 .../scaler}/worker/agent/processor_manager.py | 0 .../scaler}/worker/agent/profiling_manager.py | 0 {scaler => src/scaler}/worker/agent/task_manager.py | 0 .../scaler}/worker/agent/timeout_manager.py | 0 {scaler => src/scaler}/worker/preload.py | 0 {scaler => src/scaler}/worker/worker.py | 0 {scaler => src/scaler}/worker_adapter/__init__.py | 0 {scaler => src/scaler}/worker_adapter/native.py | 0 .../scaler}/worker_adapter/symphony/__init__.py | 0 .../scaler}/worker_adapter/symphony/callback.py | 0 .../worker_adapter/symphony/heartbeat_manager.py | 0 .../scaler}/worker_adapter/symphony/message.py | 0 .../scaler}/worker_adapter/symphony/task_manager.py | 0 .../scaler}/worker_adapter/symphony/worker.py | 0 .../worker_adapter/symphony/worker_adapter.py | 0 tests/CMakeLists.txt | 3 --- tests/client/__init__.py | 0 tests/{ => client}/test_client.py | 12 +++++++----- tests/{ => client}/test_future.py | 2 +- tests/cluster/__init__.py | 0 tests/{ => cluster}/test_cluster.py | 2 +- tests/{ => cluster}/test_cluster_config.py | 0 tests/{ => cluster}/test_cluster_disconnect.py | 2 +- tests/config/__init__.py | 0 tests/{ => config}/test_config_types.py | 0 tests/core/__init__.py | 0 tests/{ => core}/test_async_indexed_queue.py | 2 +- tests/{ => core}/test_async_priority_queue.py | 2 +- tests/{ => core}/test_async_sorted_priority_queue.py | 2 +- tests/{ => core}/test_death_timeout.py | 2 +- tests/{ => core}/test_indexed_queue.py | 2 +- tests/{ => core}/test_profiling.py | 2 +- tests/{ => core}/test_protected.py | 2 +- tests/{io => cpp}/ymq/test_logging.cpp | 0 tests/graph/__init__.py | 0 tests/{ => graph}/test_graph.py | 2 +- tests/io/ymq/CMakeLists.txt | 1 - tests/object_storage/__init__.py | 0 tests/{ => object_storage}/test_object_usage.py | 2 +- tests/scheduler/__init__.py | 0 tests/{ => scheduler}/test_balance.py | 2 +- tests/{ => scheduler}/test_capabilities.py | 2 +- .../test_capability_allocate_policy.py | 2 +- tests/{ => scheduler}/test_scaling.py | 2 +- tests/{ => scheduler}/test_scheduler_config.py | 0 tests/serializer/__init__.py | 0 tests/{ => serializer}/test_serializer.py | 2 +- tests/task/__init__.py | 0 tests/{ => task}/test_nested_task.py | 2 +- tests/ui/__init__.py | 0 tests/{ => ui}/test_ui.py | 2 +- tests/utility/__init__.py | 0 tests/{ => utility}/utility.py | 0 273 files changed, 61 insertions(+), 47 deletions(-) rename {scaler => src/cpp/scaler}/CMakeLists.txt (100%) rename {scaler => src/cpp/scaler}/io/ymq/CMakeLists.txt (91%) rename {scaler => src/cpp/scaler}/io/ymq/bytes.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/common.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/configuration.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/epoll_context.cpp (100%) rename {scaler => src/cpp/scaler}/io/ymq/epoll_context.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/error.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/event_loop.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/event_loop_thread.cpp (100%) rename {scaler => src/cpp/scaler}/io/ymq/event_loop_thread.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/event_manager.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/interruptive_concurrent_queue.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/io_context.cpp (100%) rename {scaler => src/cpp/scaler}/io/ymq/io_context.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/io_socket.cpp (100%) rename {scaler => src/cpp/scaler}/io/ymq/io_socket.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/iocp_context.cpp (100%) rename {scaler => src/cpp/scaler}/io/ymq/iocp_context.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/logging.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/message.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/message_connection.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/message_connection_tcp.cpp (100%) rename {scaler => src/cpp/scaler}/io/ymq/message_connection_tcp.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/network_utils.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/bytes.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/exception.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/gil.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/io_context.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/io_socket.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/message.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/python.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/ymq.cpp (100%) rename {scaler => src/cpp/scaler}/io/ymq/pymod_ymq/ymq.h (99%) rename {scaler => src/cpp/scaler}/io/ymq/readme.md (100%) rename {scaler => src/cpp/scaler}/io/ymq/simple_interface.cpp (100%) rename {scaler => src/cpp/scaler}/io/ymq/simple_interface.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/tcp_client.cpp (100%) rename {scaler => src/cpp/scaler}/io/ymq/tcp_client.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/tcp_operations.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/tcp_server.cpp (100%) rename {scaler => src/cpp/scaler}/io/ymq/tcp_server.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/third_party/concurrentqueue.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/timed_queue.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/timestamp.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/typedefs.h (100%) rename {scaler => src/cpp/scaler}/io/ymq/utils.h (100%) rename {scaler => src/cpp/scaler}/object_storage/CMakeLists.txt (73%) rename {scaler => src/cpp/scaler}/object_storage/constants.h (100%) rename {scaler => src/cpp/scaler}/object_storage/defs.h (100%) rename {scaler => src/cpp/scaler}/object_storage/io_helper.cpp (95%) rename {scaler => src/cpp/scaler}/object_storage/io_helper.h (100%) rename {scaler => src/cpp/scaler}/object_storage/message.cpp (100%) rename {scaler => src/cpp/scaler}/object_storage/message.h (98%) rename {scaler => src/cpp/scaler}/object_storage/object_manager.cpp (100%) rename {scaler => src/cpp/scaler}/object_storage/object_manager.h (100%) rename {scaler => src/cpp/scaler}/object_storage/object_storage_server.cpp (100%) rename {scaler => src/cpp/scaler}/object_storage/object_storage_server.h (100%) rename {scaler => src/cpp/scaler}/object_storage/pymod_object_storage_server.cpp (100%) rename run_cluster.py => src/run_cluster.py (100%) rename run_object_storage_server.py => src/run_object_storage_server.py (100%) rename run_scheduler.py => src/run_scheduler.py (100%) rename run_top.py => src/run_top.py (100%) rename run_webui.py => src/run_webui.py (100%) rename run_worker_adapter_native.py => src/run_worker_adapter_native.py (100%) rename run_worker_adapter_symphony.py => src/run_worker_adapter_symphony.py (100%) rename {scaler => src/scaler}/__init__.py (100%) rename {scaler => src/scaler}/about.py (100%) rename {scaler => src/scaler}/client/__init__.py (100%) rename {scaler => src/scaler}/client/agent/__init__.py (100%) rename {scaler => src/scaler}/client/agent/client_agent.py (100%) rename {scaler => src/scaler}/client/agent/disconnect_manager.py (100%) rename {scaler => src/scaler}/client/agent/future_manager.py (100%) rename {scaler => src/scaler}/client/agent/heartbeat_manager.py (100%) rename {scaler => src/scaler}/client/agent/mixins.py (100%) rename {scaler => src/scaler}/client/agent/object_manager.py (100%) rename {scaler => src/scaler}/client/agent/task_manager.py (100%) rename {scaler => src/scaler}/client/client.py (100%) rename {scaler => src/scaler}/client/future.py (100%) rename {scaler => src/scaler}/client/object_buffer.py (100%) rename {scaler => src/scaler}/client/object_reference.py (100%) rename {scaler => src/scaler}/client/serializer/__init__.py (100%) rename {scaler => src/scaler}/client/serializer/default.py (100%) rename {scaler => src/scaler}/client/serializer/mixins.py (100%) rename {scaler => src/scaler}/cluster/__init__.py (100%) rename {scaler => src/scaler}/cluster/cluster.py (100%) rename {scaler => src/scaler}/cluster/combo.py (100%) rename {scaler => src/scaler}/cluster/object_storage_server.py (100%) rename {scaler => src/scaler}/cluster/scheduler.py (100%) rename {scaler => src/scaler}/config/__init__.py (100%) rename {scaler => src/scaler}/config/defaults.py (100%) rename {scaler => src/scaler}/config/loader.py (100%) rename {scaler => src/scaler}/config/mixins.py (100%) rename {scaler => src/scaler}/config/section/__init__.py (100%) rename {scaler => src/scaler}/config/section/cluster.py (100%) rename {scaler => src/scaler}/config/section/native_worker_adapter.py (100%) rename {scaler => src/scaler}/config/section/object_storage_server.py (100%) rename {scaler => src/scaler}/config/section/scheduler.py (100%) rename {scaler => src/scaler}/config/section/symphony_worker_adapter.py (100%) rename {scaler => src/scaler}/config/section/top.py (100%) rename {scaler => src/scaler}/config/section/webui.py (100%) rename {scaler => src/scaler}/config/types/__init__.py (100%) rename {scaler => src/scaler}/config/types/network_backend.py (100%) rename {scaler => src/scaler}/config/types/object_storage_server.py (100%) rename {scaler => src/scaler}/config/types/worker.py (100%) rename {scaler => src/scaler}/config/types/zmq.py (100%) rename {scaler => src/scaler}/entry_points/__init__.py (100%) rename {scaler => src/scaler}/entry_points/cluster.py (100%) rename {scaler => src/scaler}/entry_points/object_storage_server.py (100%) rename {scaler => src/scaler}/entry_points/scheduler.py (100%) rename {scaler => src/scaler}/entry_points/top.py (100%) rename {scaler => src/scaler}/entry_points/webui.py (100%) rename {scaler => src/scaler}/entry_points/worker_adapter_native.py (100%) rename {scaler => src/scaler}/entry_points/worker_adapter_symphony.py (100%) rename {scaler => src/scaler}/io/__init__.py (100%) rename {scaler => src/scaler}/io/async_binder.py (100%) rename {scaler => src/scaler}/io/async_connector.py (100%) rename {scaler => src/scaler}/io/async_object_storage_connector.py (100%) rename {scaler => src/scaler}/io/mixins.py (100%) rename {scaler => src/scaler}/io/sync_connector.py (100%) rename {scaler => src/scaler}/io/sync_object_storage_connector.py (100%) rename {scaler => src/scaler}/io/sync_subscriber.py (100%) rename {scaler => src/scaler}/io/utility.py (100%) rename {scaler => src/scaler}/io/ymq/__init__.py (100%) rename {scaler => src/scaler}/io/ymq/_ymq.pyi (100%) rename {scaler => src/scaler}/io/ymq/ymq.py (100%) rename {scaler => src/scaler}/io/ymq_async_object_storage_connector.py (100%) rename {scaler => src/scaler}/io/ymq_sync_object_storage_connector.py (100%) rename {scaler => src/scaler}/object_storage/__init__.py (100%) rename {scaler => src/scaler}/protocol/__init__.py (100%) rename {scaler => src/scaler}/protocol/capnp/__init__.py (100%) rename {scaler => src/scaler}/protocol/capnp/_python.py (100%) rename {scaler => src/scaler}/protocol/capnp/common.capnp (100%) rename {scaler => src/scaler}/protocol/capnp/message.capnp (100%) rename {scaler => src/scaler}/protocol/capnp/object_storage.capnp (100%) rename {scaler => src/scaler}/protocol/capnp/status.capnp (100%) rename {scaler => src/scaler}/protocol/introduction.md (100%) rename {scaler => src/scaler}/protocol/python/__init__.py (100%) rename {scaler => src/scaler}/protocol/python/common.py (100%) rename {scaler => src/scaler}/protocol/python/message.py (100%) rename {scaler => src/scaler}/protocol/python/mixins.py (100%) rename {scaler => src/scaler}/protocol/python/object_storage.py (100%) rename {scaler => src/scaler}/protocol/python/status.py (100%) rename {scaler => src/scaler}/protocol/worker.md (100%) rename {scaler => src/scaler}/scheduler/__init__.py (100%) rename {scaler => src/scaler}/scheduler/allocate_policy/__init__.py (100%) rename {scaler => src/scaler}/scheduler/allocate_policy/allocate_policy.py (100%) rename {scaler => src/scaler}/scheduler/allocate_policy/capability_allocate_policy.py (100%) rename {scaler => src/scaler}/scheduler/allocate_policy/even_load_allocate_policy.py (100%) rename {scaler => src/scaler}/scheduler/allocate_policy/mixins.py (100%) rename {scaler => src/scaler}/scheduler/controllers/__init__.py (100%) rename {scaler => src/scaler}/scheduler/controllers/balance_controller.py (100%) rename {scaler => src/scaler}/scheduler/controllers/client_controller.py (100%) rename {scaler => src/scaler}/scheduler/controllers/config_controller.py (100%) rename {scaler => src/scaler}/scheduler/controllers/graph_controller.py (100%) rename {scaler => src/scaler}/scheduler/controllers/information_controller.py (100%) rename {scaler => src/scaler}/scheduler/controllers/mixins.py (100%) rename {scaler => src/scaler}/scheduler/controllers/object_controller.py (100%) rename {scaler => src/scaler}/scheduler/controllers/scaling_controller.py (100%) rename {scaler => src/scaler}/scheduler/controllers/task_controller.py (100%) rename {scaler => src/scaler}/scheduler/controllers/worker_controller.py (100%) rename {scaler => src/scaler}/scheduler/object_usage/__init__.py (100%) rename {scaler => src/scaler}/scheduler/object_usage/object_tracker.py (100%) rename {scaler => src/scaler}/scheduler/scheduler.py (100%) rename {scaler => src/scaler}/scheduler/task/__init__.py (100%) rename {scaler => src/scaler}/scheduler/task/task_state_machine.py (100%) rename {scaler => src/scaler}/scheduler/task/task_state_manager.py (100%) rename {scaler => src/scaler}/ui/__init__.py (100%) rename {scaler => src/scaler}/ui/constants.py (100%) rename {scaler => src/scaler}/ui/live_display.py (100%) rename {scaler => src/scaler}/ui/memory_window.py (100%) rename {scaler => src/scaler}/ui/setting_page.py (100%) rename {scaler => src/scaler}/ui/task_graph.py (100%) rename {scaler => src/scaler}/ui/task_log.py (100%) rename {scaler => src/scaler}/ui/utility.py (100%) rename {scaler => src/scaler}/ui/webui.py (100%) rename {scaler => src/scaler}/ui/worker_processors.py (100%) rename {scaler => src/scaler}/utility/__init__.py (100%) rename {scaler => src/scaler}/utility/debug.py (100%) rename {scaler => src/scaler}/utility/event_list.py (100%) rename {scaler => src/scaler}/utility/event_loop.py (100%) rename {scaler => src/scaler}/utility/exceptions.py (100%) rename {scaler => src/scaler}/utility/formatter.py (100%) rename {scaler => src/scaler}/utility/graph/__init__.py (100%) rename {scaler => src/scaler}/utility/graph/optimization.py (100%) rename {scaler => src/scaler}/utility/graph/topological_sorter.py (100%) rename {scaler => src/scaler}/utility/graph/topological_sorter_graphblas.py (100%) rename {scaler => src/scaler}/utility/identifiers.py (100%) rename {scaler => src/scaler}/utility/logging/__init__.py (100%) rename {scaler => src/scaler}/utility/logging/decorators.py (100%) rename {scaler => src/scaler}/utility/logging/scoped_logger.py (100%) rename {scaler => src/scaler}/utility/logging/utility.py (100%) rename {scaler => src/scaler}/utility/many_to_many_dict.py (100%) rename {scaler => src/scaler}/utility/metadata/__init__.py (100%) rename {scaler => src/scaler}/utility/metadata/profile_result.py (100%) rename {scaler => src/scaler}/utility/metadata/task_flags.py (100%) rename {scaler => src/scaler}/utility/mixins.py (100%) rename {scaler => src/scaler}/utility/network_util.py (100%) rename {scaler => src/scaler}/utility/one_to_many_dict.py (100%) rename {scaler => src/scaler}/utility/queues/__init__.py (100%) rename {scaler => src/scaler}/utility/queues/async_indexed_queue.py (100%) rename {scaler => src/scaler}/utility/queues/async_priority_queue.py (100%) rename {scaler => src/scaler}/utility/queues/async_sorted_priority_queue.py (100%) rename {scaler => src/scaler}/utility/queues/indexed_queue.py (100%) rename {scaler => src/scaler}/utility/serialization.py (100%) rename {scaler => src/scaler}/version.txt (100%) rename {scaler => src/scaler}/worker/__init__.py (100%) rename {scaler => src/scaler}/worker/agent/__init__.py (100%) rename {scaler => src/scaler}/worker/agent/heartbeat_manager.py (100%) rename {scaler => src/scaler}/worker/agent/mixins.py (100%) rename {scaler => src/scaler}/worker/agent/processor/__init__.py (100%) rename {scaler => src/scaler}/worker/agent/processor/object_cache.py (100%) rename {scaler => src/scaler}/worker/agent/processor/processor.py (100%) rename {scaler => src/scaler}/worker/agent/processor/streaming_buffer.py (100%) rename {scaler => src/scaler}/worker/agent/processor_holder.py (100%) rename {scaler => src/scaler}/worker/agent/processor_manager.py (100%) rename {scaler => src/scaler}/worker/agent/profiling_manager.py (100%) rename {scaler => src/scaler}/worker/agent/task_manager.py (100%) rename {scaler => src/scaler}/worker/agent/timeout_manager.py (100%) rename {scaler => src/scaler}/worker/preload.py (100%) rename {scaler => src/scaler}/worker/worker.py (100%) rename {scaler => src/scaler}/worker_adapter/__init__.py (100%) rename {scaler => src/scaler}/worker_adapter/native.py (100%) rename {scaler => src/scaler}/worker_adapter/symphony/__init__.py (100%) rename {scaler => src/scaler}/worker_adapter/symphony/callback.py (100%) rename {scaler => src/scaler}/worker_adapter/symphony/heartbeat_manager.py (100%) rename {scaler => src/scaler}/worker_adapter/symphony/message.py (100%) rename {scaler => src/scaler}/worker_adapter/symphony/task_manager.py (100%) rename {scaler => src/scaler}/worker_adapter/symphony/worker.py (100%) rename {scaler => src/scaler}/worker_adapter/symphony/worker_adapter.py (100%) create mode 100644 tests/client/__init__.py rename tests/{ => client}/test_client.py (97%) rename tests/{ => client}/test_future.py (99%) create mode 100644 tests/cluster/__init__.py rename tests/{ => cluster}/test_cluster.py (94%) rename tests/{ => cluster}/test_cluster_config.py (100%) rename tests/{ => cluster}/test_cluster_disconnect.py (97%) create mode 100644 tests/config/__init__.py rename tests/{ => config}/test_config_types.py (100%) create mode 100644 tests/core/__init__.py rename tests/{ => core}/test_async_indexed_queue.py (96%) rename tests/{ => core}/test_async_priority_queue.py (96%) rename tests/{ => core}/test_async_sorted_priority_queue.py (96%) rename tests/{ => core}/test_death_timeout.py (98%) rename tests/{ => core}/test_indexed_queue.py (94%) rename tests/{ => core}/test_profiling.py (97%) rename tests/{ => core}/test_protected.py (96%) rename tests/{io => cpp}/ymq/test_logging.cpp (100%) create mode 100644 tests/graph/__init__.py rename tests/{ => graph}/test_graph.py (99%) delete mode 100644 tests/io/ymq/CMakeLists.txt create mode 100644 tests/object_storage/__init__.py rename tests/{ => object_storage}/test_object_usage.py (96%) create mode 100644 tests/scheduler/__init__.py rename tests/{ => scheduler}/test_balance.py (97%) rename tests/{ => scheduler}/test_capabilities.py (98%) rename tests/{ => scheduler}/test_capability_allocate_policy.py (99%) rename tests/{ => scheduler}/test_scaling.py (98%) rename tests/{ => scheduler}/test_scheduler_config.py (100%) create mode 100644 tests/serializer/__init__.py rename tests/{ => serializer}/test_serializer.py (98%) create mode 100644 tests/task/__init__.py rename tests/{ => task}/test_nested_task.py (98%) create mode 100644 tests/ui/__init__.py rename tests/{ => ui}/test_ui.py (97%) create mode 100644 tests/utility/__init__.py rename tests/{ => utility}/utility.py (100%) diff --git a/.github/actions/run-test/action.yml b/.github/actions/run-test/action.yml index 47ee04df0..370df92a5 100644 --- a/.github/actions/run-test/action.yml +++ b/.github/actions/run-test/action.yml @@ -23,7 +23,7 @@ runs: - name: Run Unittests shell: bash run: | - python -m unittest discover -v tests + PYTHONPATH=src python -m unittest discover -v tests - name: Run Examples shell: bash @@ -31,7 +31,7 @@ runs: uv pip install --system -r examples/applications/requirements_applications.txt for example in "./examples"/*.py; do echo "Running $example" - PYTHONPATH=. python $example + PYTHONPATH=src python $example done for example in "./examples/applications"/*.py; do if python -c 'import sys; sys.exit(not sys.version_info <= (3, 10))'; then @@ -42,5 +42,5 @@ runs: fi echo "Running $example" - PYTHONPATH=. python $example + PYTHONPATH=src python $example done diff --git a/CMakeLists.txt b/CMakeLists.txt index 04a97cb7f..5aef59fc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ if(NOT SKBUILD_PROJECT_NAME) endif() # Path to the version file -set(VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/scaler/version.txt") +set(VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/scaler/version.txt") # Check if the version file exists if(NOT EXISTS "${VERSION_FILE}") @@ -118,8 +118,10 @@ message(STATUS "Python ABI: ${Python3_SOABI}") # Make LSP happy include_directories(${CAPNP_INCLUDE_DIRS}) include_directories(${PROJECT_SOURCE_DIR}) +include_directories(${PROJECT_SOURCE_DIR}/src) +include_directories(${PROJECT_SOURCE_DIR}/src/cpp) -add_subdirectory(scaler) +add_subdirectory(src/cpp/scaler) if(CMAKE_BUILD_TYPE STREQUAL "Debug") add_subdirectory(tests) diff --git a/docs/source/conf.py b/docs/source/conf.py index ea1a12b00..a31154554 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,7 +13,7 @@ import os import sys -sys.path.insert(0, os.path.abspath(os.path.join("..", ".."))) +sys.path.insert(0, os.path.abspath(os.path.join("..", "..", "src"))) # -- Project information ----------------------------------------------------- @@ -21,7 +21,7 @@ project = "OpenGRIS Scaler" author = "Citi" -with open("../../scaler/version.txt", "rt") as f: +with open("../../src/scaler/version.txt", "rt") as f: version = f.read().strip() release = f"{version}-py3-none-any" diff --git a/pyproject.toml b/pyproject.toml index 08e295965..81bb30443 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,13 @@ dev = [ [tool.scikit-build.metadata.version] provider = "scikit_build_core.metadata.regex" regex = '(?P\d+\.\d+\.\d+(\.[1-9]\d*)?)' -input = "./scaler/version.txt" +input = "./src/scaler/version.txt" + +[tool.setuptools] +package-dir = {"" = "src"} + +[tool.setuptools.packages.find] +where = ["src"] [project.urls] Home = "https://github.com/Citi/scaler" @@ -81,7 +87,7 @@ scaler_worker_adapter_symphony = "scaler.entry_points.worker_adapter_symphony:ma [tool.scikit-build] cmake.source-dir = "." -wheel.packages = ["scaler"] +wheel.packages = ["src/scaler"] build.targets = ["py_ymq", "py_object_storage_server"] [tool.scikit-build.cmake.define] diff --git a/scripts/build.sh b/scripts/build.sh index 4279683d0..3eb0f0d35 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -12,8 +12,8 @@ BUILD_DIR="build_${OS}_${ARCH}" BUILD_PRESET="${OS}-${ARCH}" rm -rf $BUILD_DIR -rm -f scaler/protocol/capnp/*.c++ -rm -f scaler/protocol/capnp/*.h +rm -f src/scaler/protocol/capnp/*.c++ +rm -f src/scaler/protocol/capnp/*.h echo "Build directory: $BUILD_DIR" echo "Build preset: $BUILD_PRESET" diff --git a/scaler/CMakeLists.txt b/src/cpp/scaler/CMakeLists.txt similarity index 100% rename from scaler/CMakeLists.txt rename to src/cpp/scaler/CMakeLists.txt diff --git a/scaler/io/ymq/CMakeLists.txt b/src/cpp/scaler/io/ymq/CMakeLists.txt similarity index 91% rename from scaler/io/ymq/CMakeLists.txt rename to src/cpp/scaler/io/ymq/CMakeLists.txt index dafed2c08..66f1c7f3f 100644 --- a/scaler/io/ymq/CMakeLists.txt +++ b/src/cpp/scaler/io/ymq/CMakeLists.txt @@ -54,7 +54,7 @@ add_library(ymq_objs OBJECT simple_interface.cpp ) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/scaler/io/ymq) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/src/scaler/io/ymq) if(LINUX) # ymq python ======================================================================================================= @@ -70,7 +70,10 @@ if(LINUX) pymod_ymq/ymq.cpp ) - # target_include_directories(py_ymq PRIVATE ${Python3_INCLUDE_DIRS}) + target_include_directories(py_ymq PRIVATE + ${PROJECT_SOURCE_DIR}/src/cpp + ) + target_link_libraries(py_ymq PRIVATE $<$:-Wl,-Bstatic> ymq_objs $<$:-Wl,-Bdynamic> diff --git a/scaler/io/ymq/bytes.h b/src/cpp/scaler/io/ymq/bytes.h similarity index 100% rename from scaler/io/ymq/bytes.h rename to src/cpp/scaler/io/ymq/bytes.h diff --git a/scaler/io/ymq/common.h b/src/cpp/scaler/io/ymq/common.h similarity index 100% rename from scaler/io/ymq/common.h rename to src/cpp/scaler/io/ymq/common.h diff --git a/scaler/io/ymq/configuration.h b/src/cpp/scaler/io/ymq/configuration.h similarity index 100% rename from scaler/io/ymq/configuration.h rename to src/cpp/scaler/io/ymq/configuration.h diff --git a/scaler/io/ymq/epoll_context.cpp b/src/cpp/scaler/io/ymq/epoll_context.cpp similarity index 100% rename from scaler/io/ymq/epoll_context.cpp rename to src/cpp/scaler/io/ymq/epoll_context.cpp diff --git a/scaler/io/ymq/epoll_context.h b/src/cpp/scaler/io/ymq/epoll_context.h similarity index 100% rename from scaler/io/ymq/epoll_context.h rename to src/cpp/scaler/io/ymq/epoll_context.h diff --git a/scaler/io/ymq/error.h b/src/cpp/scaler/io/ymq/error.h similarity index 100% rename from scaler/io/ymq/error.h rename to src/cpp/scaler/io/ymq/error.h diff --git a/scaler/io/ymq/event_loop.h b/src/cpp/scaler/io/ymq/event_loop.h similarity index 100% rename from scaler/io/ymq/event_loop.h rename to src/cpp/scaler/io/ymq/event_loop.h diff --git a/scaler/io/ymq/event_loop_thread.cpp b/src/cpp/scaler/io/ymq/event_loop_thread.cpp similarity index 100% rename from scaler/io/ymq/event_loop_thread.cpp rename to src/cpp/scaler/io/ymq/event_loop_thread.cpp diff --git a/scaler/io/ymq/event_loop_thread.h b/src/cpp/scaler/io/ymq/event_loop_thread.h similarity index 100% rename from scaler/io/ymq/event_loop_thread.h rename to src/cpp/scaler/io/ymq/event_loop_thread.h diff --git a/scaler/io/ymq/event_manager.h b/src/cpp/scaler/io/ymq/event_manager.h similarity index 100% rename from scaler/io/ymq/event_manager.h rename to src/cpp/scaler/io/ymq/event_manager.h diff --git a/scaler/io/ymq/interruptive_concurrent_queue.h b/src/cpp/scaler/io/ymq/interruptive_concurrent_queue.h similarity index 100% rename from scaler/io/ymq/interruptive_concurrent_queue.h rename to src/cpp/scaler/io/ymq/interruptive_concurrent_queue.h diff --git a/scaler/io/ymq/io_context.cpp b/src/cpp/scaler/io/ymq/io_context.cpp similarity index 100% rename from scaler/io/ymq/io_context.cpp rename to src/cpp/scaler/io/ymq/io_context.cpp diff --git a/scaler/io/ymq/io_context.h b/src/cpp/scaler/io/ymq/io_context.h similarity index 100% rename from scaler/io/ymq/io_context.h rename to src/cpp/scaler/io/ymq/io_context.h diff --git a/scaler/io/ymq/io_socket.cpp b/src/cpp/scaler/io/ymq/io_socket.cpp similarity index 100% rename from scaler/io/ymq/io_socket.cpp rename to src/cpp/scaler/io/ymq/io_socket.cpp diff --git a/scaler/io/ymq/io_socket.h b/src/cpp/scaler/io/ymq/io_socket.h similarity index 100% rename from scaler/io/ymq/io_socket.h rename to src/cpp/scaler/io/ymq/io_socket.h diff --git a/scaler/io/ymq/iocp_context.cpp b/src/cpp/scaler/io/ymq/iocp_context.cpp similarity index 100% rename from scaler/io/ymq/iocp_context.cpp rename to src/cpp/scaler/io/ymq/iocp_context.cpp diff --git a/scaler/io/ymq/iocp_context.h b/src/cpp/scaler/io/ymq/iocp_context.h similarity index 100% rename from scaler/io/ymq/iocp_context.h rename to src/cpp/scaler/io/ymq/iocp_context.h diff --git a/scaler/io/ymq/logging.h b/src/cpp/scaler/io/ymq/logging.h similarity index 100% rename from scaler/io/ymq/logging.h rename to src/cpp/scaler/io/ymq/logging.h diff --git a/scaler/io/ymq/message.h b/src/cpp/scaler/io/ymq/message.h similarity index 100% rename from scaler/io/ymq/message.h rename to src/cpp/scaler/io/ymq/message.h diff --git a/scaler/io/ymq/message_connection.h b/src/cpp/scaler/io/ymq/message_connection.h similarity index 100% rename from scaler/io/ymq/message_connection.h rename to src/cpp/scaler/io/ymq/message_connection.h diff --git a/scaler/io/ymq/message_connection_tcp.cpp b/src/cpp/scaler/io/ymq/message_connection_tcp.cpp similarity index 100% rename from scaler/io/ymq/message_connection_tcp.cpp rename to src/cpp/scaler/io/ymq/message_connection_tcp.cpp diff --git a/scaler/io/ymq/message_connection_tcp.h b/src/cpp/scaler/io/ymq/message_connection_tcp.h similarity index 100% rename from scaler/io/ymq/message_connection_tcp.h rename to src/cpp/scaler/io/ymq/message_connection_tcp.h diff --git a/scaler/io/ymq/network_utils.h b/src/cpp/scaler/io/ymq/network_utils.h similarity index 100% rename from scaler/io/ymq/network_utils.h rename to src/cpp/scaler/io/ymq/network_utils.h diff --git a/scaler/io/ymq/pymod_ymq/bytes.h b/src/cpp/scaler/io/ymq/pymod_ymq/bytes.h similarity index 100% rename from scaler/io/ymq/pymod_ymq/bytes.h rename to src/cpp/scaler/io/ymq/pymod_ymq/bytes.h diff --git a/scaler/io/ymq/pymod_ymq/exception.h b/src/cpp/scaler/io/ymq/pymod_ymq/exception.h similarity index 100% rename from scaler/io/ymq/pymod_ymq/exception.h rename to src/cpp/scaler/io/ymq/pymod_ymq/exception.h diff --git a/scaler/io/ymq/pymod_ymq/gil.h b/src/cpp/scaler/io/ymq/pymod_ymq/gil.h similarity index 100% rename from scaler/io/ymq/pymod_ymq/gil.h rename to src/cpp/scaler/io/ymq/pymod_ymq/gil.h diff --git a/scaler/io/ymq/pymod_ymq/io_context.h b/src/cpp/scaler/io/ymq/pymod_ymq/io_context.h similarity index 100% rename from scaler/io/ymq/pymod_ymq/io_context.h rename to src/cpp/scaler/io/ymq/pymod_ymq/io_context.h diff --git a/scaler/io/ymq/pymod_ymq/io_socket.h b/src/cpp/scaler/io/ymq/pymod_ymq/io_socket.h similarity index 100% rename from scaler/io/ymq/pymod_ymq/io_socket.h rename to src/cpp/scaler/io/ymq/pymod_ymq/io_socket.h diff --git a/scaler/io/ymq/pymod_ymq/message.h b/src/cpp/scaler/io/ymq/pymod_ymq/message.h similarity index 100% rename from scaler/io/ymq/pymod_ymq/message.h rename to src/cpp/scaler/io/ymq/pymod_ymq/message.h diff --git a/scaler/io/ymq/pymod_ymq/python.h b/src/cpp/scaler/io/ymq/pymod_ymq/python.h similarity index 100% rename from scaler/io/ymq/pymod_ymq/python.h rename to src/cpp/scaler/io/ymq/pymod_ymq/python.h diff --git a/scaler/io/ymq/pymod_ymq/ymq.cpp b/src/cpp/scaler/io/ymq/pymod_ymq/ymq.cpp similarity index 100% rename from scaler/io/ymq/pymod_ymq/ymq.cpp rename to src/cpp/scaler/io/ymq/pymod_ymq/ymq.cpp diff --git a/scaler/io/ymq/pymod_ymq/ymq.h b/src/cpp/scaler/io/ymq/pymod_ymq/ymq.h similarity index 99% rename from scaler/io/ymq/pymod_ymq/ymq.h rename to src/cpp/scaler/io/ymq/pymod_ymq/ymq.h index e906e33de..0fa1788fa 100644 --- a/scaler/io/ymq/pymod_ymq/ymq.h +++ b/src/cpp/scaler/io/ymq/pymod_ymq/ymq.h @@ -15,6 +15,7 @@ // First-party #include "scaler/io/ymq/error.h" +#include "scaler/io/ymq/typedefs.h" struct YMQState { OwnedPyObject<> enumModule; // Reference to the enum module diff --git a/scaler/io/ymq/readme.md b/src/cpp/scaler/io/ymq/readme.md similarity index 100% rename from scaler/io/ymq/readme.md rename to src/cpp/scaler/io/ymq/readme.md diff --git a/scaler/io/ymq/simple_interface.cpp b/src/cpp/scaler/io/ymq/simple_interface.cpp similarity index 100% rename from scaler/io/ymq/simple_interface.cpp rename to src/cpp/scaler/io/ymq/simple_interface.cpp diff --git a/scaler/io/ymq/simple_interface.h b/src/cpp/scaler/io/ymq/simple_interface.h similarity index 100% rename from scaler/io/ymq/simple_interface.h rename to src/cpp/scaler/io/ymq/simple_interface.h diff --git a/scaler/io/ymq/tcp_client.cpp b/src/cpp/scaler/io/ymq/tcp_client.cpp similarity index 100% rename from scaler/io/ymq/tcp_client.cpp rename to src/cpp/scaler/io/ymq/tcp_client.cpp diff --git a/scaler/io/ymq/tcp_client.h b/src/cpp/scaler/io/ymq/tcp_client.h similarity index 100% rename from scaler/io/ymq/tcp_client.h rename to src/cpp/scaler/io/ymq/tcp_client.h diff --git a/scaler/io/ymq/tcp_operations.h b/src/cpp/scaler/io/ymq/tcp_operations.h similarity index 100% rename from scaler/io/ymq/tcp_operations.h rename to src/cpp/scaler/io/ymq/tcp_operations.h diff --git a/scaler/io/ymq/tcp_server.cpp b/src/cpp/scaler/io/ymq/tcp_server.cpp similarity index 100% rename from scaler/io/ymq/tcp_server.cpp rename to src/cpp/scaler/io/ymq/tcp_server.cpp diff --git a/scaler/io/ymq/tcp_server.h b/src/cpp/scaler/io/ymq/tcp_server.h similarity index 100% rename from scaler/io/ymq/tcp_server.h rename to src/cpp/scaler/io/ymq/tcp_server.h diff --git a/scaler/io/ymq/third_party/concurrentqueue.h b/src/cpp/scaler/io/ymq/third_party/concurrentqueue.h similarity index 100% rename from scaler/io/ymq/third_party/concurrentqueue.h rename to src/cpp/scaler/io/ymq/third_party/concurrentqueue.h diff --git a/scaler/io/ymq/timed_queue.h b/src/cpp/scaler/io/ymq/timed_queue.h similarity index 100% rename from scaler/io/ymq/timed_queue.h rename to src/cpp/scaler/io/ymq/timed_queue.h diff --git a/scaler/io/ymq/timestamp.h b/src/cpp/scaler/io/ymq/timestamp.h similarity index 100% rename from scaler/io/ymq/timestamp.h rename to src/cpp/scaler/io/ymq/timestamp.h diff --git a/scaler/io/ymq/typedefs.h b/src/cpp/scaler/io/ymq/typedefs.h similarity index 100% rename from scaler/io/ymq/typedefs.h rename to src/cpp/scaler/io/ymq/typedefs.h diff --git a/scaler/io/ymq/utils.h b/src/cpp/scaler/io/ymq/utils.h similarity index 100% rename from scaler/io/ymq/utils.h rename to src/cpp/scaler/io/ymq/utils.h diff --git a/scaler/object_storage/CMakeLists.txt b/src/cpp/scaler/object_storage/CMakeLists.txt similarity index 73% rename from scaler/object_storage/CMakeLists.txt rename to src/cpp/scaler/object_storage/CMakeLists.txt index e8cf3a5e5..875d8d094 100644 --- a/scaler/object_storage/CMakeLists.txt +++ b/src/cpp/scaler/object_storage/CMakeLists.txt @@ -1,9 +1,9 @@ # capnp_objs =========================================================================================================== # compile object storage schema capnp -set(CAPNPC_SRC_PREFIX "${PROJECT_SOURCE_DIR}/scaler/protocol/capnp" CACHE STRING "" FORCE) -set(CAPNPC_OUTPUT_DIR "${PROJECT_SOURCE_DIR}/scaler/protocol/capnp" CACHE STRING "" FORCE) +set(CAPNPC_SRC_PREFIX "${PROJECT_SOURCE_DIR}/src/scaler/protocol/capnp" CACHE STRING "" FORCE) +set(CAPNPC_OUTPUT_DIR "${PROJECT_SOURCE_DIR}/src/scaler/protocol/capnp" CACHE STRING "" FORCE) file(MAKE_DIRECTORY "${CAPNPC_OUTPUT_DIR}") -capnp_generate_cpp(OBJECT_STORAGE_CAPNP_SRCS OBJECT_STORAGE_CAPNP_HEADERS "../protocol/capnp/object_storage.capnp") +capnp_generate_cpp(OBJECT_STORAGE_CAPNP_SRCS OBJECT_STORAGE_CAPNP_HEADERS "${PROJECT_SOURCE_DIR}/src/scaler/protocol/capnp/object_storage.capnp") add_library(capnp_objs OBJECT ${OBJECT_STORAGE_CAPNP_SRCS} @@ -18,7 +18,7 @@ add_library(object_storage_server_objs OBJECT object_manager.cpp ) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/scaler/object_storage) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/src/scaler/object_storage) # object_storage_server python ========================================================================================= add_library(py_object_storage_server MODULE @@ -30,6 +30,10 @@ set_target_properties(py_object_storage_server PROPERTIES OUTPUT_NAME "object_storage_server" ) +target_include_directories(py_object_storage_server PRIVATE + ${PROJECT_SOURCE_DIR}/src/cpp +) + target_link_libraries(py_object_storage_server PRIVATE capnp_objs ymq_objs diff --git a/scaler/object_storage/constants.h b/src/cpp/scaler/object_storage/constants.h similarity index 100% rename from scaler/object_storage/constants.h rename to src/cpp/scaler/object_storage/constants.h diff --git a/scaler/object_storage/defs.h b/src/cpp/scaler/object_storage/defs.h similarity index 100% rename from scaler/object_storage/defs.h rename to src/cpp/scaler/object_storage/defs.h diff --git a/scaler/object_storage/io_helper.cpp b/src/cpp/scaler/object_storage/io_helper.cpp similarity index 95% rename from scaler/object_storage/io_helper.cpp rename to src/cpp/scaler/object_storage/io_helper.cpp index 2f9ba15d1..6caf0e97c 100644 --- a/scaler/object_storage/io_helper.cpp +++ b/src/cpp/scaler/object_storage/io_helper.cpp @@ -1,4 +1,4 @@ -#include "io_helper.h" +#include "scaler/object_storage/io_helper.h" #include // sockaddr_in #include // socket(2) diff --git a/scaler/object_storage/io_helper.h b/src/cpp/scaler/object_storage/io_helper.h similarity index 100% rename from scaler/object_storage/io_helper.h rename to src/cpp/scaler/object_storage/io_helper.h diff --git a/scaler/object_storage/message.cpp b/src/cpp/scaler/object_storage/message.cpp similarity index 100% rename from scaler/object_storage/message.cpp rename to src/cpp/scaler/object_storage/message.cpp diff --git a/scaler/object_storage/message.h b/src/cpp/scaler/object_storage/message.h similarity index 98% rename from scaler/object_storage/message.h rename to src/cpp/scaler/object_storage/message.h index 43553740a..5709286e6 100644 --- a/scaler/object_storage/message.h +++ b/src/cpp/scaler/object_storage/message.h @@ -6,7 +6,7 @@ #include #include -#include "../protocol/capnp/object_storage.capnp.h" +#include "scaler/protocol/capnp/object_storage.capnp.h" namespace scaler { namespace object_storage { diff --git a/scaler/object_storage/object_manager.cpp b/src/cpp/scaler/object_storage/object_manager.cpp similarity index 100% rename from scaler/object_storage/object_manager.cpp rename to src/cpp/scaler/object_storage/object_manager.cpp diff --git a/scaler/object_storage/object_manager.h b/src/cpp/scaler/object_storage/object_manager.h similarity index 100% rename from scaler/object_storage/object_manager.h rename to src/cpp/scaler/object_storage/object_manager.h diff --git a/scaler/object_storage/object_storage_server.cpp b/src/cpp/scaler/object_storage/object_storage_server.cpp similarity index 100% rename from scaler/object_storage/object_storage_server.cpp rename to src/cpp/scaler/object_storage/object_storage_server.cpp diff --git a/scaler/object_storage/object_storage_server.h b/src/cpp/scaler/object_storage/object_storage_server.h similarity index 100% rename from scaler/object_storage/object_storage_server.h rename to src/cpp/scaler/object_storage/object_storage_server.h diff --git a/scaler/object_storage/pymod_object_storage_server.cpp b/src/cpp/scaler/object_storage/pymod_object_storage_server.cpp similarity index 100% rename from scaler/object_storage/pymod_object_storage_server.cpp rename to src/cpp/scaler/object_storage/pymod_object_storage_server.cpp diff --git a/run_cluster.py b/src/run_cluster.py similarity index 100% rename from run_cluster.py rename to src/run_cluster.py diff --git a/run_object_storage_server.py b/src/run_object_storage_server.py similarity index 100% rename from run_object_storage_server.py rename to src/run_object_storage_server.py diff --git a/run_scheduler.py b/src/run_scheduler.py similarity index 100% rename from run_scheduler.py rename to src/run_scheduler.py diff --git a/run_top.py b/src/run_top.py similarity index 100% rename from run_top.py rename to src/run_top.py diff --git a/run_webui.py b/src/run_webui.py similarity index 100% rename from run_webui.py rename to src/run_webui.py diff --git a/run_worker_adapter_native.py b/src/run_worker_adapter_native.py similarity index 100% rename from run_worker_adapter_native.py rename to src/run_worker_adapter_native.py diff --git a/run_worker_adapter_symphony.py b/src/run_worker_adapter_symphony.py similarity index 100% rename from run_worker_adapter_symphony.py rename to src/run_worker_adapter_symphony.py diff --git a/scaler/__init__.py b/src/scaler/__init__.py similarity index 100% rename from scaler/__init__.py rename to src/scaler/__init__.py diff --git a/scaler/about.py b/src/scaler/about.py similarity index 100% rename from scaler/about.py rename to src/scaler/about.py diff --git a/scaler/client/__init__.py b/src/scaler/client/__init__.py similarity index 100% rename from scaler/client/__init__.py rename to src/scaler/client/__init__.py diff --git a/scaler/client/agent/__init__.py b/src/scaler/client/agent/__init__.py similarity index 100% rename from scaler/client/agent/__init__.py rename to src/scaler/client/agent/__init__.py diff --git a/scaler/client/agent/client_agent.py b/src/scaler/client/agent/client_agent.py similarity index 100% rename from scaler/client/agent/client_agent.py rename to src/scaler/client/agent/client_agent.py diff --git a/scaler/client/agent/disconnect_manager.py b/src/scaler/client/agent/disconnect_manager.py similarity index 100% rename from scaler/client/agent/disconnect_manager.py rename to src/scaler/client/agent/disconnect_manager.py diff --git a/scaler/client/agent/future_manager.py b/src/scaler/client/agent/future_manager.py similarity index 100% rename from scaler/client/agent/future_manager.py rename to src/scaler/client/agent/future_manager.py diff --git a/scaler/client/agent/heartbeat_manager.py b/src/scaler/client/agent/heartbeat_manager.py similarity index 100% rename from scaler/client/agent/heartbeat_manager.py rename to src/scaler/client/agent/heartbeat_manager.py diff --git a/scaler/client/agent/mixins.py b/src/scaler/client/agent/mixins.py similarity index 100% rename from scaler/client/agent/mixins.py rename to src/scaler/client/agent/mixins.py diff --git a/scaler/client/agent/object_manager.py b/src/scaler/client/agent/object_manager.py similarity index 100% rename from scaler/client/agent/object_manager.py rename to src/scaler/client/agent/object_manager.py diff --git a/scaler/client/agent/task_manager.py b/src/scaler/client/agent/task_manager.py similarity index 100% rename from scaler/client/agent/task_manager.py rename to src/scaler/client/agent/task_manager.py diff --git a/scaler/client/client.py b/src/scaler/client/client.py similarity index 100% rename from scaler/client/client.py rename to src/scaler/client/client.py diff --git a/scaler/client/future.py b/src/scaler/client/future.py similarity index 100% rename from scaler/client/future.py rename to src/scaler/client/future.py diff --git a/scaler/client/object_buffer.py b/src/scaler/client/object_buffer.py similarity index 100% rename from scaler/client/object_buffer.py rename to src/scaler/client/object_buffer.py diff --git a/scaler/client/object_reference.py b/src/scaler/client/object_reference.py similarity index 100% rename from scaler/client/object_reference.py rename to src/scaler/client/object_reference.py diff --git a/scaler/client/serializer/__init__.py b/src/scaler/client/serializer/__init__.py similarity index 100% rename from scaler/client/serializer/__init__.py rename to src/scaler/client/serializer/__init__.py diff --git a/scaler/client/serializer/default.py b/src/scaler/client/serializer/default.py similarity index 100% rename from scaler/client/serializer/default.py rename to src/scaler/client/serializer/default.py diff --git a/scaler/client/serializer/mixins.py b/src/scaler/client/serializer/mixins.py similarity index 100% rename from scaler/client/serializer/mixins.py rename to src/scaler/client/serializer/mixins.py diff --git a/scaler/cluster/__init__.py b/src/scaler/cluster/__init__.py similarity index 100% rename from scaler/cluster/__init__.py rename to src/scaler/cluster/__init__.py diff --git a/scaler/cluster/cluster.py b/src/scaler/cluster/cluster.py similarity index 100% rename from scaler/cluster/cluster.py rename to src/scaler/cluster/cluster.py diff --git a/scaler/cluster/combo.py b/src/scaler/cluster/combo.py similarity index 100% rename from scaler/cluster/combo.py rename to src/scaler/cluster/combo.py diff --git a/scaler/cluster/object_storage_server.py b/src/scaler/cluster/object_storage_server.py similarity index 100% rename from scaler/cluster/object_storage_server.py rename to src/scaler/cluster/object_storage_server.py diff --git a/scaler/cluster/scheduler.py b/src/scaler/cluster/scheduler.py similarity index 100% rename from scaler/cluster/scheduler.py rename to src/scaler/cluster/scheduler.py diff --git a/scaler/config/__init__.py b/src/scaler/config/__init__.py similarity index 100% rename from scaler/config/__init__.py rename to src/scaler/config/__init__.py diff --git a/scaler/config/defaults.py b/src/scaler/config/defaults.py similarity index 100% rename from scaler/config/defaults.py rename to src/scaler/config/defaults.py diff --git a/scaler/config/loader.py b/src/scaler/config/loader.py similarity index 100% rename from scaler/config/loader.py rename to src/scaler/config/loader.py diff --git a/scaler/config/mixins.py b/src/scaler/config/mixins.py similarity index 100% rename from scaler/config/mixins.py rename to src/scaler/config/mixins.py diff --git a/scaler/config/section/__init__.py b/src/scaler/config/section/__init__.py similarity index 100% rename from scaler/config/section/__init__.py rename to src/scaler/config/section/__init__.py diff --git a/scaler/config/section/cluster.py b/src/scaler/config/section/cluster.py similarity index 100% rename from scaler/config/section/cluster.py rename to src/scaler/config/section/cluster.py diff --git a/scaler/config/section/native_worker_adapter.py b/src/scaler/config/section/native_worker_adapter.py similarity index 100% rename from scaler/config/section/native_worker_adapter.py rename to src/scaler/config/section/native_worker_adapter.py diff --git a/scaler/config/section/object_storage_server.py b/src/scaler/config/section/object_storage_server.py similarity index 100% rename from scaler/config/section/object_storage_server.py rename to src/scaler/config/section/object_storage_server.py diff --git a/scaler/config/section/scheduler.py b/src/scaler/config/section/scheduler.py similarity index 100% rename from scaler/config/section/scheduler.py rename to src/scaler/config/section/scheduler.py diff --git a/scaler/config/section/symphony_worker_adapter.py b/src/scaler/config/section/symphony_worker_adapter.py similarity index 100% rename from scaler/config/section/symphony_worker_adapter.py rename to src/scaler/config/section/symphony_worker_adapter.py diff --git a/scaler/config/section/top.py b/src/scaler/config/section/top.py similarity index 100% rename from scaler/config/section/top.py rename to src/scaler/config/section/top.py diff --git a/scaler/config/section/webui.py b/src/scaler/config/section/webui.py similarity index 100% rename from scaler/config/section/webui.py rename to src/scaler/config/section/webui.py diff --git a/scaler/config/types/__init__.py b/src/scaler/config/types/__init__.py similarity index 100% rename from scaler/config/types/__init__.py rename to src/scaler/config/types/__init__.py diff --git a/scaler/config/types/network_backend.py b/src/scaler/config/types/network_backend.py similarity index 100% rename from scaler/config/types/network_backend.py rename to src/scaler/config/types/network_backend.py diff --git a/scaler/config/types/object_storage_server.py b/src/scaler/config/types/object_storage_server.py similarity index 100% rename from scaler/config/types/object_storage_server.py rename to src/scaler/config/types/object_storage_server.py diff --git a/scaler/config/types/worker.py b/src/scaler/config/types/worker.py similarity index 100% rename from scaler/config/types/worker.py rename to src/scaler/config/types/worker.py diff --git a/scaler/config/types/zmq.py b/src/scaler/config/types/zmq.py similarity index 100% rename from scaler/config/types/zmq.py rename to src/scaler/config/types/zmq.py diff --git a/scaler/entry_points/__init__.py b/src/scaler/entry_points/__init__.py similarity index 100% rename from scaler/entry_points/__init__.py rename to src/scaler/entry_points/__init__.py diff --git a/scaler/entry_points/cluster.py b/src/scaler/entry_points/cluster.py similarity index 100% rename from scaler/entry_points/cluster.py rename to src/scaler/entry_points/cluster.py diff --git a/scaler/entry_points/object_storage_server.py b/src/scaler/entry_points/object_storage_server.py similarity index 100% rename from scaler/entry_points/object_storage_server.py rename to src/scaler/entry_points/object_storage_server.py diff --git a/scaler/entry_points/scheduler.py b/src/scaler/entry_points/scheduler.py similarity index 100% rename from scaler/entry_points/scheduler.py rename to src/scaler/entry_points/scheduler.py diff --git a/scaler/entry_points/top.py b/src/scaler/entry_points/top.py similarity index 100% rename from scaler/entry_points/top.py rename to src/scaler/entry_points/top.py diff --git a/scaler/entry_points/webui.py b/src/scaler/entry_points/webui.py similarity index 100% rename from scaler/entry_points/webui.py rename to src/scaler/entry_points/webui.py diff --git a/scaler/entry_points/worker_adapter_native.py b/src/scaler/entry_points/worker_adapter_native.py similarity index 100% rename from scaler/entry_points/worker_adapter_native.py rename to src/scaler/entry_points/worker_adapter_native.py diff --git a/scaler/entry_points/worker_adapter_symphony.py b/src/scaler/entry_points/worker_adapter_symphony.py similarity index 100% rename from scaler/entry_points/worker_adapter_symphony.py rename to src/scaler/entry_points/worker_adapter_symphony.py diff --git a/scaler/io/__init__.py b/src/scaler/io/__init__.py similarity index 100% rename from scaler/io/__init__.py rename to src/scaler/io/__init__.py diff --git a/scaler/io/async_binder.py b/src/scaler/io/async_binder.py similarity index 100% rename from scaler/io/async_binder.py rename to src/scaler/io/async_binder.py diff --git a/scaler/io/async_connector.py b/src/scaler/io/async_connector.py similarity index 100% rename from scaler/io/async_connector.py rename to src/scaler/io/async_connector.py diff --git a/scaler/io/async_object_storage_connector.py b/src/scaler/io/async_object_storage_connector.py similarity index 100% rename from scaler/io/async_object_storage_connector.py rename to src/scaler/io/async_object_storage_connector.py diff --git a/scaler/io/mixins.py b/src/scaler/io/mixins.py similarity index 100% rename from scaler/io/mixins.py rename to src/scaler/io/mixins.py diff --git a/scaler/io/sync_connector.py b/src/scaler/io/sync_connector.py similarity index 100% rename from scaler/io/sync_connector.py rename to src/scaler/io/sync_connector.py diff --git a/scaler/io/sync_object_storage_connector.py b/src/scaler/io/sync_object_storage_connector.py similarity index 100% rename from scaler/io/sync_object_storage_connector.py rename to src/scaler/io/sync_object_storage_connector.py diff --git a/scaler/io/sync_subscriber.py b/src/scaler/io/sync_subscriber.py similarity index 100% rename from scaler/io/sync_subscriber.py rename to src/scaler/io/sync_subscriber.py diff --git a/scaler/io/utility.py b/src/scaler/io/utility.py similarity index 100% rename from scaler/io/utility.py rename to src/scaler/io/utility.py diff --git a/scaler/io/ymq/__init__.py b/src/scaler/io/ymq/__init__.py similarity index 100% rename from scaler/io/ymq/__init__.py rename to src/scaler/io/ymq/__init__.py diff --git a/scaler/io/ymq/_ymq.pyi b/src/scaler/io/ymq/_ymq.pyi similarity index 100% rename from scaler/io/ymq/_ymq.pyi rename to src/scaler/io/ymq/_ymq.pyi diff --git a/scaler/io/ymq/ymq.py b/src/scaler/io/ymq/ymq.py similarity index 100% rename from scaler/io/ymq/ymq.py rename to src/scaler/io/ymq/ymq.py diff --git a/scaler/io/ymq_async_object_storage_connector.py b/src/scaler/io/ymq_async_object_storage_connector.py similarity index 100% rename from scaler/io/ymq_async_object_storage_connector.py rename to src/scaler/io/ymq_async_object_storage_connector.py diff --git a/scaler/io/ymq_sync_object_storage_connector.py b/src/scaler/io/ymq_sync_object_storage_connector.py similarity index 100% rename from scaler/io/ymq_sync_object_storage_connector.py rename to src/scaler/io/ymq_sync_object_storage_connector.py diff --git a/scaler/object_storage/__init__.py b/src/scaler/object_storage/__init__.py similarity index 100% rename from scaler/object_storage/__init__.py rename to src/scaler/object_storage/__init__.py diff --git a/scaler/protocol/__init__.py b/src/scaler/protocol/__init__.py similarity index 100% rename from scaler/protocol/__init__.py rename to src/scaler/protocol/__init__.py diff --git a/scaler/protocol/capnp/__init__.py b/src/scaler/protocol/capnp/__init__.py similarity index 100% rename from scaler/protocol/capnp/__init__.py rename to src/scaler/protocol/capnp/__init__.py diff --git a/scaler/protocol/capnp/_python.py b/src/scaler/protocol/capnp/_python.py similarity index 100% rename from scaler/protocol/capnp/_python.py rename to src/scaler/protocol/capnp/_python.py diff --git a/scaler/protocol/capnp/common.capnp b/src/scaler/protocol/capnp/common.capnp similarity index 100% rename from scaler/protocol/capnp/common.capnp rename to src/scaler/protocol/capnp/common.capnp diff --git a/scaler/protocol/capnp/message.capnp b/src/scaler/protocol/capnp/message.capnp similarity index 100% rename from scaler/protocol/capnp/message.capnp rename to src/scaler/protocol/capnp/message.capnp diff --git a/scaler/protocol/capnp/object_storage.capnp b/src/scaler/protocol/capnp/object_storage.capnp similarity index 100% rename from scaler/protocol/capnp/object_storage.capnp rename to src/scaler/protocol/capnp/object_storage.capnp diff --git a/scaler/protocol/capnp/status.capnp b/src/scaler/protocol/capnp/status.capnp similarity index 100% rename from scaler/protocol/capnp/status.capnp rename to src/scaler/protocol/capnp/status.capnp diff --git a/scaler/protocol/introduction.md b/src/scaler/protocol/introduction.md similarity index 100% rename from scaler/protocol/introduction.md rename to src/scaler/protocol/introduction.md diff --git a/scaler/protocol/python/__init__.py b/src/scaler/protocol/python/__init__.py similarity index 100% rename from scaler/protocol/python/__init__.py rename to src/scaler/protocol/python/__init__.py diff --git a/scaler/protocol/python/common.py b/src/scaler/protocol/python/common.py similarity index 100% rename from scaler/protocol/python/common.py rename to src/scaler/protocol/python/common.py diff --git a/scaler/protocol/python/message.py b/src/scaler/protocol/python/message.py similarity index 100% rename from scaler/protocol/python/message.py rename to src/scaler/protocol/python/message.py diff --git a/scaler/protocol/python/mixins.py b/src/scaler/protocol/python/mixins.py similarity index 100% rename from scaler/protocol/python/mixins.py rename to src/scaler/protocol/python/mixins.py diff --git a/scaler/protocol/python/object_storage.py b/src/scaler/protocol/python/object_storage.py similarity index 100% rename from scaler/protocol/python/object_storage.py rename to src/scaler/protocol/python/object_storage.py diff --git a/scaler/protocol/python/status.py b/src/scaler/protocol/python/status.py similarity index 100% rename from scaler/protocol/python/status.py rename to src/scaler/protocol/python/status.py diff --git a/scaler/protocol/worker.md b/src/scaler/protocol/worker.md similarity index 100% rename from scaler/protocol/worker.md rename to src/scaler/protocol/worker.md diff --git a/scaler/scheduler/__init__.py b/src/scaler/scheduler/__init__.py similarity index 100% rename from scaler/scheduler/__init__.py rename to src/scaler/scheduler/__init__.py diff --git a/scaler/scheduler/allocate_policy/__init__.py b/src/scaler/scheduler/allocate_policy/__init__.py similarity index 100% rename from scaler/scheduler/allocate_policy/__init__.py rename to src/scaler/scheduler/allocate_policy/__init__.py diff --git a/scaler/scheduler/allocate_policy/allocate_policy.py b/src/scaler/scheduler/allocate_policy/allocate_policy.py similarity index 100% rename from scaler/scheduler/allocate_policy/allocate_policy.py rename to src/scaler/scheduler/allocate_policy/allocate_policy.py diff --git a/scaler/scheduler/allocate_policy/capability_allocate_policy.py b/src/scaler/scheduler/allocate_policy/capability_allocate_policy.py similarity index 100% rename from scaler/scheduler/allocate_policy/capability_allocate_policy.py rename to src/scaler/scheduler/allocate_policy/capability_allocate_policy.py diff --git a/scaler/scheduler/allocate_policy/even_load_allocate_policy.py b/src/scaler/scheduler/allocate_policy/even_load_allocate_policy.py similarity index 100% rename from scaler/scheduler/allocate_policy/even_load_allocate_policy.py rename to src/scaler/scheduler/allocate_policy/even_load_allocate_policy.py diff --git a/scaler/scheduler/allocate_policy/mixins.py b/src/scaler/scheduler/allocate_policy/mixins.py similarity index 100% rename from scaler/scheduler/allocate_policy/mixins.py rename to src/scaler/scheduler/allocate_policy/mixins.py diff --git a/scaler/scheduler/controllers/__init__.py b/src/scaler/scheduler/controllers/__init__.py similarity index 100% rename from scaler/scheduler/controllers/__init__.py rename to src/scaler/scheduler/controllers/__init__.py diff --git a/scaler/scheduler/controllers/balance_controller.py b/src/scaler/scheduler/controllers/balance_controller.py similarity index 100% rename from scaler/scheduler/controllers/balance_controller.py rename to src/scaler/scheduler/controllers/balance_controller.py diff --git a/scaler/scheduler/controllers/client_controller.py b/src/scaler/scheduler/controllers/client_controller.py similarity index 100% rename from scaler/scheduler/controllers/client_controller.py rename to src/scaler/scheduler/controllers/client_controller.py diff --git a/scaler/scheduler/controllers/config_controller.py b/src/scaler/scheduler/controllers/config_controller.py similarity index 100% rename from scaler/scheduler/controllers/config_controller.py rename to src/scaler/scheduler/controllers/config_controller.py diff --git a/scaler/scheduler/controllers/graph_controller.py b/src/scaler/scheduler/controllers/graph_controller.py similarity index 100% rename from scaler/scheduler/controllers/graph_controller.py rename to src/scaler/scheduler/controllers/graph_controller.py diff --git a/scaler/scheduler/controllers/information_controller.py b/src/scaler/scheduler/controllers/information_controller.py similarity index 100% rename from scaler/scheduler/controllers/information_controller.py rename to src/scaler/scheduler/controllers/information_controller.py diff --git a/scaler/scheduler/controllers/mixins.py b/src/scaler/scheduler/controllers/mixins.py similarity index 100% rename from scaler/scheduler/controllers/mixins.py rename to src/scaler/scheduler/controllers/mixins.py diff --git a/scaler/scheduler/controllers/object_controller.py b/src/scaler/scheduler/controllers/object_controller.py similarity index 100% rename from scaler/scheduler/controllers/object_controller.py rename to src/scaler/scheduler/controllers/object_controller.py diff --git a/scaler/scheduler/controllers/scaling_controller.py b/src/scaler/scheduler/controllers/scaling_controller.py similarity index 100% rename from scaler/scheduler/controllers/scaling_controller.py rename to src/scaler/scheduler/controllers/scaling_controller.py diff --git a/scaler/scheduler/controllers/task_controller.py b/src/scaler/scheduler/controllers/task_controller.py similarity index 100% rename from scaler/scheduler/controllers/task_controller.py rename to src/scaler/scheduler/controllers/task_controller.py diff --git a/scaler/scheduler/controllers/worker_controller.py b/src/scaler/scheduler/controllers/worker_controller.py similarity index 100% rename from scaler/scheduler/controllers/worker_controller.py rename to src/scaler/scheduler/controllers/worker_controller.py diff --git a/scaler/scheduler/object_usage/__init__.py b/src/scaler/scheduler/object_usage/__init__.py similarity index 100% rename from scaler/scheduler/object_usage/__init__.py rename to src/scaler/scheduler/object_usage/__init__.py diff --git a/scaler/scheduler/object_usage/object_tracker.py b/src/scaler/scheduler/object_usage/object_tracker.py similarity index 100% rename from scaler/scheduler/object_usage/object_tracker.py rename to src/scaler/scheduler/object_usage/object_tracker.py diff --git a/scaler/scheduler/scheduler.py b/src/scaler/scheduler/scheduler.py similarity index 100% rename from scaler/scheduler/scheduler.py rename to src/scaler/scheduler/scheduler.py diff --git a/scaler/scheduler/task/__init__.py b/src/scaler/scheduler/task/__init__.py similarity index 100% rename from scaler/scheduler/task/__init__.py rename to src/scaler/scheduler/task/__init__.py diff --git a/scaler/scheduler/task/task_state_machine.py b/src/scaler/scheduler/task/task_state_machine.py similarity index 100% rename from scaler/scheduler/task/task_state_machine.py rename to src/scaler/scheduler/task/task_state_machine.py diff --git a/scaler/scheduler/task/task_state_manager.py b/src/scaler/scheduler/task/task_state_manager.py similarity index 100% rename from scaler/scheduler/task/task_state_manager.py rename to src/scaler/scheduler/task/task_state_manager.py diff --git a/scaler/ui/__init__.py b/src/scaler/ui/__init__.py similarity index 100% rename from scaler/ui/__init__.py rename to src/scaler/ui/__init__.py diff --git a/scaler/ui/constants.py b/src/scaler/ui/constants.py similarity index 100% rename from scaler/ui/constants.py rename to src/scaler/ui/constants.py diff --git a/scaler/ui/live_display.py b/src/scaler/ui/live_display.py similarity index 100% rename from scaler/ui/live_display.py rename to src/scaler/ui/live_display.py diff --git a/scaler/ui/memory_window.py b/src/scaler/ui/memory_window.py similarity index 100% rename from scaler/ui/memory_window.py rename to src/scaler/ui/memory_window.py diff --git a/scaler/ui/setting_page.py b/src/scaler/ui/setting_page.py similarity index 100% rename from scaler/ui/setting_page.py rename to src/scaler/ui/setting_page.py diff --git a/scaler/ui/task_graph.py b/src/scaler/ui/task_graph.py similarity index 100% rename from scaler/ui/task_graph.py rename to src/scaler/ui/task_graph.py diff --git a/scaler/ui/task_log.py b/src/scaler/ui/task_log.py similarity index 100% rename from scaler/ui/task_log.py rename to src/scaler/ui/task_log.py diff --git a/scaler/ui/utility.py b/src/scaler/ui/utility.py similarity index 100% rename from scaler/ui/utility.py rename to src/scaler/ui/utility.py diff --git a/scaler/ui/webui.py b/src/scaler/ui/webui.py similarity index 100% rename from scaler/ui/webui.py rename to src/scaler/ui/webui.py diff --git a/scaler/ui/worker_processors.py b/src/scaler/ui/worker_processors.py similarity index 100% rename from scaler/ui/worker_processors.py rename to src/scaler/ui/worker_processors.py diff --git a/scaler/utility/__init__.py b/src/scaler/utility/__init__.py similarity index 100% rename from scaler/utility/__init__.py rename to src/scaler/utility/__init__.py diff --git a/scaler/utility/debug.py b/src/scaler/utility/debug.py similarity index 100% rename from scaler/utility/debug.py rename to src/scaler/utility/debug.py diff --git a/scaler/utility/event_list.py b/src/scaler/utility/event_list.py similarity index 100% rename from scaler/utility/event_list.py rename to src/scaler/utility/event_list.py diff --git a/scaler/utility/event_loop.py b/src/scaler/utility/event_loop.py similarity index 100% rename from scaler/utility/event_loop.py rename to src/scaler/utility/event_loop.py diff --git a/scaler/utility/exceptions.py b/src/scaler/utility/exceptions.py similarity index 100% rename from scaler/utility/exceptions.py rename to src/scaler/utility/exceptions.py diff --git a/scaler/utility/formatter.py b/src/scaler/utility/formatter.py similarity index 100% rename from scaler/utility/formatter.py rename to src/scaler/utility/formatter.py diff --git a/scaler/utility/graph/__init__.py b/src/scaler/utility/graph/__init__.py similarity index 100% rename from scaler/utility/graph/__init__.py rename to src/scaler/utility/graph/__init__.py diff --git a/scaler/utility/graph/optimization.py b/src/scaler/utility/graph/optimization.py similarity index 100% rename from scaler/utility/graph/optimization.py rename to src/scaler/utility/graph/optimization.py diff --git a/scaler/utility/graph/topological_sorter.py b/src/scaler/utility/graph/topological_sorter.py similarity index 100% rename from scaler/utility/graph/topological_sorter.py rename to src/scaler/utility/graph/topological_sorter.py diff --git a/scaler/utility/graph/topological_sorter_graphblas.py b/src/scaler/utility/graph/topological_sorter_graphblas.py similarity index 100% rename from scaler/utility/graph/topological_sorter_graphblas.py rename to src/scaler/utility/graph/topological_sorter_graphblas.py diff --git a/scaler/utility/identifiers.py b/src/scaler/utility/identifiers.py similarity index 100% rename from scaler/utility/identifiers.py rename to src/scaler/utility/identifiers.py diff --git a/scaler/utility/logging/__init__.py b/src/scaler/utility/logging/__init__.py similarity index 100% rename from scaler/utility/logging/__init__.py rename to src/scaler/utility/logging/__init__.py diff --git a/scaler/utility/logging/decorators.py b/src/scaler/utility/logging/decorators.py similarity index 100% rename from scaler/utility/logging/decorators.py rename to src/scaler/utility/logging/decorators.py diff --git a/scaler/utility/logging/scoped_logger.py b/src/scaler/utility/logging/scoped_logger.py similarity index 100% rename from scaler/utility/logging/scoped_logger.py rename to src/scaler/utility/logging/scoped_logger.py diff --git a/scaler/utility/logging/utility.py b/src/scaler/utility/logging/utility.py similarity index 100% rename from scaler/utility/logging/utility.py rename to src/scaler/utility/logging/utility.py diff --git a/scaler/utility/many_to_many_dict.py b/src/scaler/utility/many_to_many_dict.py similarity index 100% rename from scaler/utility/many_to_many_dict.py rename to src/scaler/utility/many_to_many_dict.py diff --git a/scaler/utility/metadata/__init__.py b/src/scaler/utility/metadata/__init__.py similarity index 100% rename from scaler/utility/metadata/__init__.py rename to src/scaler/utility/metadata/__init__.py diff --git a/scaler/utility/metadata/profile_result.py b/src/scaler/utility/metadata/profile_result.py similarity index 100% rename from scaler/utility/metadata/profile_result.py rename to src/scaler/utility/metadata/profile_result.py diff --git a/scaler/utility/metadata/task_flags.py b/src/scaler/utility/metadata/task_flags.py similarity index 100% rename from scaler/utility/metadata/task_flags.py rename to src/scaler/utility/metadata/task_flags.py diff --git a/scaler/utility/mixins.py b/src/scaler/utility/mixins.py similarity index 100% rename from scaler/utility/mixins.py rename to src/scaler/utility/mixins.py diff --git a/scaler/utility/network_util.py b/src/scaler/utility/network_util.py similarity index 100% rename from scaler/utility/network_util.py rename to src/scaler/utility/network_util.py diff --git a/scaler/utility/one_to_many_dict.py b/src/scaler/utility/one_to_many_dict.py similarity index 100% rename from scaler/utility/one_to_many_dict.py rename to src/scaler/utility/one_to_many_dict.py diff --git a/scaler/utility/queues/__init__.py b/src/scaler/utility/queues/__init__.py similarity index 100% rename from scaler/utility/queues/__init__.py rename to src/scaler/utility/queues/__init__.py diff --git a/scaler/utility/queues/async_indexed_queue.py b/src/scaler/utility/queues/async_indexed_queue.py similarity index 100% rename from scaler/utility/queues/async_indexed_queue.py rename to src/scaler/utility/queues/async_indexed_queue.py diff --git a/scaler/utility/queues/async_priority_queue.py b/src/scaler/utility/queues/async_priority_queue.py similarity index 100% rename from scaler/utility/queues/async_priority_queue.py rename to src/scaler/utility/queues/async_priority_queue.py diff --git a/scaler/utility/queues/async_sorted_priority_queue.py b/src/scaler/utility/queues/async_sorted_priority_queue.py similarity index 100% rename from scaler/utility/queues/async_sorted_priority_queue.py rename to src/scaler/utility/queues/async_sorted_priority_queue.py diff --git a/scaler/utility/queues/indexed_queue.py b/src/scaler/utility/queues/indexed_queue.py similarity index 100% rename from scaler/utility/queues/indexed_queue.py rename to src/scaler/utility/queues/indexed_queue.py diff --git a/scaler/utility/serialization.py b/src/scaler/utility/serialization.py similarity index 100% rename from scaler/utility/serialization.py rename to src/scaler/utility/serialization.py diff --git a/scaler/version.txt b/src/scaler/version.txt similarity index 100% rename from scaler/version.txt rename to src/scaler/version.txt diff --git a/scaler/worker/__init__.py b/src/scaler/worker/__init__.py similarity index 100% rename from scaler/worker/__init__.py rename to src/scaler/worker/__init__.py diff --git a/scaler/worker/agent/__init__.py b/src/scaler/worker/agent/__init__.py similarity index 100% rename from scaler/worker/agent/__init__.py rename to src/scaler/worker/agent/__init__.py diff --git a/scaler/worker/agent/heartbeat_manager.py b/src/scaler/worker/agent/heartbeat_manager.py similarity index 100% rename from scaler/worker/agent/heartbeat_manager.py rename to src/scaler/worker/agent/heartbeat_manager.py diff --git a/scaler/worker/agent/mixins.py b/src/scaler/worker/agent/mixins.py similarity index 100% rename from scaler/worker/agent/mixins.py rename to src/scaler/worker/agent/mixins.py diff --git a/scaler/worker/agent/processor/__init__.py b/src/scaler/worker/agent/processor/__init__.py similarity index 100% rename from scaler/worker/agent/processor/__init__.py rename to src/scaler/worker/agent/processor/__init__.py diff --git a/scaler/worker/agent/processor/object_cache.py b/src/scaler/worker/agent/processor/object_cache.py similarity index 100% rename from scaler/worker/agent/processor/object_cache.py rename to src/scaler/worker/agent/processor/object_cache.py diff --git a/scaler/worker/agent/processor/processor.py b/src/scaler/worker/agent/processor/processor.py similarity index 100% rename from scaler/worker/agent/processor/processor.py rename to src/scaler/worker/agent/processor/processor.py diff --git a/scaler/worker/agent/processor/streaming_buffer.py b/src/scaler/worker/agent/processor/streaming_buffer.py similarity index 100% rename from scaler/worker/agent/processor/streaming_buffer.py rename to src/scaler/worker/agent/processor/streaming_buffer.py diff --git a/scaler/worker/agent/processor_holder.py b/src/scaler/worker/agent/processor_holder.py similarity index 100% rename from scaler/worker/agent/processor_holder.py rename to src/scaler/worker/agent/processor_holder.py diff --git a/scaler/worker/agent/processor_manager.py b/src/scaler/worker/agent/processor_manager.py similarity index 100% rename from scaler/worker/agent/processor_manager.py rename to src/scaler/worker/agent/processor_manager.py diff --git a/scaler/worker/agent/profiling_manager.py b/src/scaler/worker/agent/profiling_manager.py similarity index 100% rename from scaler/worker/agent/profiling_manager.py rename to src/scaler/worker/agent/profiling_manager.py diff --git a/scaler/worker/agent/task_manager.py b/src/scaler/worker/agent/task_manager.py similarity index 100% rename from scaler/worker/agent/task_manager.py rename to src/scaler/worker/agent/task_manager.py diff --git a/scaler/worker/agent/timeout_manager.py b/src/scaler/worker/agent/timeout_manager.py similarity index 100% rename from scaler/worker/agent/timeout_manager.py rename to src/scaler/worker/agent/timeout_manager.py diff --git a/scaler/worker/preload.py b/src/scaler/worker/preload.py similarity index 100% rename from scaler/worker/preload.py rename to src/scaler/worker/preload.py diff --git a/scaler/worker/worker.py b/src/scaler/worker/worker.py similarity index 100% rename from scaler/worker/worker.py rename to src/scaler/worker/worker.py diff --git a/scaler/worker_adapter/__init__.py b/src/scaler/worker_adapter/__init__.py similarity index 100% rename from scaler/worker_adapter/__init__.py rename to src/scaler/worker_adapter/__init__.py diff --git a/scaler/worker_adapter/native.py b/src/scaler/worker_adapter/native.py similarity index 100% rename from scaler/worker_adapter/native.py rename to src/scaler/worker_adapter/native.py diff --git a/scaler/worker_adapter/symphony/__init__.py b/src/scaler/worker_adapter/symphony/__init__.py similarity index 100% rename from scaler/worker_adapter/symphony/__init__.py rename to src/scaler/worker_adapter/symphony/__init__.py diff --git a/scaler/worker_adapter/symphony/callback.py b/src/scaler/worker_adapter/symphony/callback.py similarity index 100% rename from scaler/worker_adapter/symphony/callback.py rename to src/scaler/worker_adapter/symphony/callback.py diff --git a/scaler/worker_adapter/symphony/heartbeat_manager.py b/src/scaler/worker_adapter/symphony/heartbeat_manager.py similarity index 100% rename from scaler/worker_adapter/symphony/heartbeat_manager.py rename to src/scaler/worker_adapter/symphony/heartbeat_manager.py diff --git a/scaler/worker_adapter/symphony/message.py b/src/scaler/worker_adapter/symphony/message.py similarity index 100% rename from scaler/worker_adapter/symphony/message.py rename to src/scaler/worker_adapter/symphony/message.py diff --git a/scaler/worker_adapter/symphony/task_manager.py b/src/scaler/worker_adapter/symphony/task_manager.py similarity index 100% rename from scaler/worker_adapter/symphony/task_manager.py rename to src/scaler/worker_adapter/symphony/task_manager.py diff --git a/scaler/worker_adapter/symphony/worker.py b/src/scaler/worker_adapter/symphony/worker.py similarity index 100% rename from scaler/worker_adapter/symphony/worker.py rename to src/scaler/worker_adapter/symphony/worker.py diff --git a/scaler/worker_adapter/symphony/worker_adapter.py b/src/scaler/worker_adapter/symphony/worker_adapter.py similarity index 100% rename from scaler/worker_adapter/symphony/worker_adapter.py rename to src/scaler/worker_adapter/symphony/worker_adapter.py diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3fe975515..365075f4b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,7 +37,4 @@ endfunction() if(LINUX OR APPLE) # Add the directory for the C++ tests. add_subdirectory(cpp) - - # Add the new directory for io tests. - add_subdirectory(io/ymq) endif() diff --git a/tests/client/__init__.py b/tests/client/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_client.py b/tests/client/test_client.py similarity index 97% rename from tests/test_client.py rename to tests/client/test_client.py index 853300e6b..7a6b05fb4 100644 --- a/tests/test_client.py +++ b/tests/client/test_client.py @@ -11,7 +11,7 @@ from scaler.utility.logging.scoped_logger import ScopedLogger from scaler.utility.logging.utility import setup_logger from scaler.worker.preload import PreloadSpecError, _parse_preload_spec, execute_preload -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name def noop(sec: int): @@ -34,7 +34,7 @@ def raise_exception(foo: int): def get_preloaded_value(): """Function that retrieves value set by preload""" - from tests.utility import get_global_value + from tests.utility.utility import get_global_value return get_global_value() @@ -364,7 +364,9 @@ def _create_preload_cluster(self, preload: str, logging_paths: tuple = ("/dev/st return preload_cluster def test_preload_success(self): - preload_cluster = self._create_preload_cluster(preload="tests.utility:setup_global_value('test_preload_value')") + preload_cluster = self._create_preload_cluster( + preload="tests.utility.utility:setup_global_value('test_preload_value')" + ) try: preload_cluster.start() @@ -390,7 +392,7 @@ def test_preload_failure(self): try: preload_cluster = self._create_preload_cluster( - preload="tests.utility:failing_preload()", logging_paths=(log_path,) + preload="tests.utility.utility:failing_preload()", logging_paths=(log_path,) ) try: @@ -406,7 +408,7 @@ def test_preload_failure(self): processor_log_content += f.read() # Verify that the preload failure was logged properly - self.assertIn("preloading: tests.utility:failing_preload with args", processor_log_content) + self.assertIn("preloading: tests.utility.utility:failing_preload with args", processor_log_content) # If we reach here without any other exceptions, the test is successful finally: diff --git a/tests/test_future.py b/tests/client/test_future.py similarity index 99% rename from tests/test_future.py rename to tests/client/test_future.py index 9cb847b65..6fb8d0825 100644 --- a/tests/test_future.py +++ b/tests/client/test_future.py @@ -17,7 +17,7 @@ from scaler.utility.identifiers import ClientID, ObjectID, TaskID from scaler.utility.logging.utility import setup_logger from scaler.utility.network_util import get_available_tcp_port -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name def noop_sleep(sec: int): diff --git a/tests/cluster/__init__.py b/tests/cluster/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_cluster.py b/tests/cluster/test_cluster.py similarity index 94% rename from tests/test_cluster.py rename to tests/cluster/test_cluster.py index e1500b550..482cadf98 100644 --- a/tests/test_cluster.py +++ b/tests/cluster/test_cluster.py @@ -3,7 +3,7 @@ from scaler import Client, SchedulerClusterCombo from scaler.utility.logging.utility import setup_logger from scaler.utility.network_util import get_available_tcp_port -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name class TestCluster(unittest.TestCase): diff --git a/tests/test_cluster_config.py b/tests/cluster/test_cluster_config.py similarity index 100% rename from tests/test_cluster_config.py rename to tests/cluster/test_cluster_config.py diff --git a/tests/test_cluster_disconnect.py b/tests/cluster/test_cluster_disconnect.py similarity index 97% rename from tests/test_cluster_disconnect.py rename to tests/cluster/test_cluster_disconnect.py index 1dffb3297..b5bf5ac23 100644 --- a/tests/test_cluster_disconnect.py +++ b/tests/cluster/test_cluster_disconnect.py @@ -5,7 +5,7 @@ from scaler import Client, Cluster, SchedulerClusterCombo from scaler.config.defaults import DEFAULT_LOGGING_PATHS from scaler.utility.logging.utility import setup_logger -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name def noop_sleep(sec: int): diff --git a/tests/config/__init__.py b/tests/config/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_config_types.py b/tests/config/test_config_types.py similarity index 100% rename from tests/test_config_types.py rename to tests/config/test_config_types.py diff --git a/tests/core/__init__.py b/tests/core/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_async_indexed_queue.py b/tests/core/test_async_indexed_queue.py similarity index 96% rename from tests/test_async_indexed_queue.py rename to tests/core/test_async_indexed_queue.py index f51ed242e..876bfca2d 100644 --- a/tests/test_async_indexed_queue.py +++ b/tests/core/test_async_indexed_queue.py @@ -3,7 +3,7 @@ from scaler.utility.logging.utility import setup_logger from scaler.utility.queues.async_indexed_queue import AsyncIndexedQueue -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name class TestAsyncIndexedQueue(unittest.TestCase): diff --git a/tests/test_async_priority_queue.py b/tests/core/test_async_priority_queue.py similarity index 96% rename from tests/test_async_priority_queue.py rename to tests/core/test_async_priority_queue.py index c5f7d07ff..55bd232e5 100644 --- a/tests/test_async_priority_queue.py +++ b/tests/core/test_async_priority_queue.py @@ -3,7 +3,7 @@ from scaler.utility.logging.utility import setup_logger from scaler.utility.queues.async_priority_queue import AsyncPriorityQueue -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name class TestAsyncPriorityQueue(unittest.TestCase): diff --git a/tests/test_async_sorted_priority_queue.py b/tests/core/test_async_sorted_priority_queue.py similarity index 96% rename from tests/test_async_sorted_priority_queue.py rename to tests/core/test_async_sorted_priority_queue.py index 4eeba53b7..d5987a732 100644 --- a/tests/test_async_sorted_priority_queue.py +++ b/tests/core/test_async_sorted_priority_queue.py @@ -3,7 +3,7 @@ from scaler.utility.logging.utility import setup_logger from scaler.utility.queues.async_sorted_priority_queue import AsyncSortedPriorityQueue -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name class TestSortedPriorityQueue(unittest.TestCase): diff --git a/tests/test_death_timeout.py b/tests/core/test_death_timeout.py similarity index 98% rename from tests/test_death_timeout.py rename to tests/core/test_death_timeout.py index 1325ee58f..62e1c46b1 100644 --- a/tests/test_death_timeout.py +++ b/tests/core/test_death_timeout.py @@ -16,7 +16,7 @@ from scaler.config.types.zmq import ZMQConfig from scaler.utility.logging.utility import setup_logger from scaler.utility.network_util import get_available_tcp_port -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name # This is a manual test because it can loop infinitely if it fails diff --git a/tests/test_indexed_queue.py b/tests/core/test_indexed_queue.py similarity index 94% rename from tests/test_indexed_queue.py rename to tests/core/test_indexed_queue.py index 0460fb54b..1ff7e6050 100644 --- a/tests/test_indexed_queue.py +++ b/tests/core/test_indexed_queue.py @@ -2,7 +2,7 @@ from scaler.utility.logging.utility import setup_logger from scaler.utility.queues.indexed_queue import IndexedQueue -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name class TestIndexedQueue(unittest.TestCase): diff --git a/tests/test_profiling.py b/tests/core/test_profiling.py similarity index 97% rename from tests/test_profiling.py rename to tests/core/test_profiling.py index 778306405..059c5a100 100644 --- a/tests/test_profiling.py +++ b/tests/core/test_profiling.py @@ -4,7 +4,7 @@ from scaler import Client, SchedulerClusterCombo from scaler.utility.logging.utility import setup_logger from scaler.utility.network_util import get_available_tcp_port -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name def dummy(n: int): diff --git a/tests/test_protected.py b/tests/core/test_protected.py similarity index 96% rename from tests/test_protected.py rename to tests/core/test_protected.py index 570647650..0333b70a9 100644 --- a/tests/test_protected.py +++ b/tests/core/test_protected.py @@ -4,7 +4,7 @@ from scaler import Client, SchedulerClusterCombo from scaler.utility.logging.utility import setup_logger from scaler.utility.network_util import get_available_tcp_port -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name class TestProtected(unittest.TestCase): diff --git a/tests/io/ymq/test_logging.cpp b/tests/cpp/ymq/test_logging.cpp similarity index 100% rename from tests/io/ymq/test_logging.cpp rename to tests/cpp/ymq/test_logging.cpp diff --git a/tests/graph/__init__.py b/tests/graph/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_graph.py b/tests/graph/test_graph.py similarity index 99% rename from tests/test_graph.py rename to tests/graph/test_graph.py index a1aa65683..b4b3cb1d8 100644 --- a/tests/test_graph.py +++ b/tests/graph/test_graph.py @@ -8,7 +8,7 @@ from scaler.utility.graph.optimization import cull_graph from scaler.utility.logging.scoped_logger import ScopedLogger from scaler.utility.logging.utility import setup_logger -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name def inc(i): diff --git a/tests/io/ymq/CMakeLists.txt b/tests/io/ymq/CMakeLists.txt deleted file mode 100644 index e1001a1fe..000000000 --- a/tests/io/ymq/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_test_executable(test_logging test_logging.cpp) \ No newline at end of file diff --git a/tests/object_storage/__init__.py b/tests/object_storage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_object_usage.py b/tests/object_storage/test_object_usage.py similarity index 96% rename from tests/test_object_usage.py rename to tests/object_storage/test_object_usage.py index cbcb5921c..a8d647bd0 100644 --- a/tests/test_object_usage.py +++ b/tests/object_storage/test_object_usage.py @@ -3,7 +3,7 @@ from scaler.scheduler.object_usage.object_tracker import ObjectTracker, ObjectUsage from scaler.utility.logging.utility import setup_logger -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name @dataclasses.dataclass diff --git a/tests/scheduler/__init__.py b/tests/scheduler/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_balance.py b/tests/scheduler/test_balance.py similarity index 97% rename from tests/test_balance.py rename to tests/scheduler/test_balance.py index 5c734273e..6d5c7a0a2 100644 --- a/tests/test_balance.py +++ b/tests/scheduler/test_balance.py @@ -6,7 +6,7 @@ from scaler.config.defaults import DEFAULT_LOAD_BALANCE_SECONDS from scaler.utility.logging.utility import setup_logger from scaler.utility.network_util import get_available_tcp_port -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name def sleep_and_return_pid(sec: int): diff --git a/tests/test_capabilities.py b/tests/scheduler/test_capabilities.py similarity index 98% rename from tests/test_capabilities.py rename to tests/scheduler/test_capabilities.py index 30ea20cae..b2d07fca5 100644 --- a/tests/test_capabilities.py +++ b/tests/scheduler/test_capabilities.py @@ -4,7 +4,7 @@ from scaler import Client, Cluster, SchedulerClusterCombo from scaler.scheduler.allocate_policy.allocate_policy import AllocatePolicy from scaler.utility.logging.utility import setup_logger -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name class TestCapabilities(unittest.TestCase): diff --git a/tests/test_capability_allocate_policy.py b/tests/scheduler/test_capability_allocate_policy.py similarity index 99% rename from tests/test_capability_allocate_policy.py rename to tests/scheduler/test_capability_allocate_policy.py index 8aaca5bde..c9eca802d 100644 --- a/tests/test_capability_allocate_policy.py +++ b/tests/scheduler/test_capability_allocate_policy.py @@ -5,7 +5,7 @@ from scaler.scheduler.allocate_policy.capability_allocate_policy import CapabilityAllocatePolicy from scaler.utility.identifiers import ClientID, TaskID, WorkerID from scaler.utility.logging.utility import setup_logger -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name MAX_TASKS_PER_WORKER = 10 diff --git a/tests/test_scaling.py b/tests/scheduler/test_scaling.py similarity index 98% rename from tests/test_scaling.py rename to tests/scheduler/test_scaling.py index cb08715eb..8dd388dd7 100644 --- a/tests/test_scaling.py +++ b/tests/scheduler/test_scaling.py @@ -30,7 +30,7 @@ from scaler.utility.logging.utility import setup_logger from scaler.utility.network_util import get_available_tcp_port from scaler.worker_adapter.native import NativeWorkerAdapter -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name def _run_native_worker_adapter(address: str, webhook_port: int) -> None: diff --git a/tests/test_scheduler_config.py b/tests/scheduler/test_scheduler_config.py similarity index 100% rename from tests/test_scheduler_config.py rename to tests/scheduler/test_scheduler_config.py diff --git a/tests/serializer/__init__.py b/tests/serializer/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_serializer.py b/tests/serializer/test_serializer.py similarity index 98% rename from tests/test_serializer.py rename to tests/serializer/test_serializer.py index 840556219..88fa09e54 100644 --- a/tests/test_serializer.py +++ b/tests/serializer/test_serializer.py @@ -10,7 +10,7 @@ from scaler.utility.logging.scoped_logger import ScopedLogger from scaler.utility.logging.utility import setup_logger from scaler.utility.network_util import get_available_tcp_port -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name def noop(sec: int): diff --git a/tests/task/__init__.py b/tests/task/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_nested_task.py b/tests/task/test_nested_task.py similarity index 98% rename from tests/test_nested_task.py rename to tests/task/test_nested_task.py index 0a427c07c..e4e4959a5 100644 --- a/tests/test_nested_task.py +++ b/tests/task/test_nested_task.py @@ -2,7 +2,7 @@ from scaler import Client, SchedulerClusterCombo from scaler.utility.logging.utility import setup_logger -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name N_TASKS = 30 N_WORKERS = 3 diff --git a/tests/ui/__init__.py b/tests/ui/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_ui.py b/tests/ui/test_ui.py similarity index 97% rename from tests/test_ui.py rename to tests/ui/test_ui.py index 6734763c1..25bff9999 100644 --- a/tests/test_ui.py +++ b/tests/ui/test_ui.py @@ -6,7 +6,7 @@ from scaler.utility.logging.scoped_logger import ScopedLogger from scaler.utility.logging.utility import setup_logger from scaler.utility.network_util import get_available_tcp_port -from tests.utility import logging_test_name +from tests.utility.utility import logging_test_name def noop(sec: int): diff --git a/tests/utility/__init__.py b/tests/utility/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/utility.py b/tests/utility/utility.py similarity index 100% rename from tests/utility.py rename to tests/utility/utility.py