Skip to content
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

Updated dependencies & Flattened folder structure #123

Merged
merged 11 commits into from
Jan 14, 2024
Merged
7 changes: 7 additions & 0 deletions .github/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.codecov.com/docs/common-recipe-list
comment:
require_changes: true

# https://docs.codecov.com/docs/ignoring-paths
ignore:
- "deep_causality/examples" # ignore folders and all its contents
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[workspace]
resolver = "2"
members = [
"deep_causality/examples/*",
"dcl_data_structures",
"ultragraph",
"deep_causality",
"deep_causality/examples/*",
"deep_causality_macros",
"ultragraph",
]


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Docs:
Code:

* [Benchmarks](deep_causality/benches/benchmarks)
* [Example code](deep_causality/examples)
* [Example code](deep_causality_examples)
* [Tests](deep_causality/tests)

## 🛠️ Cargo & Make
Expand Down
6 changes: 3 additions & 3 deletions deep_causality/examples/ctx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ deep_causality = "0.6.2"
# chrono default-features = false mitigates "RUSTSEC-2020-0071".
# See https://rustsec.org/advisories/RUSTSEC-2020-0071.html
chrono = { version = "0.4", default-features = false , features = ["serde", "clock"] }
parquet = "49"
parquet = "50.0.0"
petgraph = "0.6"
# default-features = false mitigates a warning of a yanked sub-sub dependency
rust_decimal = { version = "1.32", default-features = false, features = ["serde"] }
serde = { version = "1.0.190", features = ["derive"] }
rust_decimal = { version = "1", default-features = false, features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
2 changes: 1 addition & 1 deletion deep_causality/examples/ctx/src/io/file/parquet_2_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

use chrono::{DateTime, TimeZone, Utc};
use parquet::record::{Row, RowAccessor};
use rust_decimal::prelude::FromPrimitive;
use rust_decimal::Decimal;
use rust_decimal::prelude::FromPrimitive;

use crate::types::data_symbol::DataSymbol;
use crate::types::date_time_bar::DateTimeBar;
Expand Down
2 changes: 1 addition & 1 deletion deep_causality/examples/ctx/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use deep_causality::prelude::{ContextuableGraph, Identifiable, TimeScale};

use crate::model::get_main_causaloid;
use crate::utils;
use crate::workflow::build_model::build_model;
use crate::workflow::{build_time_data_context, load_data};
use crate::workflow::build_model::build_model;

pub fn run() {
// Determines the maximum level of time resolution in the context hypergraph.
Expand Down
2 changes: 1 addition & 1 deletion deep_causality/examples/starter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "starter"
name = "example-starter"
version = "0.1.0"
edition = "2021"
rust-version = "1.65"
Expand Down
4 changes: 4 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ install:
@source scripts/install_deps.sh


.PHONY: release
release:
@source scripts/release.sh

.PHONY: start
start:
@source scripts/start.sh
Expand Down
5 changes: 4 additions & 1 deletion scripts/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ set -o errexit
set -o nounset
set -o pipefail

command cargo bench
#
# https://users.rust-lang.org/t/how-to-best-ensure-target-cpu-native/53167

RUSTFLAGS='-C target-cpu=native' cargo bench
12 changes: 12 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: MIT
# Copyright (c) "2024" . The DeepCausality Authors. All Rights Reserved.

# bin/bash
set -o errexit
set -o nounset
set -o pipefail

#
# https://users.rust-lang.org/t/how-to-best-ensure-target-cpu-native/53167
# Ensure you run this script on the sane CPU type as the production target.
RUSTFLAGS='-C target-cpu=native' cargo build --release
7 changes: 5 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ set -o errexit
set -o nounset
set -o pipefail

#command cargo test --doc

# https://nexte.st/book/installing-from-source.html
# cargo install cargo-nextest --locked
command cargo nextest run

RUSTFLAGS='-C target-cpu=native' cargo test --doc --release

# https://llogiq.github.io/2017/06/01/perf-pitfalls.html
RUSTFLAGS='-C target-cpu=native' cargo nextest run --release
Loading