Skip to content

Implement reusable dataset downloder #1002

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Cargo.lock

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

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ members = [
"task_manager",
"hex_assignments",
"aws_local",
]
"dataset_downloader"]

resolver = "2"

[workspace.package]
Expand Down Expand Up @@ -118,6 +119,9 @@ aws-config = "0.51"
aws-sdk-s3 = "0.21"
aws-types = { version = "0.51", features = ["hardcoded-credentials"]}
tempfile = "3"
regex = "1"
async-compression = { version = "0", features = ["tokio", "gzip"] }
Copy link
Preview

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider specifying a more explicit version for async-compression to prevent potential dependency resolution issues.

Suggested change
async-compression = { version = "0", features = ["tokio", "gzip"] }
async-compression = { version = "0.3.8", features = ["tokio", "gzip"] }

Copilot uses AI. Check for mistakes.



[patch.crates-io]
anchor-lang = { git = "https://github.com/madninja/anchor.git", branch = "madninja/const_pubkey" }
Expand Down
2 changes: 1 addition & 1 deletion aws_local/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ use tonic::transport::Uri;
use uuid::Uuid;

pub const AWSLOCAL_ENDPOINT_ENV: &str = "AWSLOCAL_ENDPOINT";
pub const AWSLOCAL_DEFAULT_ENDPOINT: &str = "http://localhost:4566";

pub fn aws_local_default_endpoint() -> String {
const AWSLOCAL_DEFAULT_ENDPOINT: &str = "http://localhost:4566";
env::var(AWSLOCAL_ENDPOINT_ENV).unwrap_or_else(|_| AWSLOCAL_DEFAULT_ENDPOINT.to_string())
}

Expand Down
27 changes: 27 additions & 0 deletions dataset_downloader/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "dataset-downloader"
version = "0.1.0"
authors.workspace = true
license.workspace = true
edition.workspace = true

[dependencies]
sqlx = { workspace = true }
anyhow = { workspace = true }
uuid = { workspace = true }
async-trait = { workspace = true }
regex = { workspace = true }
hextree = { workspace = true }
tokio = { workspace = true }
tokio-util = { workspace = true }
lazy_static = { workspace = true }
tracing = { workspace = true }
chrono = { workspace = true }
futures-util = { workspace = true }
async-compression = { workspace = true }
file-store = { path = "../file_store" }
hex-assignments = { path = "../hex_assignments" }

[dev-dependencies]
aws-local = { path = "../aws_local" }
tempfile = "3"
Loading