Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nivcertora committed Jan 6, 2025
1 parent 9415e04 commit 69891e6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
1 change: 0 additions & 1 deletion Quorum/checks/proposal_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import Quorum.utils.config_loader as ConfigLoader



class CustomerConfig(BaseModel):
customer: str
payload_addresses: list[PayloadAddresses]
Expand Down
34 changes: 30 additions & 4 deletions Quorum/entry_points/implementations/check_proposal_config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import argparse
from typing import Dict, Any
from typing import Any

from Quorum.checks.proposal_check import run_customer_proposal_validation, ProposalConfig
from Quorum.checks.proposal_check import (
run_customer_proposal_validation,
ProposalConfig,
CustomerConfig,
PayloadAddresses
)


def run_config(args: argparse.Namespace) -> None:
Expand All @@ -22,6 +27,27 @@ def run_config(args: argparse.Namespace) -> None:
Raises:
TypeError: If config_data cannot be unpacked into ProposalConfig
"""
config_data: Dict[str, Any] = args.config
prop_config = ProposalConfig(**config_data)
config_data: dict[str, Any] = args.config
customers_config: list[CustomerConfig] = []

for customer_name, chains in config_data.items():
payload_addresses: list[PayloadAddresses] = []

for chain_name, proposals in chains.items():
proposal_addresses = proposals.get("Proposals", [])
payload_addresses.append(
PayloadAddresses(
chain=chain_name,
addresses=proposal_addresses
)
)

customers_config.append(
CustomerConfig(
customer=customer_name,
payload_addresses=payload_addresses
)
)

prop_config = ProposalConfig(customers_config=customers_config)
run_customer_proposal_validation(prop_config)
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20250106.172822.017833
20250106.175028.966856

0 comments on commit 69891e6

Please sign in to comment.