Skip to content

Commit

Permalink
Merge pull request #123 from marvin-hansen/main
Browse files Browse the repository at this point in the history
Updated dependencies folder structure
  • Loading branch information
marvin-hansen authored Jan 14, 2024
2 parents 3b415c8 + 0485077 commit f3b47ea
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 12 deletions.
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

0 comments on commit f3b47ea

Please sign in to comment.