Skip to content

Commit

Permalink
fix: doc-string in package
Browse files Browse the repository at this point in the history
  • Loading branch information
shanithkk committed Jan 15, 2024
1 parent bcd489f commit 09a11fe
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 58 deletions.
5 changes: 2 additions & 3 deletions chopsticks/chopstick.star
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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.
"""

Expand Down
30 changes: 14 additions & 16 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
16 changes: 7 additions & 9 deletions package_io/build-spec.star
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions package_io/chopsticks.star
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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.
"""

Expand Down
3 changes: 1 addition & 2 deletions package_io/polkadot_js_app.star
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
17 changes: 7 additions & 10 deletions parachain/node_setup.star
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
13 changes: 5 additions & 8 deletions parachain/parachain.star
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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:
Expand Down
12 changes: 4 additions & 8 deletions relaychain/relay-chain.star
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 09a11fe

Please sign in to comment.