diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd0f4ce7..19cf8503 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,4 +16,4 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt - name: Run tests - run: cd carnot && python -m unittest + run: python -m unittest diff --git a/carnot/beaconized_carnot.py b/carnot/beaconized_carnot.py index 3dd1d7f0..1e309b5f 100644 --- a/carnot/beaconized_carnot.py +++ b/carnot/beaconized_carnot.py @@ -1,8 +1,8 @@ from typing import Set -from carnot import Carnot, Block, TimeoutQc, Vote, Event, Send, Quorum -from beacon import * -from overlay import EntropyOverlay +from carnot.carnot import Carnot, Block, TimeoutQc, Vote, Event, Send, Quorum +from carnot.beacon import * +from carnot.overlay import EntropyOverlay @dataclass class BeaconizedBlock(Block): diff --git a/carnot/overlay.py b/carnot/overlay.py index ae517223..d52f2b44 100644 --- a/carnot/overlay.py +++ b/carnot/overlay.py @@ -1,7 +1,7 @@ import random from abc import abstractmethod from typing import Set, Optional, List, Self -from carnot import Overlay, Id, Committee, View +from carnot.carnot import Overlay, Id, Committee, View class EntropyOverlay(Overlay): diff --git a/carnot/test_beacon_verification.py b/carnot/test_beacon_verification.py index 211f014d..e5a5f3da 100644 --- a/carnot/test_beacon_verification.py +++ b/carnot/test_beacon_verification.py @@ -1,7 +1,7 @@ from typing import Tuple from unittest import TestCase -from beacon import * +from carnot.beacon import * from random import randint diff --git a/carnot/test_beaconized_carnot.py b/carnot/test_beaconized_carnot.py index 36ffc57b..9f356ab5 100644 --- a/carnot/test_beaconized_carnot.py +++ b/carnot/test_beaconized_carnot.py @@ -5,11 +5,11 @@ from blspy import PrivateKey -from carnot import Id, Carnot, Block, Overlay, Vote, StandardQc, NewView -from beacon import generate_random_sk, RandomBeacon, NormalMode, RecoveryMode -from beaconized_carnot import BeaconizedCarnot, BeaconizedBlock -from overlay import FlatOverlay, EntropyOverlay -from test_unhappy_path import parents_from_childs +from carnot.carnot import Id, Carnot, Block, Overlay, Vote, StandardQc, NewView +from carnot.beacon import generate_random_sk, RandomBeacon, NormalMode, RecoveryMode +from carnot.beaconized_carnot import BeaconizedCarnot, BeaconizedBlock +from carnot.overlay import FlatOverlay, EntropyOverlay +from carnot.test_unhappy_path import parents_from_childs def gen_node(sk: PrivateKey, overlay: Overlay, entropy: bytes = b""): diff --git a/carnot/test_happy_path.py b/carnot/test_happy_path.py index 11937315..071c84a3 100644 --- a/carnot/test_happy_path.py +++ b/carnot/test_happy_path.py @@ -1,4 +1,4 @@ -from carnot import * +from carnot.carnot import * from unittest import TestCase diff --git a/carnot/test_tree_overlay.py b/carnot/test_tree_overlay.py index a5e51205..19b74ffb 100644 --- a/carnot/test_tree_overlay.py +++ b/carnot/test_tree_overlay.py @@ -1,6 +1,6 @@ from unittest import TestCase -from tree_overlay import CarnotOverlay, CarnotTree +from carnot.tree_overlay import CarnotOverlay, CarnotTree class TestCarnotTree(TestCase): diff --git a/carnot/test_unhappy_path.py b/carnot/test_unhappy_path.py index fa20799b..bb559aba 100644 --- a/carnot/test_unhappy_path.py +++ b/carnot/test_unhappy_path.py @@ -1,4 +1,4 @@ -from carnot import * +from carnot.carnot import * from unittest import TestCase from itertools import chain diff --git a/carnot/tree_overlay.py b/carnot/tree_overlay.py index 186beeff..cf24d8c6 100644 --- a/carnot/tree_overlay.py +++ b/carnot/tree_overlay.py @@ -1,8 +1,8 @@ import itertools from hashlib import blake2b from typing import List, Dict, Tuple, Set, Optional, Self -from carnot import Id, Committee -from overlay import EntropyOverlay +from carnot.carnot import Id, Committee +from carnot.overlay import EntropyOverlay import random