diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile old mode 100644 new mode 100755 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json old mode 100644 new mode 100755 index 7aa0a93..9c37c5f --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -63,7 +63,9 @@ "christian-kohler.path-intellisense", "Gruntfuggly.todo-tree", "ms-azuretools.vscode-docker", - "redhat.vscode-yaml" + "redhat.vscode-yaml", + "GitHub.copilot", + "GitHub.copilot-chat" ] } } diff --git a/.dockerignore b/.dockerignore old mode 100644 new mode 100755 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/nextest.yml b/.github/workflows/nextest.yml old mode 100644 new mode 100755 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/Cargo.toml b/Cargo.toml index 40c822d..05a6f4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -polars = { version = "0.32", features = [ +polars = { version = "0.35", features = [ "lazy", "strings", "parquet", @@ -16,7 +16,7 @@ axum = "0.6" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" tokio = { version = "1.26", features = ["full"] } -aide = { version = "0.11", features = ["redoc", "axum"] } +aide = { version = "0.12", features = ["redoc", "axum"] } schemars = { version = "0.8", features = ["chrono"] } chrono = { version = "0.4", features = ["serde"] } glob = { version = "0.3" } diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 diff --git a/LICENSE-Apache b/LICENSE-Apache old mode 100644 new mode 100755 diff --git a/LICENSE-MIT b/LICENSE-MIT old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/docker-compose.yml b/docker-compose.yml old mode 100644 new mode 100755 diff --git a/src/main.rs b/src/main.rs index a2efdc5..1f9b076 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,12 +89,15 @@ async fn main() { .api_route( "/ark_holdings", get_with(routes::ark_holdings, |mut o| { - // test description - o = o.id("ARK* ETF Holdings").description(r" - | date ┆ ticker ┆ cusip ┆ company ┆ market_value ┆ shares ┆ share_price ┆ weight │ - │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ - │ date ┆ str ┆ str ┆ str ┆ i64 ┆ f64 ┆ f64 ┆ f64 │ - "); + o = o.id("ARK Holdings").description( + r" +| date | ticker | cusip | company | market_value | shares | share_price | weight | +|------|--------|-------|---------|--------------|--------|-------------|--------| +| date | str | str | str | i64 | f64 | f64 | f64 | + +### Example +`/ark_holdings?ticker=ARKK&start=2023-01-01&end=2023-03-01`", + ); description_date(o) }), ) diff --git a/src/routes/polars_utils.rs b/src/routes/polars_utils.rs index 0b8af1e..1813b12 100644 --- a/src/routes/polars_utils.rs +++ b/src/routes/polars_utils.rs @@ -56,7 +56,7 @@ pub async fn filter_date_range( } #[derive(Serialize, Deserialize, JsonSchema, strum_macros::Display)] -pub enum Ticker { +pub enum TypeTicker { ARKVX, ARKF, ARKG,