sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
46dad7ac18a3e471d2ae6da1ddbddd3cdbf919ebb5b7781d5fd8b537d944a57f
Rust
31,986
1,070
//! # Error handling //! //! This module defines the error handling infrastructure for the frontend. //! //! We use a two-tiered error structure: [InternalError] and [FrontendError]. //! ```text //! ┏ ━ ━ ━ ━ ━ ━ ━ ┓ ┏ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━┓ //! DatafusionError (other library errors) ...
b5a02294a1abe59abf9f4d3ac35e9be5c740f36ef3dbe2fc1a30bdeee51bb23b
Rust
32,181
795
//! Python-facing `DeepNetwork` class: the fluent builder + `predict`/`fit` //! surface over the vectorised backend ([`crate::vectorised`]). //! //! Mirrors the JAX `pyhgf.model.DeepNetwork` API. Layers are declared bottom //! (output) first with `DeepNetwork::add_layer`; `DeepNetwork::predict` runs //! a batched, read...
641ac7f6dfa4ce57b135de5258c4e24625bdbb3ada7d1fdaa7c374683e50035a
Rust
32,324
610
// pub mod account_connection_create_body_request; // pub use self::account_connection_create_body_request::AccountConnectionCreateBodyRequest; pub mod account_connection_detail; pub use self::account_connection_detail::AccountConnectionDetail; pub mod account_connection_detail_response; pub use self::account_connectio...
9e252680fd8b6fbe95ea1f350e529b4967bb53fa1e7f838036acbd308a2b53a0
Rust
32,704
994
use crate::cloud_http_client::{ CloudAuthScheme, build_cloud_api_client as build_shared_cloud_api_client, build_private_api_url, build_retry_client, }; use dbt_cloud_config::ResolvedCloudConfig; use dbt_common::constants::{ DBT_CATALOG_JSON, DBT_DEFAULT_LOG_FILE_NAME, DBT_LOG_DIR_NAME, DBT_MANIFEST_JSON, ...
f76ee0054b23a88d58fce0b7a149e2aafb981721ce823a689fb72666cd2521da
Rust
33,516
833
use std::time::Duration; use dbt_adapter_core::AdapterType; use dbt_adbc::Connection; use dbt_adbc::duration::parse_duration; use dbt_auth::AdapterConfig; #[derive(Debug)] pub(crate) enum BackoffStrategy { /// Quadratic backoff: `attempt * attempt seconds`. /// /// Matches dbt-snowflake (Python)'s `expone...
ebc6ffe96a252b93191d8d6e7eb72514ad2a5d0c668a17aced5d420e633ca2ac
Rust
33,686
824
//! Batch-synchronous sweeps over all samples at once, in a features × samples //! layout: every phase of [`crate::vectorised::network::DeepNet::batch_update`] //! is one `gemm` per layer instead of one `gemv` per layer per sample. //! //! Each sample of a batch starts from the same state template, so the whole //! bat...
c65c60e1743abae6e0fb00868c4813ed15b6fa17e867adc05fc2d7f78efed2fb
Rust
33,864
833
//! Library format types and parsing. //! //! # What a "library type" is //! //! An RNA-seq protocol makes specific promises about how the sequenced reads //! relate to the original RNA molecule, and salmon uses those promises to reject //! placements that could not have arisen. There are three independent facts: //! /...
ba2fc833f71377d32df5ffba96f90cb9f7e41191478cac7e32c746e70ffb983d
Rust
34,192
874
use crate::AdapterEngine; use crate::adapter::adapter_impl::AdapterImpl; use crate::connection::AdapterConnectionFactory; use crate::load_catalogs; use crate::relation::do_create_relation; use crate::sql_types::{TypeOps, make_arrow_field_v2}; use crate::{AdapterResult, errors::AsyncAdapterResult, metadata::*, record_ba...
b966e0c6485a95195779777b72e4188e271abf044c1ebe10137f83af50e0636f
Rust
34,224
879
//! ADBC driver tests //! //! These tests are disabled by default because they require real database //! accounts. //! //! To enable these tests set the `ADBC_DRIVER_TESTS` environment variable //! when building these tests. //! mod tests { use adbc_core::{ error::{Error, Result}, options::{AdbcVer...
231bc54ec73ccad22081049ce518fa03abec39ce8a53a57567c2296967ecdcb9
Rust
34,448
849
//! Fragment-GC bias model (`GCFragModel`). //! //! # The effect being modelled //! //! PCR amplification, which every library prep relies on, does not copy all //! fragments equally well. Fragments that are very GC-rich or very GC-poor //! amplify less efficiently than middling ones, so they end up under-represented /...
0bb9d74e2955795600edbce4c9e7a3d7ec17ae56aa862d04cb4265a1e4fa86e9
Rust
34,460
919
use std::{ borrow::Cow, collections::{BTreeMap, HashMap, HashSet}, path::Path, sync::Arc, time::SystemTime, }; use crate::config::CompilationConfig; use dbt_adapter::{ Adapter, AdapterBuilder, AdapterEngine, AdapterImpl, AdapterStore, AdapterType, adapter::AdapterFactory, cache::Relatio...
e2c74ef305c6c0dc672cf9f106f8665d7d46cd2f598e70a5920a7c2746ade843
Rust
34,474
772
//! Paired-end joining: `joinReadsAndFilter`. //! //! # What pairing adds //! //! Each mate is mapped independently, which leaves two lists of candidates. A //! placement is far more convincing when *both* mates land on the same transcript //! in the right relative orientation and at a plausible distance: that is a //!...
416e2df9f22c09c4f983729e5e118fee26ff1af8fe7070905138558e2691aeeb
Rust
34,763
904
//! Databricks constraint utilities //! //! Provides constraint types and parsing utilities for the Databricks adapter. //! Supports check, primary key, foreign key, and custom constraints with validation and DDL rendering. //! //! Reference: https://github.com/databricks/dbt-databricks/blob/24325a3195171d36972804e545b...
b68ed30e8c601c61c9a7b6a566926c36afe4d85e915ce9fbca407830dbb15aef
Rust
34,943
900
//! Deterministic alignment-mode RAD producer. //! //! # What "deterministic" means here //! //! An ordinary run learns its models *while* mapping, from whichever fragments //! each thread happened to see first, so tiny differences accumulate and the //! output depends on the thread count. `--deterministic` splits the ...
8a25de47018c4a840178f26656a778aa5b9b40f748a96cd66d901769dcedeabd
Rust
35,553
918
use crate::utils::beliefs_propagation::belief_propagation; use crate::utils::function_pointer::UpdateStep; use crate::utils::set_sequence::set_update_sequence; use numpy::{PyArray, PyArray1}; use pyo3::types::PyTuple; use pyo3::{ prelude::*, types::{PyDict, PyList}, }; use std::collections::HashMap; /// Accept...
2d1b1806730f195c472fbbca7fb7b2232baad88d79248e3d4703f6d89e5fab41
Rust
35,697
1,002
#![deny(unsafe_op_in_unsafe_fn)] use std::ffi::c_void; use std::fs::File; use std::io; use std::mem::size_of; use std::os::windows::ffi::OsStrExt; use std::os::windows::io::{FromRawHandle, RawHandle}; use std::path::Path; use std::ptr; use tempfile::NamedTempFile; use windows_sys::Win32::Foundation::{ CloseHandle...
807bb1e18c53ffb1b2b3a4fc456a3d5d79c4c9e8bca7795c80744834fd3b7ddd
Rust
35,728
985
//! Recording and replay helpers for MetadataAdapter async methods. //! //! This module provides utilities for transparently recording and replaying //! MetadataAdapter method calls using the global time machine recorder/replayer. //! //! # Recording //! //! When recording is active (`global_recorder()` returns Some), ...
43c4dacc207855fb6aa2a855c42f91b17cfd97410fbf0fb4c12be0d16db57a64
Rust
35,821
830
//! Fragment-length distribution. //! //! # What it is and why it matters //! //! Library preparation shears RNA into fragments whose lengths vary around some //! protocol-specific typical size (often ~200-300 bases). Two things depend on //! knowing that distribution: //! //! * **Effective length.** A transcript can o...
fc0e4369c5b5db10c291a81f0ab67a484a4fa00cc377facd34e9e9b2f07ffedc
Rust
36,469
940
use dbt_common::node_selector::{SelectExpression, parse_model_specifiers}; use dbt_common::once_cell_vars::DISPATCH_CONFIG; use dbt_common::{ErrorCode, FsResult, err, fs_err}; use dbt_jinja_utils::jinja_environment::JinjaEnv; use dbt_jinja_utils::phases::parse::build_resolve_context; use dbt_jinja_utils::serde::value_f...
be8b369c264ca2856fb5044d7fc39864f15d373588c4ed52ced4706955a603f3
Rust
36,562
963
use proc_macro2::{Span, TokenStream as TokenStream2}; use quote::quote; use std::collections::{HashMap, HashSet}; use syn::{ Expr, Field, Fields, GenericArgument, Ident, LitBool, LitStr, PathArguments, Type, Variant, spanned::Spanned, }; extern crate proc_macro; const FRONTEND_ERROR_CODES: &str = include_str!...
8d0a880e53c25da8955df68f7a69ea5e393d35d2bb190c1d80d8e09d8d372cca
Rust
36,569
1,042
use std::{collections::BTreeMap, sync::Arc}; use dashmap::DashMap; use crate::types::{ builtins::Reference, dict::DictType, function::LambdaType, list::ListType, struct_::StructType, tuple::TupleType, union::UnionType, DynObject, Type, }; /// The error type for the funcsign parser. #[derive(Debug, Clone)] pu...
1ec8406a7ef786577b1895e3315fff7519fb59f1aae2c86b4751f01b15b03d6e
Rust
36,579
845
use super::resolve_properties::MinimalPropertiesEntry; use crate::args::ResolveArgs; use crate::dbt_project_config::{ ProjectConfigResolver, RootProjectConfigs, disallow_plus_prefix_from_flags, init_project_config, strip_resource_paths_from_ref_path, }; use crate::renderer::{ RenderCtx, RenderCtxInner, SqlF...
e0a089c80abebd43e7ced4587c740a2ae6d0a4e64b6088fc7d9be8e4a212ea3a
Rust
37,104
903
//! Taint-propagating wrapper for values that stand in for something the //! renderer cannot actually know (the canonical example being a //! warehouse-dependent adapter call evaluated without a real connection). //! Consumers outside this crate (e.g. `dbt-adapter`'s `Adapter::Parse` mode) //! use this to mark such val...
9e617461341fb54f38da0a851b83c9b9197b946cb6381035c8be09d35428951e
Rust
37,524
983
//! Parsing and validation for a target's connection list in `profiles.yml`. //! //! A target's `outputs.<target>` entry accepts two shapes: //! //! ```yaml //! outputs: //! dev: # legacy: the mapping is exactly one connection //! type: duckdb //! path: ./dev.db //! //! prod: ...
e8abfa34405f65859fa4e3a01d0f4eb83aa885865b4ee919a0d15ebdf46a5004
Rust
37,689
988
use std::borrow::Cow; use std::collections::BTreeMap; use std::collections::HashMap; use std::sync::Arc; use arrow_array::RecordBatch; use arrow_schema::Schema; use dbt_adapter_core::AdapterType; use dbt_adbc::*; use dbt_agate::hashers::IdentityBuildHasher; use dbt_auth::{AdapterConfig, Auth, AuthError}; use dbt_commo...
387709a0f517ae94b6b3b710e1778609764be0ead5bcec31d1a441e9db03b4a3
Rust
37,714
954
use std::collections::BTreeMap; use std::path::Path; use dbt_adapter_core::AdapterType; use dbt_common::ErrorCode; use dbt_common::FsResult; use dbt_common::error::FsError; use dbt_common::fs_err; use dbt_common::io_args::{ ComputeArg, LOCAL_UNIT_TESTS_ENV, MULTI_ADAPTER_ENV, local_unit_tests_enabled, multi_ad...
667258cedc306ad301641078116dfce080ba7b5411bb47a4527812b5ab1c4572
Rust
38,046
1,043
pub mod adapter; pub mod builtins; pub mod dict; /// Types for function signatures pub mod funcsign_parser; pub mod function; pub mod iterable; pub mod list; pub mod string; pub mod struct_; pub mod timestamp; pub mod tuple; pub mod union; pub mod utils; #[macro_use] pub mod type_erase; use dashmap::DashMap; use cra...
d9816269a2ede3ac942f79bcc57184f7e1061683a82d47d7155d7aa960321e31
Rust
38,050
1,084
use dbt_adapter::Adapter; use dbt_adapter::relation::render_effective_relation; use dbt_adapter_core::AdapterType; use dbt_common::{ErrorCode, FsError, fs_err}; use dbt_common::{FsResult, constants::DBT_CTE_PREFIX, error::MacroSpan, stdfs}; use dbt_frontend_common::{error::CodeLocation, span::Span}; use dbt_schemas::sc...
fad29fcfef3e9411137c13cbf30b95f32b8f74f4c609f9f7bba909e7379f85ba
Rust
38,143
940
use dbt_yaml::Verbatim; use std::{ collections::{BTreeMap, HashMap, hash_map::Entry}, path::Path, sync::Arc, }; use dbt_common::{ErrorCode, FsResult, err, io_args::IoArgs, unexpected_fs_err}; use dbt_common::{FsError, tracing::dbt_emit::emit_info_log_message}; use dbt_jinja_utils::{ jinja_environment::...
9bfc9831df77bd7fcaa5f93fd511746502c3488a9d3eafd026952a6ba53e45fa
Rust
38,271
1,127
//! Schema-level tests. These need no fixtures: the schema and the projection's //! output types are pure functions of the spec. use std::collections::HashSet; use std::path::Path; use serde_json::{Value, json}; use crate::parquet::{schema_for, write_table}; use super::project::out_schema; use super::schema::INFO_S...
a9c350c58d1d8ef2589ed361903a40455ffbb92991c9b4021ca61835c64a04af
Rust
38,324
874
//! DAAREM acceleration of the EM/VBEM fixed-point iteration. //! //! # The problem being solved //! //! EM is an iterative algorithm: from a guess `x` it computes a better guess //! `F(x)`, and repeats until the guess stops changing. Mathematically it is //! looking for a *fixed point*, a vector with `F(x) = x`. EM is...
7931cfd860b3037145ed94a4793ad0eb2e500287baf9678e070944c7f177c80f
Rust
38,445
993
use crate::adapter::adapter_impl::AdapterImpl; use crate::errors::{AdapterError, AdapterErrorKind, AdapterResult, AsyncAdapterResult}; use crate::macro_exec::execute_macro; use crate::relation::{RelationObject, create_relation, do_create_relation}; use crate::sql_types::{SdfSchema, arrow_schema_to_sdf_schema}; use crat...
9e5587c2b1f07b67736feee32387a939c692c3811b6e0fe29363e631a0ae81ad
Rust
38,655
999
use std::collections::BTreeSet; use std::iter::zip; use minijinja::arg_utils::ArgsIter; use minijinja::tuple; use minijinja::value::mutable_map::MutableMap; use minijinja::value::mutable_vec::MutableVec; use minijinja::value::{from_args, ValueKind, ValueMap}; use minijinja::{Error, ErrorKind, State, Value}; use regex:...
12e57c3e7b09e5577aa4899f3b1504d312bddb2ca20def146cf6e3edf8e8e131
Rust
38,659
1,108
use arrow::record_batch::RecordBatch; use arrow_array::{Array, ArrayRef, RecordBatchOptions, StringViewArray, UInt64Array}; use arrow_schema::{DataType, Field, Schema}; use minijinja::{Error, ErrorKind, Value}; use std::collections::{HashMap, HashSet}; use std::sync::Arc; use crate::AgateTable; use crate::grouper::{Gr...
4d1cca58bba74ca62a3b1e9871f65fa149d07c22773346b819bb21401d9532cc
Rust
38,866
1,033
use crate::{AdapterConfig, Auth, AuthError, AuthWarningPrinter, auth_configure_pipeline}; use database::Builder as DatabaseBuilder; use dbt_adbc::bigquery::auth_type; use dbt_adbc::{Backend, bigquery, database}; use serde::{Deserialize, Serialize}; use std::borrow::Cow; use std::path::Path; use url::Url; type YmlValue...
6e1b528c47ebfc17f2c68cf38576c0c39d608cd88728ede2edfe072359b33150
Rust
38,956
894
//! Equivalence classes for salmon-style quantification. //! //! # What this crate is for //! //! RNA-seq gives us short DNA fragments ("reads") sequenced from a soup of RNA //! molecules ("transcripts"). We want to know how much of each transcript was //! in the soup. The hard part is that transcripts share sequence: ...
586f7a0b167eb73fa1e0490144f75871ff9a4f7af12b584dc1956ed6446d241e
Rust
39,132
1,263
use std::borrow::Cow; use std::cell::RefCell; use std::collections::HashSet; use std::ops::{Deref, DerefMut}; use std::rc::Rc; use std::sync::Arc; use crate::error::{Error, ErrorKind}; use crate::listener::RenderingEventListener; use crate::value::{ mutable_map::MutableMap, DynObject, ObjectRepr, Packed, SmallStr,...
c08429943754686ad2a932b7d6dc017d860d7ea52dcb5f7c07fc0289f515b4e1
Rust
39,403
1,156
use std::borrow::Cow; use std::ops::ControlFlow; use std::path::Path; use std::rc::Rc; use crate::compiler::tokens::{Span, Token}; use crate::error::{Error, ErrorKind}; use crate::listener::{BlockNameKind, TokenizerEventListener}; use crate::syntax::SyntaxConfig; use crate::utils::{memchr, memstr, unescape}; /// Inte...
80f2b235190b26e9e63b9a403a709a9c4d3239355214a0e330d0144f8ac6fe60
Rust
39,488
930
use crate::args::ResolveArgs; use crate::dbt_project_config::{ ProjectConfigResolver, RootProjectConfigs, disallow_plus_prefix_from_flags, init_project_config, }; use crate::resolve::resolve_utils::deep_merge_yaml; use dbt_adapter_core::AdapterType; use dbt_common::cancellation::CancellationToken; use dbt_common::i...
1dd1848ff144c2443fb99bc906ec4db3c15e993839255569810c890eedbc3099
Rust
40,155
1,096
//! This module contains the functions for initializing the Jinja environment for the compile phase. use std::collections::{BTreeMap, BTreeSet}; use std::fmt::Debug; use std::sync::{Arc, OnceLock}; use chrono::{DateTime, Utc}; use crate::functions::build_flat_graph; use crate::invocation_graph::invocation_graph; use...
d4f66110a9ffe59d9788c2160d7c3984c89eaef4b90773cf1f55099fb41e2e53
Rust
40,262
1,046
use std::collections::{BTreeSet, HashMap, HashSet, VecDeque}; use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; use dashmap::DashMap; use dbt_common::tracing::span_info::SpanStatusRecorder as _; use dbt_common::{FsResult, create_info_span}; use dbt_schemas::schemas::relations::base::BaseRelation; use ...
18fab4b034e5e15da48b5e207381ee88101570c5d407d0d6b63b420a3863913a
Rust
40,371
1,081
// RecordDecoder: forked from arrow-csv use arrow_schema::ArrowError; use csv_core::{ReadRecordResult, Reader}; /// The estimated length of a field in bytes const AVERAGE_FIELD_SIZE: usize = 8; /// The minimum amount of data in a single read const MIN_CAPACITY: usize = 1024; /// State machine for tracking empty rec...
14c66f5f599f0fdb54e1b11a1499533ac5183549292e328df74b77ca8a4abfb4
Rust
40,775
1,060
//! TimeMachineSerializable implementations for Object types. use std::sync::Arc; use dbt_schemas::dbt_types::RelationType; use dbt_schemas::schemas::dbt_catalogs_v2::CatalogType; use dbt_schemas::schemas::relations::base::TableFormat; use crate::relation::{RelationConfig, RelationObject, do_create_relation}; use s...
ae5096ed84e1ed92cebc940e25c06293a697a04cc3ec983f9befa99ac7fbcd74
Rust
41,035
1,048
use std::ffi::OsString; use std::io::{Read as _, Write as _}; use std::path::{Path, PathBuf}; use std::result::Result; use std::sync::OnceLock; use std::time::Duration; use std::{env, fmt, io}; use crate::driver::DriverFilenameDisplay; use crate::driver_channel::foundry_driver; use crate::*; use adbc_core::error::{Er...
aeaab972407192f19afccb7081ca73043e0ba14ff7007a4e4d309c2871a10de5
Rust
41,317
1,103
//! Constraint configuration and processing for Databricks relations //! //! Handles extraction and diffing of constraint configurations from database metadata //! and dbt node definitions. Supports non-null constraints and typed constraints. //! //! Reference: https://github.com/databricks/dbt-databricks/blob/e7099a2c...
32c667af4f934a5211aa7b149cca0c36e5e448a8557bec39a2618ce8fa22d8ae
Rust
41,334
1,207
#![cfg_attr( feature = "custom_syntax", doc = "Documents the syntax for templates and provides ways to reconfigure it." )] #![cfg_attr( not(feature = "custom_syntax"), doc = "Documents the syntax for templates." )] //! //! <details><summary><strong style="cursor: pointer">Table of Contents</strong></sum...
7f712a724df25f36764b560dcce0327c0f525e01094654251b704851a2a414bc
Rust
42,080
1,128
use std::collections::HashMap; use std::sync::Arc; use crate::AdapterResult; use crate::AdapterType; use crate::errors::{AdapterError, AdapterErrorKind}; use arrow::array::{ Array, ArrayRef, AsArray, FixedSizeListArray, GenericListArray, Int64Array, MapArray, StringArray, StringBuilder, StructArray, }; use ar...
62446ed47f45c8e62ec2edaff071cceaab47c6a7cd98b795476808040cb4a9ee
Rust
42,203
1,136
//! Utility functions for the resolver use crate::dbt_project_config::strip_resource_paths_from_ref_path; use crate::resolve::resolve_properties::MinimalPropertiesEntry; use dbt_adapter_core::AdapterType; use dbt_common::constants::DBT_SNAPSHOTS_DIR_NAME; use dbt_common::io_args::IoArgs; use dbt_common::path::DbtPath; ...
6e4a76387becaf6ade9703f7b604f0740d6ee9075d1a7ae5ca94bb69ecc1af63
Rust
43,223
1,234
//! Grammar for node selectors, used //! for --select, --exclude //! leaf string values inside a --selectors YAML definitions //! the result of normalizing any other node selection, e.g. --resource-types //! //! OrSpecifiers ::= AndSpecifiers (' '+ AndSpecifiers)* # tokens already whitespace-split by C...
dcd9af2c78b1e6a3e8bdf0436f91bb6403878845a6855892b251e62a0e6f85d2
Rust
43,857
1,267
use std::collections::BTreeMap; use std::sync::Arc; use arrow::array::{Array as _, StringArray}; use dbt_adapter_core::AdapterType; use dbt_adbc::{Connection, QueryCtx}; use dbt_common::{AdapterError, AdapterErrorKind, AdapterResult}; use dbt_schemas::dbt_types::RelationType; use dbt_schemas::schemas::common::normaliz...
2e55312417f27754f47c97c205220c879822cecd66948ca13709814b62497928
Rust
43,936
1,146
use std::any::Any; use std::borrow::Cow; use std::collections::BTreeMap; use std::fmt; use std::path::PathBuf; use std::rc::Rc; use std::sync::Arc; use serde::Serialize; use crate::compiler::ast; use crate::compiler::codegen::{CodeGenerationProfile, CodeGenerator}; use crate::compiler::instructions::Instructions; use...
a985031c90322fc8d79b2995fd9a7b8e88c4f1981ce74457abbffed6b1953481
Rust
45,387
1,663
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet, LinkedList, VecDeque}; use std::sync::Arc; use insta::{assert_debug_snapshot, assert_snapshot}; use similar_asserts::assert_eq; use minijinja::value::{ mutable_map, mutable_vec, DynObject, Enumerator, Kwargs, Object, ObjectRepr, Rest, Value, ValueKi...
8c6a75be150b42381b349aa39dbda5d2651814a31fc00bef663693733a8d42a8
Rust
46,362
1,136
use dbt_adapter_core::AdapterType; use dbt_common::ErrorCode; use dbt_common::FsResult; use dbt_common::io_args::IoArgs; use dbt_common::path::{DbtPath, resource_extension}; use dbt_common::stdfs::diff_paths; use dbt_common::tracing::dbt_emit::{emit_warn_log_from_fs_error, emit_warn_log_message}; use dbt_common::tracin...
3915b2cca50d43205353edd60677ad61dd0e3bfeb3a4fcc7ab0f45fbf0846ff1
Rust
46,404
1,144
//! Alignment validation of mapping candidates. //! //! # Why candidates are verified //! //! Chaining says a read *could* align here; it does not say how well. Transcripts //! sharing a repeat, a domain or a low-complexity stretch produce plausible //! chains for reads that did not come from them. Alignment settles it...
5cd974e49c447b519b1056de9b8147b00d362845893004e4f320611a68da8c8d
Rust
46,706
1,379
#![allow(clippy::let_and_return)] use core::fmt; use std::rc::Rc; use std::sync::Arc; use std::sync::Mutex; use im::HashSet; use minijinja::arg_utils::ArgsIter; use minijinja::listener::RenderingEventListener; use minijinja::value::{Enumerator, Object, ObjectRepr, ValueKind}; use minijinja::{ErrorKind, State, Value,...
7ae4dcf13bc126d42213ccca9029ae05d6ccc227adff65a931870f0d1974059a
Rust
46,790
1,336
use std::{ cell::{Cell, RefCell}, collections::{BTreeMap, BTreeSet, HashMap, HashSet}, fmt::Write as _, path::{Path, PathBuf}, rc::Rc, sync::{Arc, RwLock, RwLockReadGuard}, }; use minijinja::{ CodeLocation, JinjaLayoutEventKind, MacroSpans, OutputTracker, OutputTrackerLocation, Typechec...
4b6fb0fae318065150c68cd05f70f752cd618a32672074032e3aa82427579dc3
Rust
47,020
1,168
//! Sequence-specific bias model (`SBModel`). //! //! # The effect being modelled //! //! RNA-seq protocols fragment and prime with enzymes and random hexamers that //! are not indifferent to sequence. Certain short motifs are cut or primed far //! more readily than others, so fragments *start* at some sequences much m...
7015b11ed6b8b4712958edb27f8c163f28c17d55d351058851c1f87c3162764e
Rust
47,361
1,092
use std::path::Path; use crate::python::{PythonManifestFormat, PythonPackageManager}; use dbt_common::{ErrorCode, FsResult, fs_err}; pub use dbt_dist_classify::{Distribution, Generation}; use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "kebab-ca...
b9125207545217d63a82d1a938047fdf664372fd54e5ee8f2fefcca1e866eade
Rust
47,987
1,287
use crate::notices::{PackageNotice, PackageNoticeKind, VersionCompatKind}; use crate::semver::{Version, VersionSpecifier, versions_compatible}; use dbt_common::{ErrorCode, FsResult, err, fs_err}; use dbt_schemas::schemas::packages::DbtPackageEntry; use dbt_schemas::schemas::serde::StringOrArrayOfStrings; use reqwest::S...
ad697105854f50042a55f5cf793809fb6f557b56304b378a1a98522f6c1d80ea
Rust
48,288
1,179
use crate::{functions::register_base_functions, jinja_environment::JinjaEnv}; use dbt_adapter::{Adapter, relation::is_parse_time_relation}; use dbt_common::{ ErrorCode, FsError, FsResult, fs_err, io_args::IoArgs, unexpected_fs_err, warn_error_options::WarnErrorOptions, }; use minijinja::{ AdapterDispatchFun...
5929997fa25950d19cd196f126048f38fdfe23161daa5c5d60e417f4b80d3973
Rust
48,452
1,514
//! Generates DuckDB initialization SQL from an [`AdapterConfig`]. //! //! Produces statements in the same order as upstream dbt-duckdb: //! 1. `INSTALL` + `LOAD` for each extension (including auto-injected `motherduck`) //! 2. `CREATE OR REPLACE SECRET` for each secret //! 3. `SET motherduck_token` (for MotherDuck pat...
df5ae84b7843808d32dc3c38400877d02e5fbc36bf58d38ad02752e585ff6d24
Rust
49,137
1,467
use failure::format_err; use human_panic::setup_panic; use log::{debug, error, info, warn}; use bio::alignment::pairwise::banded; use bio::io::fasta; use clap::{App, Arg}; use failure::{Error, ResultExt}; use flate2::read::MultiGzDecoder; use itertools::Itertools; use rayon::prelude::*; use rust_htslib::bam::record::A...
d64ef6860c8de3e95f24c752468f53cc0c68a91f7a4d4764abae408a19285fdf
Rust
49,237
1,278
//! RAD-input quantification (`quantify_rad`): write a small salmon RAD with a //! known mapping structure, quantify it, and check counts, mass conservation, //! profile handling, and thread-count invariance. use std::path::Path; use salmon_align::{quantify_rad, AlignQuantOptions, FldPolicy}; use salmon_rad::{ fr...
32869c72150b39cbc2e1a4b7ec0c0cd36b19bba65a56b6cb6b13474a99ec4183
Rust
49,361
1,417
//! Converters from Arrow to minijinja values. //! //! use arrow::array::{AsArray as _, PrimitiveArray}; use arrow::buffer::{BooleanBuffer, NullBuffer, OffsetBuffer, ScalarBuffer}; use arrow::compute::{CastOptions, cast_with_options}; use arrow::datatypes::*; use arrow::util::display::FormatOptions; use arrow_array::{...
73af0477abd30135784e311939e2b4e4c7c6d0100d41af930bdfdbb16e991bd5
Rust
49,436
1,421
use async_trait::async_trait; use dbt_common::ErrorCode; use dbt_common::err; use dbt_common::fs_err; use dbt_common::tracing::dbt_emit::{emit_warn_log_message, println}; use dbt_common::tracing::event_info::store_event_attributes; use dbt_telemetry::PackageUpdate; use rand::Rng as _; #[cfg(not(target_os = "windows"))]...
a23b89ab78ec9846727afe72d94ad4385d291080d9d2d264495ebebd21a9ba5f
Rust
49,628
1,418
use std::time::SystemTime; use chrono::Utc; use dbt_error::ErrorCode; use dbt_telemetry::{ ArtifactType, ArtifactWritten, CompiledCode, CompiledCodeInline, DepsAddPackage, DepsPackageInstalled, ExecutionPhase, HookProcessed, HookType, Invocation, ListItemOutput, LogMessage, NodeEvaluated, NodeEvent, NodeOu...
3a97b5ca73a5577c0eaa3c376d3d37cbd54be0270990cacf729b11e1a477026e
Rust
49,926
1,251
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
511674e7eafe2aba575002e3e8524b385674881166401aeefa08f34440ef79e3
Rust
50,729
1,402
//! NOTE: This module will replace config.rs, but for backwards compat reasons I kept both //! until everything is migrated. //! //! This module contains the primitives for describing and diffing relation configurations. //! //! 1. There is a single `RelationConfig` which contains a set of `RelationConfigComponent`. Al...
1d5f1c994dabd35143cf27c61392d660cac9161bdf83efaf7d2f98306055f984
Rust
50,783
1,237
//! Whole-network sweeps for the vectorised deep-network backend. //! //! These compose the per-layer kernels of [`crate::updates::vectorised`] into the //! belief-propagation passes of the JAX driver //! (`pyhgf.utils.vectorised_belief_propagation`): //! //! * [`DeepNet::prediction_sweep`] — clamp the predictors on to...
f393dd3545cafb8211362f9a892efb1b6ab81caea11934c0c1430c270a826e01
Rust
51,981
1,207
use crate::args::ResolveArgs; use crate::dbt_project_config::ProjectConfigResolver; use crate::dbt_project_config::RootProjectConfigs; use crate::dbt_project_config::disallow_plus_prefix_from_flags; use crate::dbt_project_config::init_project_config; use crate::renderer::RenderCtx; use crate::renderer::RenderCtxInner; ...
c0f517fdc32e16c3aa96e9c15a76cbd5f0ccbff12c6741cff7b750168634da57
Rust
52,113
1,262
//! Packed, parallel-friendly equivalence-class representation for inference. //! //! # What "packed" means and why it matters //! //! The builder in `salmon-eqclass` produces a `Vec<(TranscriptGroup, TGValue)>`: //! a vector of structs, each owning its own little vectors of transcript ids and //! weights. That shape i...
6653a76e61816544e1ef20e440a51f6d549dfaf33a754d665caff14967a72c01
Rust
52,674
1,380
use std::collections::{BTreeMap, BTreeSet}; use crate::{ErrorCode, collections::HashMap}; use dbt_yaml::{Value, Verbatim}; use serde::{Deserialize, Serialize, Serializer}; use strum::{AsRefStr, EnumMessage, IntoEnumIterator}; mod legacy; pub use legacy::{ NotAWarningInDbtCoreLegacyWarnError, NotYetSupportedLegac...
22508b62d93bd1776f45354502ba3511bf7dd79a424537440388c92ce928ad7e
Rust
52,918
1,320
//! End-to-end reads-mode quantification: build an index over several //! transcripts, simulate paired-end reads at known abundances, quantify, and //! check the recovered counts track the truth — for both the selective and //! pseudoalignment paths. //! //! # Why simulate //! //! With real data there is no ground trut...
e8ea1b7ee14ea841e66098856aca2b4eacc687c0135c4ad8f3ed574a67483638
Rust
53,421
1,329
//! Collapsed EM / VBEM abundance estimation over equivalence classes. //! //! # The estimation problem //! //! We know, for each group of identical-looking fragments (an *equivalence //! class*), how many fragments there were and which transcripts they were //! compatible with. We do not know which transcript each fra...
938a4700d7751f0ee027ff2de6bbb8de7754178f28eb418776c1857b6abb7e9b
Rust
53,810
1,562
//! A mini re-like module for MiniJinja, intended to mirror Python's `re` module behavior. //! //! This module provides functions such as `compile`, `match`, `search`, `fullmatch`, //! `findall`, `split`, `sub`, etc., using Rust's `regex` crate under the hood. While //! this is only a partial implementation of Python's...
e01671cf5ca7e71f7e89b7d247f7b7a95ffe90ffd5e86a8a6f5de11ebe829f54
Rust
53,820
1,403
//! Utility functions for the resolver use crate::args::ResolveArgs; use crate::dbt_namespace::DbtNamespace; use crate::dbt_project_config::ProjectConfigResolver; use crate::resolve::resolve_properties::MinimalPropertiesEntry; use crate::sql_file_info::SqlFileInfo; use crate::utils::{ extract_unrendered_config_from...
c1714c4d2ed4c1d9e799384f16216bc21634c3226d8284afdfd594a40632d5ab
Rust
54,084
1,421
use console::Style; use dbt_telemetry::{ AnyNodeOutcomeDetail, CompiledCode, CompiledCodeInline, ExecutionPhase, NodeEvaluated, NodeEvent, NodeMaterialization, NodeOutcome, NodeProcessed, NodeSkipReason, NodeType, SourceFreshnessOutcome, TestOutcome, get_cache_detail, get_freshness_detail, get_node_outc...
f3a6174b9b2d45ec0b9bd4a7497038943b0282baed1839165279d09b038ad625
Rust
55,176
1,390
use crate::{AdapterConfig, Auth, AuthError, AuthWarningPrinter}; use database::Builder as DatabaseBuilder; use dbt_yaml::Value; use std::borrow::Cow; use std::time::Duration; use dbt_adbc::{Backend, database, databricks}; /// User agent name provided to dbx for Fusion. /// /// Official guidance is <isv-name+product-n...
315f454e1dac4cb684f74b26dfb07547b88221cb05a97b4e9271dcfc59ce78b0
Rust
55,823
1,405
//! This module contains the scope guard for resolving models. use dbt_adapter_core::AdapterType; use indexmap::IndexMap; use std::{ collections::{BTreeMap, BTreeSet}, fmt::Debug, path::{Path, PathBuf}, rc::Rc, sync::{Arc, Mutex, atomic::AtomicBool}, }; use chrono::TimeZone; use chrono_tz::{Europe...
2651b27b9cef4b196a42885ab113763a1a6885009bf9f24b62ebb6b19129b215
Rust
55,980
1,694
use crate::tracing::dbt_init::create_tracing_subcriber_with_layer; use crate::{ constants::DBT_TARGET_DIR_NAME, io_args::FsCommand, tracing::{ emit::{ create_debug_span, create_info_span, create_root_info_span, emit_debug_event, emit_error_event, emit_info_event, }, ...
df6065ece7e8e7b9341c3d9db783bdf3b8335c452afc589b2a353f6d3ab43bc4
Rust
56,630
1,485
//! SQL diffing utilities for evaluating replay of recorded events. //! //! This module provides a validation engine for comparing incoming events against //! recorded events, with support for: //! - Known deviations that should skip validation //! - SQL extraction and sanitization for meaningful comparison //! - Plugg...
b74a791558273d1cd9fe64f6c34e86f5d0a1c87bcab3d78a34532a6b12b788e5
Rust
56,907
1,774
use crate::ident::*; use crate::types::*; use dbt_adapter_core::AdapterType; use AdapterType::*; use DateTimeField::*; use SqlType::*; fn assert_parses_to(line: u32, input: &str, expected: &SqlType, backend: AdapterType) { let (parsed, _nullable) = SqlType::parse(backend, input).unwrap(); let rendered = pars...
6ffc01144e21765fa23ef9a1c032364ca5ddedbf8087d92bb6fb835a34a9953e
Rust
57,385
1,227
//! Generator for the information schema as views straight over `target/private/metadata/`, //! with no materialization step. //! //! The SQL it produces declares the same schema names, table names, column names //! and column order as `views.sql` — the difference is only where the rows come //! from. `views.sql` reads...
7f4d00bfded9cf3bbb00510cf1291603de01a7fcd6bf7bbb1de0cfc2adf5d710
Rust
57,574
1,605
use dbt_adapter_core::AdapterType; use dbt_common::{ErrorCode, FsError, FsResult, fs_err}; use dbt_schemas::dbt_types::RelationType; use dbt_schemas::filter::RunFilter; use dbt_schemas::schemas::common::{DbtQuoting, ResolvedQuoting}; use dbt_schemas::schemas::dbt_catalogs_v2::CatalogType; use dbt_schemas::schemas::rela...
f1834b2db5b68b5669ffe5b51579c0e48be9b5aa4704c8f1cca05e33a1f1ae6f
Rust
57,939
1,696
//! Python AST visitor for extracting dbt function calls //! //! This module implements an AST visitor that walks Python code to extract //! calls to dbt.ref(), dbt.source(), dbt.config(), dbt.config.get(), and dbt.config.meta_get() use crate::python_ast::{ LiteralValue, PythonLiteralEvalError, compute_line_starts...
573a310d0f6b84d7a63481c9bebcc1f4474340bb247a0482fbe0fc9aace83cbb
Rust
58,552
1,737
use datafusion_common::error::DataFusionError; use datafusion_expr::Expr; use dbt_base::cancel::CancelledError; use dbt_frontend_common::error::{FrontendError, FrontendResult, NameCandidate, format_candidates}; use itertools::Itertools as _; use regex::Regex; use std::{ backtrace::Backtrace, error::Error, f...
9eceef5d587a0987ee941510e6918923a7c85f00533f8b054aa77bced2ae5772
Rust
61,162
1,492
//! Module containing the entrypoint for the resolve phase. use crate::args::ResolveArgs; use crate::dbt_project_config::{ ProjectConfigResolver, RootProjectConfigs, disallow_plus_prefix_from_flags, init_project_config, }; use crate::renderer::strip_warehouse_keys_in_config_block; use crate::resolve::resolve_utils:...
d3a2d8beab4beed7b7bf2e028cdc877b9d391868b7cdfc1306f79f24e95adc99
Rust
62,348
1,600
//! `dbt system upgrade-distribution`: only available in dbt v2 OSS, this //! command upgrades the current install to dbt v2 proprietary (published on //! PyPI as `dbt`). See `upgrade-spec.md` (repo root) for the full design. //! Handles two cases: a "global install" (a `standalone`/`unclaimed` native //! binary upgrad...
5349d62a4e0e2b549f830fc580e1c798eceab3c59f16aed0e2a52f10a11f5084
Rust
63,077
1,730
use dbt_adapter_sql::types::{SqlType, StructField}; use dbt_common::current_function_name; use once_cell::sync::Lazy; use regex::Regex; use std::sync::Arc; use dbt_adapter_core::*; use dbt_schemas::schemas::dbt_column::DbtCoreBaseColumn; use dbt_schemas::schemas::serde::minijinja_value_to_typed_struct; use minijinja; ...
1806bdb576e20cb1c14f52678ef54ec416e49ec9bcf83283eb5282ec74954640
Rust
63,620
1,598
use std::borrow::Cow; use std::collections::HashMap; use std::sync::Arc; use crate::AdapterResult; use crate::errors::{AdapterError, AdapterErrorKind}; use crate::metadata::snowflake::ARROW_FIELD_SNOWFLAKE_FIELD_WIDTH_METADATA_KEY; use crate::metadata::*; use crate::need_quotes::need_quotes; use arrow_schema::{DataTyp...
d10737dca184d69b92666ed394c01442001f3d3165ca6b32f72dc37182b85b9b
Rust
65,161
1,889
use std::{borrow::Cow, cell::Cell, collections::BTreeMap}; use crate::{ value::{ argtypes::type_name_suffix, mutable_map::MutableMap, value_map_with_capacity, ArgType, Kwargs, ValueKind, ValueMap, }, Value, }; /// Report invalid argument error (returns a minijinja::Error) #[macro_export] m...
9662823563a840cc724d247eca468295f8a4f23fde61e98c6128a953e79b4799
Rust
65,277
1,575
// DO NOT EDIT!!! // This file is generated by cargo run --bin adbc-sync #[allow(clippy::type_complexity)] #[rustfmt::skip] pub static SORTED_CDN_DRIVER_CHECKSUMS: [( ( &str, // backend &str, // target_os &str, // arch &str, // version ), &str, // checksum ); 390] = [ ( ...
38ea8128a00239e244379bfb8eadf76b4321e9958e7a0d4a9d8d4ebe260aa39d
Rust
66,065
1,593
//! SQL equivalents for the staging columns the information schema is built from. //! //! [`super::schema::INFO_SCHEMA`] declares each output column as a *staging* //! column — the shape the Rust ingest produces in the staging directory (the //! flat index at `target/private/index/`, or a private fallback). A view laye...
5a5eb903792792c908fc9420a9efa5244f73471b62635301b3cbd3c22d7b93dd
Rust
67,164
1,726
use std::cmp::Ordering; use std::fmt; use std::sync::Arc; use chrono::{ format::{Fixed, Item, StrftimeItems}, offset::Offset, DateTime, Datelike, Duration, NaiveDate, NaiveDateTime, NaiveTime, TimeZone, Timelike, Utc, Weekday, }; use chrono_tz::Tz; use minijinja::arg_utils::ArgsIter; use minijinja::{ar...
9e85010653ce45fa2f97bae9111e3908c638164a35c7006a370162ee3a2e2048
Rust
68,274
1,916
//! Parsing of `DESCRIBE TABLE EXTENDED ... AS JSON` metadata for Databricks. //! //! This module is the Rust home of the parsers and gating predicate introduced //! upstream in dbt-databricks. The parsers replace the per-relation //! `information_schema` queries with a single `DESCRIBE TABLE EXTENDED ... AS //! JSON` ...
6a495c426b3561a095f76ca5f01fcfad1b92e1e476b72576b7d098c070b52804
Rust
69,495
1,895
//! Filter functions and abstractions. //! //! MiniJinja inherits from Jinja2 the concept of filter functions. These are functions //! which are applied to values to modify them. For example the expression `{{ 42|filter(23) }}` //! invokes the filter `filter` with the arguments `42` and `23`. //! //! MiniJinja comes ...
65083c75a4fb02094bdf0aa7b90992fc8307da80d05b4a049ab4739c1dc04aef
Rust
69,991
1,797
use std::collections::BTreeMap; use std::sync::Arc; use crate::compiler::ast::{self, Expr}; use crate::compiler::instructions::{ Instruction, Instructions, LocalId, LOOP_FLAG_RECURSIVE, LOOP_FLAG_WITH_LOOP_VAR, MAX_LOCALS, }; use crate::compiler::tokens::Span; use crate::compiler::typecheck::FunctionRegistry; use ...
e6bf98b956965317f0e000f3ac6e7812a5a37721e5b65aff1e2b4806fecbf9e1
Rust
70,940
1,488
//! `salmon-quant`: the reads-mode quantification driver. //! //! Ties the pipeline together for FASTQ input: parse reads in parallel //! (paraseq) → map each fragment ([`salmon_map`]) → accumulate weighted //! equivalence classes ([`salmon_eqclass`]) and fragment lengths //! ([`salmon_model`]) → compute effective leng...
dbb448985ada29a957197054ccce5574ab96fad39948af0d4ad7d5df1968552f
Rust
71,100
1,808
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; use std::path::Path; use std::sync::Arc; use dbt_adapter::Adapter; use dbt_adapter::cache::hydrate_relation_cache_if_not_already_cached; use dbt_adapter::errors::into_fs_error; use dbt_adapter::metadata::CatalogAndSchema; use dbt_adapter::relation::{create_...
04afd2a9287a8d990e10c63d02c955fd039ad507de104f03765cfa528b15a319
Rust
71,851
1,946
use crate::AdapterEngine; use crate::adapter::adapter_impl::{AdapterImpl, InnerAdapter}; use crate::column::Column; use crate::connection::AdapterConnectionFactory; use crate::query_ctx::{node_id_from_state, query_ctx_from_state}; use crate::record_batch::RecordBatchExt; use crate::relation::Relation; use crate::sql_ty...