Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate the docstring format of the main function #8

Open
leoporoli opened this issue Jan 15, 2024 · 0 comments
Open

Validate the docstring format of the main function #8

leoporoli opened this issue Jan 15, 2024 · 0 comments
Assignees

Comments

@leoporoli
Copy link
Collaborator

Now when a user adds a new package to the catalog there is no way to detect that the docstring is not valid (for instance it doesn't have parameterized dics) and the package is in the catalog file but it is not shown in the catalog site because the indexer fails when it tries to parse de function docstring.

Note: Reuse the validation in the indexer.

Update the catalog documentation describing this validation.

This is the Polkadot example of a not valid docstring
`def run(plan, chain_type = "local", relaychain = None, parachains = None, explorer = False):
"""
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.
    relaychain (dict): A dict containing data for relay chain config.
        - name (str): Name of relay chain.
        - node (dict): A dict of node details.
            - name (str): Name of node.
            - node_type (str): 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.
        - node (dict): A dict of node details.
            - name (str): Name of node.
            - node_type (str): 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.

Returns:
    dict: Service details containing information about relay chains, parachains, and Prometheus.
"""
service_details = run_polkadot_setup(plan, chain_type, relaychain, parachains, explorer)
return service_details`
@leoporoli leoporoli self-assigned this Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant