Skip to content

Commit

Permalink
Rename boosting_oracles to hex_assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
kurotych committed May 9, 2024
1 parent 42494f0 commit c9527e0
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 40 deletions.
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ members = [
"reward_scheduler",
"solana",
"task_manager",
"boosting_oracles",
"hex_assignments",
]
resolver = "2"

Expand Down
4 changes: 2 additions & 2 deletions boosting_oracles/Cargo.toml → hex_assignments/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "boosting-oracles"
name = "hex-assignments"
version = "0.1.0"
description = "Boosting Oracles"
description = "Hex Assignments"
edition.workspace = true
authors.workspace = true
license.workspace = true
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion mobile_verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async-trait = {workspace = true}
retainer = {workspace = true}
uuid = {workspace = true}
task-manager = {path = "../task_manager"}
boosting-oracles = {path = "../boosting_oracles"}
hex-assignments = {path = "../hex_assignments"}
solana-sdk = {workspace = true}

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions mobile_verifier/src/cli/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ use crate::{
telemetry, Settings,
};
use anyhow::Result;
use boosting_oracles;
use chrono::Duration;
use file_store::{
file_sink,
file_upload::{self},
FileStore, FileType,
};
use hex_assignments;

use mobile_config::client::{
entity_client::EntityClient, hex_boosting_client::HexBoostingClient, AuthorizationClient,
Expand Down Expand Up @@ -148,7 +148,7 @@ impl Cmd {
file_upload.clone(),
report_ingest.clone(),
auth_client.clone(),
boosting_oracles::make_hex_boost_data(
hex_assignments::make_hex_boost_data(
&settings.urbanization_data_set,
&settings.footfall_data_set,
&settings.landtype_data_set,
Expand Down
2 changes: 1 addition & 1 deletion mobile_verifier/src/cli/verify_disktree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{collections::HashMap, path::PathBuf};
use hextree::disktree::DiskTreeMap;

use crate::Settings;
use boosting_oracles::{Assignment, Landtype};
use hex_assignments::{Assignment, Landtype};

#[derive(Debug, clap::Args)]
pub struct Cmd {
Expand Down
27 changes: 13 additions & 14 deletions mobile_verifier/src/coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{
heartbeats::{HbType, KeyType, OwnedKeyType},
IsAuthorized, Settings,
};
use boosting_oracles::{BoostedHexAssignments, HexAssignments, HexBoostData};
use hex_assignments::{BoostedHexAssignments, HexAssignments, HexBoostData};

use chrono::{DateTime, Duration, Utc};
use file_store::{
Expand Down Expand Up @@ -121,7 +121,6 @@ impl CoverageDaemon {
.create()
.await?;

// let hex_boost_data = boosting_oracles::make_hex_boost_data(settings, geofence)?;
let coverage_daemon = CoverageDaemon::new(
pool,
auth_client,
Expand Down Expand Up @@ -1097,12 +1096,12 @@ mod test {
use std::str::FromStr;

use super::*;
use boosting_oracles::Assignment;
use chrono::NaiveDate;
use futures::stream::iter;
use hex_assignments::Assignment;
use hextree::Cell;

fn boosting_oracles_assignments_mock() -> HexAssignments {
fn hex_assignments_mock() -> HexAssignments {
HexAssignments {
footfall: Assignment::A,
urbanized: Assignment::A,
Expand Down Expand Up @@ -1143,7 +1142,7 @@ mod test {
points: CoverageRewardPoints {
coverage_points: dec!(400),
boost_multiplier: NonZeroU32::new(1).unwrap(),
hex_assignments: boosting_oracles_assignments_mock(),
hex_assignments: hex_assignments_mock(),
rank: None
},
boosted_hex_info: BoostedHex {
Expand Down Expand Up @@ -1177,7 +1176,7 @@ mod test {
signal_power: 0,
coverage_claim_time,
inserted_at: DateTime::<Utc>::MIN_UTC,
assignments: boosting_oracles_assignments_mock(),
assignments: hex_assignments_mock(),
}
}

Expand Down Expand Up @@ -1259,7 +1258,7 @@ mod test {
points: CoverageRewardPoints {
coverage_points: dec!(400),
boost_multiplier: NonZeroU32::new(1).unwrap(),
hex_assignments: boosting_oracles_assignments_mock(),
hex_assignments: hex_assignments_mock(),
rank: None
},
boosted_hex_info: BoostedHex {
Expand Down Expand Up @@ -1303,7 +1302,7 @@ mod test {
coverage_points: dec!(16),
rank: Some(dec!(1.0)),
boost_multiplier: NonZeroU32::new(1).unwrap(),
hex_assignments: boosting_oracles_assignments_mock(),
hex_assignments: hex_assignments_mock(),
},
boosted_hex_info: BoostedHex {
location: Cell::from_raw(0x8a1fb46622dffff).expect("valid h3 cell"),
Expand All @@ -1317,7 +1316,7 @@ mod test {
coverage_points: dec!(16),
rank: Some(dec!(0.50)),
boost_multiplier: NonZeroU32::new(1).unwrap(),
hex_assignments: boosting_oracles_assignments_mock(),
hex_assignments: hex_assignments_mock(),
},
boosted_hex_info: BoostedHex {
location: Cell::from_raw(0x8a1fb46622dffff).expect("valid h3 cell"),
Expand All @@ -1331,7 +1330,7 @@ mod test {
coverage_points: dec!(16),
rank: Some(dec!(0.25)),
boost_multiplier: NonZeroU32::new(1).unwrap(),
hex_assignments: boosting_oracles_assignments_mock(),
hex_assignments: hex_assignments_mock(),
},
boosted_hex_info: BoostedHex {
location: Cell::from_raw(0x8a1fb46622dffff).expect("valid h3 cell"),
Expand Down Expand Up @@ -1602,7 +1601,7 @@ mod test {
signal_power: 0,
coverage_claim_time: coverage_claim_time.unwrap_or(DateTime::<Utc>::MIN_UTC),
inserted_at: DateTime::<Utc>::MIN_UTC,
assignments: boosting_oracles_assignments_mock(),
assignments: hex_assignments_mock(),
}
}

Expand All @@ -1620,7 +1619,7 @@ mod test {
signal_level: SignalLevel::High,
coverage_claim_time,
inserted_at: DateTime::<Utc>::MIN_UTC,
assignments: boosting_oracles_assignments_mock(),
assignments: hex_assignments_mock(),
}
}

Expand All @@ -1638,7 +1637,7 @@ mod test {
signal_level: SignalLevel::High,
coverage_claim_time,
inserted_at: DateTime::<Utc>::MIN_UTC,
assignments: boosting_oracles_assignments_mock(),
assignments: hex_assignments_mock(),
}
}

Expand All @@ -1656,7 +1655,7 @@ mod test {
signal_level,
coverage_claim_time,
inserted_at: DateTime::<Utc>::MIN_UTC,
assignments: boosting_oracles_assignments_mock(),
assignments: hex_assignments_mock(),
}
}
}
8 changes: 4 additions & 4 deletions mobile_verifier/src/reward_shares.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ mod test {
speedtests_average::SpeedtestAverage,
subscriber_location::SubscriberValidatedLocations,
};
use boosting_oracles::{assignment::HexAssignments, Assignment};
use hex_assignments::{assignment::HexAssignments, Assignment};

use chrono::{Duration, Utc};
use file_store::speedtest::CellSpeedtest;
Expand All @@ -719,7 +719,7 @@ mod test {
use std::collections::HashMap;
use uuid::Uuid;

fn boosting_oracles_assignments_mock() -> HexAssignments {
fn hex_assignments_mock() -> HexAssignments {
HexAssignments {
footfall: Assignment::A,
urbanized: Assignment::A,
Expand Down Expand Up @@ -1015,7 +1015,7 @@ mod test {
signal_power: 0,
coverage_claim_time: DateTime::<Utc>::MIN_UTC,
inserted_at: DateTime::<Utc>::MIN_UTC,
assignments: boosting_oracles_assignments_mock(),
assignments: hex_assignments_mock(),
}]
}

Expand Down Expand Up @@ -1900,7 +1900,7 @@ mod test {
coverage_points: CoverageRewardPoints {
boost_multiplier: NonZeroU32::new(1).unwrap(),
coverage_points: dec!(10.0),
hex_assignments: boosting_oracles_assignments_mock(),
hex_assignments: hex_assignments_mock(),
rank: None,
},
boosted_hex: BoostedHex {
Expand Down
2 changes: 1 addition & 1 deletion mobile_verifier/tests/integrations/boosting_oracles.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::common;
use anyhow::Context;
use boosting_oracles::Assignment;
use chrono::{DateTime, Duration, Utc};
use file_store::{
coverage::RadioHexSignalLevel,
Expand All @@ -13,6 +12,7 @@ use helium_crypto::PublicKeyBinary;
use helium_proto::services::poc_mobile::{
CoverageObjectValidity, OracleBoostingHexAssignment, SignalLevel,
};
use hex_assignments::Assignment;
use mobile_config::boosted_hex_info::BoostedHexes;
use mobile_verifier::{
coverage::{
Expand Down
2 changes: 1 addition & 1 deletion mobile_verifier/tests/integrations/common/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use boosting_oracles::{Assignment, BoostedHexAssignments, HexAssignments};
use chrono::{DateTime, Utc};
use file_store::file_sink::{FileSinkClient, Message as SinkMessage};
use futures::{stream, StreamExt};
Expand All @@ -9,6 +8,7 @@ use helium_proto::{
},
Message,
};
use hex_assignments::{Assignment, BoostedHexAssignments, HexAssignments};
use mobile_config::{
boosted_hex_info::{BoostedHexInfo, BoostedHexInfoStream},
client::{hex_boosting_client::HexBoostingInfoResolver, ClientError},
Expand Down

0 comments on commit c9527e0

Please sign in to comment.