From 09a11feb8a1932d64aa584f022473c3f413227d7 Mon Sep 17 00:00:00 2001 From: Shanith K K Date: Tue, 16 Jan 2024 00:20:25 +0530 Subject: [PATCH] fix: doc-string in package --- chopsticks/chopstick.star | 5 ++--- main.star | 30 ++++++++++++++---------------- package_io/build-spec.star | 16 +++++++--------- package_io/chopsticks.star | 4 ++-- package_io/polkadot_js_app.star | 3 +-- parachain/node_setup.star | 17 +++++++---------- parachain/parachain.star | 13 +++++-------- relaychain/relay-chain.star | 12 ++++-------- 8 files changed, 42 insertions(+), 58 deletions(-) diff --git a/chopsticks/chopstick.star b/chopsticks/chopstick.star index 47e0ba7..63610f2 100644 --- a/chopsticks/chopstick.star +++ b/chopsticks/chopstick.star @@ -29,7 +29,7 @@ def run_chopsticks_parachain(plan, para_chain): Args: plan: The Kurtosis plan. - para_chain (str): The parachain to configure for the chopstick network. + para_chain (string): The parachain to configure for the chopstick network. """ service_config = ServiceConfig( @@ -53,8 +53,7 @@ def run_chopsticks_xcm(plan, relay_chain, para_chains): Set up a service for the chopstick network with cross-chain messaging (xcm) support with give relachain and parachains. Args: - plan: The Kurtosis plan. - relay_chain (str): The relay chain for cross-chain messaging. + relay_chain (string): The relay chain for cross-chain messaging. para_chains (list): List of parachains to include in the network. """ diff --git a/main.star b/main.star index 3c22ff4..25396b1 100644 --- a/main.star +++ b/main.star @@ -12,19 +12,18 @@ def run(plan, chain_type = "local", relaychain = None, parachains = None, explor Main function to run the Polkadot relay and parachain setup. Args: - plan (object): The Kurtosis plan object for orchestrating the test. - chain_type (str): The type of chain (local, testnet or mainnet). Default is local. + chain_type (string): The type of chain (local, testnet or mainnet). Default is local. relaychain (dict): A dict containing data for relay chain config. - - name (str): Name of relay chain. + - name (string): Name of relay chain. - node (dict): A dict of node details. - - name (str): Name of node. - - node_type (str): Type of node. + - name (string): Name of node. + - node_type (string): Type of node. - prometheus (bool): Boolean value to enable metrics for a given node. parachains (list): A list containing data for para chain config. Each item in the list has the following: - - name (str): Name of para chain. + - name (string): Name of para chain. - node (dict): A dict of node details. - - name (str): Name of node. - - node_type (str): Type of node. + - name (string): Name of node. + - node_type (string): Type of node. - prometheus (bool): Boolean value to enable metrics for a given node. explorer (bool): A boolean value indicating whether to enable polkadot js explorer or not. @@ -40,19 +39,18 @@ def run_polkadot_setup(plan, chain_type, relaychain, parachains, explorer): Main function to run the Polkadot relay and parachain setup. Args: - plan (object): The Kurtosis plan object for orchestrating the test. - chain_type (str): The type of chain (local, testnet or mainnet). Default is local. + chain_type (string): The type of chain (local, testnet or mainnet). Default is local. relaychain (dict): A dict containing data for relay chain config. - - name (str): Name of relay chain. + - name (string): Name of relay chain. - node (dict): A dict of node details. - - name (str): Name of node. - - node_type (str): Type of node. + - name (string): Name of node. + - node_type (string): Type of node. - prometheus (bool): Boolean value to enable metrics for a given node. parachains (list): A list containing data for para chain config. Each item in the list has the following: - - name (str): Name of para chain. + - name (string): Name of para chain. - node (dict): A dict of node details. - - name (str): Name of node. - - node_type (str): Type of node. + - name (string): Name of node. + - node_type (string): Type of node. - prometheus (bool): Boolean value to enable metrics for a given node. explorer (bool): A boolean value indicating whether to enable polkadot js explorer or not. diff --git a/package_io/build-spec.star b/package_io/build-spec.star index d3c077a..b41edd0 100644 --- a/package_io/build-spec.star +++ b/package_io/build-spec.star @@ -3,10 +3,9 @@ def create_service_for_build_spec(plan, service_name, image, build_file): """Create a service based on a build specification. Args: - plan (object): The execution plan to add the service to. - service_name (str): Name of the service. - image (str): Docker image for the service. - build_file (str): Path to the build file. + service_name (string): Name of the service. + image (string): Docker image for the service. + build_file (string): Path to the build file. Returns: object: The created service. @@ -32,12 +31,11 @@ def create_edit_and_build_spec(plan, service_name, image, chain_name, command, b """Create, edit, and build a service based on a build specification. Args: - plan (object): The execution plan to add the service to. - service_name (str): Name of the service. - image (str): Docker image for the service. - chain_name (str): Name of the chain. + service_name (string): Name of the service. + image (string): Docker image for the service. + chain_name (string): Name of the chain. command (list): Command to execute inside the Docker container. - build_file (str): Path to the build file. + build_file (string): Path to the build file. Returns: object: The created and built service. diff --git a/package_io/chopsticks.star b/package_io/chopsticks.star index b51da9e..0c45d5a 100644 --- a/package_io/chopsticks.star +++ b/package_io/chopsticks.star @@ -8,7 +8,7 @@ def run_chopsticks_parachain(plan, para_chain): Args: plan: The Kurtosis plan. - para_chain (str): The parachain to configure for the chopstick network. + para_chain (string): The parachain to configure for the chopstick network. """ service_config = ServiceConfig( @@ -31,7 +31,7 @@ def run_chopsticks_xcm(plan, relay_chain, para_chains): Args: plan: The Kurtosis plan. - relay_chain (str): The relay chain for cross-chain messaging. + relay_chain (string): The relay chain for cross-chain messaging. para_chains (list): List of parachains to include in the network. """ diff --git a/package_io/polkadot_js_app.star b/package_io/polkadot_js_app.star index ae55d6e..cd196a3 100644 --- a/package_io/polkadot_js_app.star +++ b/package_io/polkadot_js_app.star @@ -7,8 +7,7 @@ def run_pokadot_js_app(plan, ws_url): """ This function will run the service for polkadot Js App Args: - plan (object): kurtosis plan object1 - ws_url (str): connect to a Polkadot node of given web socket URL + ws_url (string): connect to a Polkadot node of given web socket URL """ service_config = ServiceConfig( image = "jacogr/polkadot-js-apps:latest", diff --git a/parachain/node_setup.star b/parachain/node_setup.star index 502298d..56decac 100644 --- a/parachain/node_setup.star +++ b/parachain/node_setup.star @@ -3,10 +3,9 @@ def run_testnet_node_with_entrypoint(plan, prometheus, image, chain_name, execut Spawn a parachain node with specified configuration with entrypoint. Args: - plan (object): The Kurtosis plan. prometheus (bool): Boolean value to enable metrics for a given node. - image (str): Docker image for the parachain node. - chain_name (str): Name of the parachain. + image (string): Docker image for the parachain node. + chain_name (string): Name of the parachain. execute_command (list): Command to execute inside service. rpc_port (int, optional): The RPC port value. Defaults to None. prometheus_port (int, optional): The Prometheus port value. Defaults to None. @@ -52,10 +51,9 @@ def run_testnet_node_with_command(plan, prometheus, image, chain_name, execute_c Spawn a parachain node with specified configuration with command. Args: - plan (object): The Kurtosis plan. prometheus (bool): Boolean value to enable metrics for a given node. - image (str): Docker image for the parachain node. - chain_name (str): Name of the parachain. + image (string): Docker image for the parachain node. + chain_name (string): Name of the parachain. execute_command (list): Command to execute inside service. rpc_port (int, optional): The RPC port value. Defaults to None. prometheus_port (int, optional): The Prometheus port value. Defaults to None. @@ -101,12 +99,11 @@ def spawn_parachain(plan, prometheus, image, chain_name, execute_command, build_ Spawn a parachain node with specified configuration. Args: - plan (object): The Kurtosis plan. prometheus (bool): Boolean value to enable metrics for a given node. - image (str): Docker image for the parachain node. - chain_name (str): Name of the parachain. + image (string): Docker image for the parachain node. + chain_name (string): Name of the parachain. execute_command (list): Command to execute inside service. - build_file (str): Path to the build spec file. + build_file (string): Path to the build spec file. rpc_port (int, optional): The RPC port value. Defaults to None. prometheus_port (int, optional): The Prometheus port value. Defaults to None. lib2lib_port (int, optional): The lib2lib port value. Defaults to None. diff --git a/parachain/parachain.star b/parachain/parachain.star index 6d56b10..b842868 100644 --- a/parachain/parachain.star +++ b/parachain/parachain.star @@ -10,8 +10,7 @@ def start_local_parachain_node(plan, chain_type, parachain, para_id): Start local parachain nodes based on configuration. Args: - plan (object): The Kurtosis plan. - chain_type (str): The type of chain (local, testnet or mainnet). + chain_type (string): The type of chain (local, testnet or mainnet). parachains (dict): A dict containing data for para chain config. para_id (int): Parachain ID. @@ -76,10 +75,9 @@ def start_nodes(plan, chain_type, parachains, relay_chain_ip): Start multiple parachain nodes. Args: - plan (object): The kurtosis plan. - chain_type (str): The type of chain (local, testnet or mainnet). + chain_type (string): The type of chain (local, testnet or mainnet). parachains (list): A list containing data for para chain config. - relay_chain_ip (str): IP address of the relay chain. + relay_chain_ip (string): IP address of the relay chain. Returns: list: List of dictionaries containing service details of each parachain. @@ -99,9 +97,8 @@ def run_testnet_mainnet(plan, chain_type, relaychain_name, parachain): Run a testnet or mainnet based on configuration. Args: - plan (object): The kurtosis plan. - chain_type (str): The type of chain (local, testnet or mainnet). - relaychain_name (str): The name of relay chain. + chain_type (string): The type of chain (local, testnet or mainnet). + relaychain_name (string): The name of relay chain. parachain (dict): A dict containing data for para chain config. Returns: diff --git a/relaychain/relay-chain.star b/relaychain/relay-chain.star index 1a2d55b..98e1b4c 100644 --- a/relaychain/relay-chain.star +++ b/relaychain/relay-chain.star @@ -6,8 +6,7 @@ def start_relay_chain(plan, chain_type, relaychain): Starts relay chain nodes based on the provided arguments. Args: - plan (object): The Kurtosis plan object for orchestrating the test. - chain_type (str): The type of chain (local, testnet or mainnet). + chain_type (string): The type of chain (local, testnet or mainnet). relaychain (dict): A dict containing data for relay chain config. Returns: @@ -81,8 +80,7 @@ def start_test_main_net_relay_nodes(plan, chain_type, relaychain): Starts testnet/mainnet relay nodes based on the provided arguments. Args: - plan (object): The Kurtosis plan object for orchestrating the test. - chain_type (str): The type of chain (local, testnet or mainnet). + chain_type (string): The type of chain (local, testnet or mainnet). relaychain (dict): A dict containing data for relay chain config. Returns: @@ -98,7 +96,6 @@ def start_relay_chains_local(plan, relaychain): Starts local relay chain nodes based on the provided arguments. Args: - plan (object): The Kurtosis plan object for orchestrating the test. relaychain (dict): A dict containing data for relay chain config. Returns: @@ -143,9 +140,8 @@ def start_relay_chain_local(plan, chain_name, node_name, prometheus, rpc_port = Starts a local relay chain node based on the provided arguments. Args: - plan (object): The Kurtosis plan object for orchestrating the test. - chain_name (str): Name of relay chain. - node_name (str): Name of node. + chain_name (string): Name of relay chain. + node_name (string): Name of node. prometheus (bool): Boolean value to enable metrics for a given node. rpc_port (int, optional): The RPC port value. Defaults to None. prometheus_port (int, optional): The Prometheus port value. Defaults to None.