Skip to content

Commit

Permalink
refactor engine tests and examples (#895)
Browse files Browse the repository at this point in the history
* refactor
* new example
  • Loading branch information
Autoparallel authored Feb 16, 2024
1 parent b35a617 commit 267c776
Show file tree
Hide file tree
Showing 21 changed files with 275 additions and 459 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ jobs:
run: git submodule update --init --recursive
- name: test
run: cargo test --workspace --all-features
# - name: template example
# run: cargo run --example minter simulate examples/minter/config.toml
# - name: minter example
# run: cargo run --example minter simulate examples/minter/config.toml
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ name = "arbiter"
path = "bin/main.rs"

[[example]]
name = "project"
name = "template"
path = "examples/template/src/main.rs"

[[example]]
name = "minter"
path = "examples/minter/main.rs"


[workspace.dependencies]
# Arbiter local for development
# arbiter-bindings = { path = "arbiter-bindings" }
Expand Down
7 changes: 0 additions & 7 deletions engine/src/examples/minter/agents/mod.rs

This file was deleted.

35 changes: 0 additions & 35 deletions engine/src/examples/minter/agents/token_admin.rs

This file was deleted.

39 changes: 0 additions & 39 deletions engine/src/examples/minter/agents/token_requester.rs

This file was deleted.

5 changes: 0 additions & 5 deletions engine/src/examples/minter/behaviors/mod.rs

This file was deleted.

92 changes: 0 additions & 92 deletions engine/src/examples/minter/mod.rs

This file was deleted.

75 changes: 0 additions & 75 deletions engine/src/examples/minter/token_minter.rs

This file was deleted.

25 changes: 0 additions & 25 deletions engine/src/examples/mod.rs

This file was deleted.

1 change: 0 additions & 1 deletion engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use crate::{errors::ArbiterEngineError, messager::Messager};

pub mod agent;
pub mod errors;
pub mod examples;
pub mod machine;
pub mod messager;
pub mod universe;
Expand Down
2 changes: 1 addition & 1 deletion engine/src/messager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Messager {

/// Returns a [`Messager`] interface connected to the same instance but with
/// the `id` provided.
pub(crate) fn for_agent(&self, id: &str) -> Self {
pub fn for_agent(&self, id: &str) -> Self {
Self {
broadcast_sender: self.broadcast_sender.clone(),
broadcast_receiver: Some(self.broadcast_sender.subscribe()),
Expand Down
Loading

0 comments on commit 267c776

Please sign in to comment.