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

[Feat.Req] Config input file and groupings #31

Closed
hopeyen opened this issue Aug 2, 2023 · 0 comments · Fixed by #41
Closed

[Feat.Req] Config input file and groupings #31

hopeyen opened this issue Aug 2, 2023 · 0 comments · Fixed by #41
Labels
p3 Low priority

Comments

@hopeyen
Copy link
Collaborator

hopeyen commented Aug 2, 2023

Problem statement

Currently the configurations are supplied into CLI by providing arguments on the same level. We can utilize input file (with either toml or yaml formats) and groups the arguments appropriately.

Expectation proposal

  • Add functionality to parse an input file if provided, and the inputs should be overwritten by the CLI arguments.
  • Group the arguments for better organization.
    • GraphStack: graph_node_endpoint: String, indexer_address: String, registry_subgraph: String, network_subgraph: String, private_key: Option<String>, mnemonic: Option<String>, ...
    • RadioInfrastructure: graphcast_network: GraphcastNetworkName, topics: Vec<String>, coverage: CoverageLevel, collect_message_duration: i64, slack_token: Option<String>, slack_channel: Option<String>, discord_webhook: Option<String>, telegram_token: Option<String>, telegram_chat_id: Option<i64>, metrics_host: String, metrics_port: Option<u16>, server_host: String, server_port: Option<u16>, persistence_file_path: Option<String>, radio_name: String, filter_protocol: Option<bool>, id_validation: IdentityValidation, topic_update_interval: u64, log_level: String, log_format: LogFormat, ...
    • Waku: waku_host: Option<String>, waku_port: Option<String>, waku_node_key: Option<String>, waku_addr: Option<String>, boot_node_addresses: Vec<String>, waku_log_level: Option<String>, discv5_enrs: Option<Vec<String>>, discv5_port: Option<u16>,
    • Replace checks like Parser::possible_values and Parser::min_values with Arg::value_parser
  • Utilize Waku struct when passing it into GraphcastAgent configurations, which first need an update in the SDK

Alternative considerations

just a nice-to-have

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3 Low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants