Skip to content

Commit

Permalink
Dispatch period converion from DB, update dependencies (#22)
Browse files Browse the repository at this point in the history
* codegen addition, arrow update

* updated tiberius

* Update mmsdm_core/Cargo.toml

* added from_db_str for dispatch period

* remove dbg

* format

---------

Co-authored-by: Billy Sheppard <billyoptussheppard@gmail.com>
Co-authored-by: Billy Sheppard <39789405+Billy-Sheppard@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 23, 2023
1 parent fabad61 commit 0887b48
Show file tree
Hide file tree
Showing 58 changed files with 173 additions and 75 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down Expand Up @@ -231,12 +231,12 @@ optional = true

[dev-dependencies]
anyhow = "1"
env_logger = "0.9"
env_logger = "0.10.0"
tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", features = ["compat"] }
flate2 = "1"
reqwest = { version = "0.11", features = ["blocking"] }
scraper = "0.12"
scraper = "0.16"
futures = "0.3"
rayon = "1.5"
once_cell = "1.3"
Expand Down
10 changes: 5 additions & 5 deletions codegen/src/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ fn codegen_pk(
}

fn codegen_impl_pk(pdr_report: &pdr::Report, fmtr: &mut codegen::Formatter) -> anyhow::Result<()> {
let mut pk_trait = codegen::Impl::new(&pdr_report.get_rust_pk_name());
let mut pk_trait = codegen::Impl::new(pdr_report.get_rust_pk_name());
pk_trait.impl_trait("mmsdm_core::PrimaryKey");
pk_trait.fmt(fmtr)?;
Ok(())
Expand Down Expand Up @@ -658,7 +658,7 @@ fn codegen_impl_compare_with_row_on_pk(
table: &mms::TablePage,
fmtr: &mut codegen::Formatter,
) -> anyhow::Result<()> {
let mut pk_compare_row_impl = codegen::Impl::new(&pdr_report.get_rust_pk_name());
let mut pk_compare_row_impl = codegen::Impl::new(pdr_report.get_rust_pk_name());
pk_compare_row_impl.impl_trait("mmsdm_core::CompareWithRow");
pk_compare_row_impl.associate_type("Row", pdr_report.get_rust_struct_name());
let mut compare_with_row = codegen::Function::new("compare_with_row");
Expand All @@ -684,7 +684,7 @@ fn codegen_impl_compare_with_pk_on_pk(
table: &mms::TablePage,
fmtr: &mut codegen::Formatter,
) -> anyhow::Result<()> {
let mut pk_compare_pk_impl = codegen::Impl::new(&pdr_report.get_rust_pk_name());
let mut pk_compare_pk_impl = codegen::Impl::new(pdr_report.get_rust_pk_name());
pk_compare_pk_impl.impl_trait("mmsdm_core::CompareWithPrimaryKey");
pk_compare_pk_impl.associate_type("PrimaryKey", pdr_report.get_rust_pk_name());
let mut compare_with_other_pk = codegen::Function::new("compare_with_key");
Expand Down Expand Up @@ -841,7 +841,7 @@ optional = true
default-features = false
[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down Expand Up @@ -923,7 +923,7 @@ pub fn run() -> anyhow::Result<()> {
prepare_data_set_crate(&data_set)?;

let mut fmt_str = String::new();
fmt_str.push_str("use chrono::Datelike as _;\n");
fmt_str.push_str("#[allow(unused_imports)]\nuse chrono::Datelike as _;\n");
let mut fmtr = codegen::Formatter::new(&mut fmt_str);

for (table_key, table) in tables.clone().into_iter() {
Expand Down
2 changes: 1 addition & 1 deletion crates/asoffer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/asoffer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/bids/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/bids/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/billing_config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/billing_config/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/billing_run/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/billing_run/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/demand_forecasts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/demand_forecasts/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/dispatch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/dispatch/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/force_majeure/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/force_majeure/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/gd_instruct/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/gd_instruct/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/generic_constraint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/generic_constraint/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/irauction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/irauction/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/market_config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/market_config/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/market_notice/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/market_notice/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/mcc_dispatch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/mcc_dispatch/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/meter_data/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
1 change: 1 addition & 0 deletions crates/meter_data/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use chrono::Datelike as _;
/// # Summary
///
Expand Down
2 changes: 1 addition & 1 deletion crates/mmsdm_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ optional = true
default-features = false

[dependencies.tiberius]
version = "0.11.3"
version = "0.12.2"
features = ["rust_decimal", "tds73", "chrono"]
default-features = false
optional = true
Expand Down
Loading

0 comments on commit 0887b48

Please sign in to comment.