Skip to content

Commit

Permalink
delete pretty trace (#391)
Browse files Browse the repository at this point in the history
Deletes all uses of pretty_trace. Moves lingering necessary features to enclone proper.
  • Loading branch information
macklin-10x authored Mar 14, 2024
1 parent 6e47a39 commit e39af96
Show file tree
Hide file tree
Showing 40 changed files with 37 additions and 1,981 deletions.
307 changes: 7 additions & 300 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ members = [
"kmer_lookup",
"load_feature_bc",
"perf_stats",
"pretty_trace",
"stats_utils",
"stirling_numbers",
"string_utils",
Expand Down
1 change: 0 additions & 1 deletion GUIDE
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ enclone_tail last part of the code
enclone_tools miscellaneous binaries
enclone_vars variable definitions
enclone_version determine current version string
enclone_visual experimental GUI client

credits credits
fonts DejaVuSansMono, in case not otherwise available
Expand Down
2 changes: 0 additions & 2 deletions align_tools/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions amino/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions ansi_escape/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions enclone/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,13 @@ io_utils = { path = "../io_utils" }
itertools.workspace = true
perf_stats = { path = "../perf_stats" }
petgraph = "0.6"
pretty_trace = { path = "../pretty_trace" }
qd = { git = "https://github.com/Barandis/qd" }
rayon = "1"
stats_utils = { path = "../stats_utils" }
string_utils = { path = "../string_utils" }
vdj_ann = { path = "../vdj_ann" }
vector_utils = { path = "../vector_utils" }

[dev-dependencies]
assert_cmd = "2"

[target.'cfg(not(windows))'.dependencies]
pager = "0.16"

Expand Down
3 changes: 0 additions & 3 deletions enclone/src/UNDOC_OPTIONS
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,6 @@ NO_UNCAP_SIM: turn off uncapping simulation

HAPS_DEBUG: turn on debug mode for the HAPS option

PROFILE: turn on profiling, normally used with NOPRINT; paging is turned off because this
This won't work with paging, however you can pipe to "less -r".

===================================================================================================

ROW_FILL_VERBOSE: special option for debugging
Expand Down
54 changes: 0 additions & 54 deletions enclone/src/bin/traceback1.rs

This file was deleted.

3 changes: 1 addition & 2 deletions enclone/src/bin/update_enclone_binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@

use enclone_core::defs::get_config;
use io_utils::path_exists;
use pretty_trace::PrettyTrace;

use std::collections::HashMap;
use std::env;

#[cfg(not(target_os = "windows"))]
use std::os::unix::fs::PermissionsExt;

fn main() {
PrettyTrace::new().on();
let mut config = HashMap::<String, String>::new();
let mut config_file = String::new();
for (key, value) in env::vars() {
Expand Down
11 changes: 0 additions & 11 deletions enclone_args/src/proc_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ pub fn proc_args(ctl: &mut EncloneControl, args: &[String]) -> Result<(), String
("UTR_CON", &mut ctl.gen_opt.utr_con),
("VDUP", &mut ctl.clono_filt_opt.vdup),
("VIS_DUMP", &mut ctl.gen_opt.vis_dump),
("VISUAL", &mut ctl.visual_mode),
("WEAK", &mut ctl.gen_opt.weak),
("WHITEF", &mut ctl.clono_filt_opt_def.whitef),
];
Expand Down Expand Up @@ -650,7 +649,6 @@ pub fn proc_args(ctl: &mut EncloneControl, args: &[String]) -> Result<(), String
"COMP",
"COMPE",
"COMP2",
"CTRLC",
"DUMP_INTERNAL_IDS",
"EVIL_EYE",
"FORCE_EXTERNAL",
Expand All @@ -667,7 +665,6 @@ pub fn proc_args(ctl: &mut EncloneControl, args: &[String]) -> Result<(), String
"PLAIN",
"PRINT_CPU",
"PRINT_CPU_INFO",
"PROFILE",
"SVG",
];

Expand Down Expand Up @@ -939,14 +936,6 @@ pub fn proc_args(ctl: &mut EncloneControl, args: &[String]) -> Result<(), String
}
}

// Force visual mode if plot file is gui or if VIS_DUMP was invoked.

if (ctl.plot_opt.plot_file == "gui" || ctl.plot_opt.plot_file == "gui_stdout")
&& !ctl.gen_opt.vis_dump
{
ctl.visual_mode = true;
}

// Record time.

ctl.perf_stats(&targs, "in main args loop");
Expand Down
2 changes: 1 addition & 1 deletion enclone_args/src/proc_args2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ pub fn proc_args_tail(ctl: &mut EncloneControl, args: &[String]) -> Result<(), S
// Get origin descriptions. Flaky and particularly flaky when internal origin args are paths,
// since it will look in outs for the file.

if ctl.gen_opt.internal_run || ctl.gen_opt.descrip || ctl.visual_mode || ctl.gen_opt.vis_dump {
if ctl.gen_opt.internal_run || ctl.gen_opt.descrip || ctl.gen_opt.vis_dump {
ctl.origin_info.descrips.clear();
let mut results = vec![(0, "".to_string()); ctl.origin_info.n()];
for i in 0..ctl.origin_info.n() {
Expand Down
46 changes: 22 additions & 24 deletions enclone_core/src/defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ pub struct GeneralOpt {
pub subset_json: String,
pub fold_headers: bool,
pub no_uncap_sim: bool,
pub profile: bool,
pub nopager: bool,
pub info: Option<String>,
pub info_fields: Vec<String>,
Expand Down Expand Up @@ -513,30 +512,29 @@ pub struct PerfOpt {

#[derive(Default)]
pub struct EncloneControl {
pub visual_mode: bool, // running as enclone visual
pub perf_opt: PerfOpt, // computational performance options
pub start_time: Option<Instant>, // enclone start time
pub gen_opt: GeneralOpt, // miscellaneous general options
pub plot_opt: PlotOpt, // plot options
pub pretty: bool, // use escape characters to enhance view
pub nogray: bool, // don't gray in per cell lines
pub silent: bool, // turn off extra logging
pub force: bool, // make joins even if redundant
pub debug_table_printing: bool, // turn on debugging for table printing
pub merge_all_impropers: bool, // merge all improper exact subclonotypes
pub heur: ClonotypeHeuristics, // algorithmic heuristics
pub origin_info: OriginInfo, // origin (sample) info
pub allele_alg_opt: AlleleAlgOpt, // algorithmic options for allele finding
pub allele_print_opt: AllelePrintOpt, // print options for allele finding
pub join_alg_opt: JoinAlgOpt, // algorithmic options for join
pub join_print_opt: JoinPrintOpt, // printing options for join operations
pub perf_opt: PerfOpt, // computational performance options
pub start_time: Option<Instant>, // enclone start time
pub gen_opt: GeneralOpt, // miscellaneous general options
pub plot_opt: PlotOpt, // plot options
pub pretty: bool, // use escape characters to enhance view
pub nogray: bool, // don't gray in per cell lines
pub silent: bool, // turn off extra logging
pub force: bool, // make joins even if redundant
pub debug_table_printing: bool, // turn on debugging for table printing
pub merge_all_impropers: bool, // merge all improper exact subclonotypes
pub heur: ClonotypeHeuristics, // algorithmic heuristics
pub origin_info: OriginInfo, // origin (sample) info
pub allele_alg_opt: AlleleAlgOpt, // algorithmic options for allele finding
pub allele_print_opt: AllelePrintOpt, // print options for allele finding
pub join_alg_opt: JoinAlgOpt, // algorithmic options for join
pub join_print_opt: JoinPrintOpt, // printing options for join operations
pub clono_filt_opt_def: ClonoFiltOptDefault, // default filtering options for clonotypes
pub clono_filt_opt: ClonoFiltOpt, // filtering options for clonotypes
pub clono_print_opt: ClonoPrintOpt, // printing options for clonotypes
pub clono_group_opt: ClonoGroupOpt, // grouping options for clonotypes
pub parseable_opt: ParseableOpt, // parseable output options
pub pathlist: Vec<String>, // list of input files
pub last_modified: Vec<SystemTime>, // last modified for pathlist
pub clono_filt_opt: ClonoFiltOpt, // filtering options for clonotypes
pub clono_print_opt: ClonoPrintOpt, // printing options for clonotypes
pub clono_group_opt: ClonoGroupOpt, // grouping options for clonotypes
pub parseable_opt: ParseableOpt, // parseable output options
pub pathlist: Vec<String>, // list of input files
pub last_modified: Vec<SystemTime>, // last modified for pathlist
}

pub static mut WALLCLOCK: f64 = 0.0;
Expand Down
1 change: 0 additions & 1 deletion enclone_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ pub fn expand_integer_ranges(x: &str) -> String {
}

lazy_static! {
pub static ref BUG_REPORT_ADDRESS: Mutex<Vec<String>> = Mutex::new(Vec::<String>::new());
pub static ref REMOTE_HOST: Mutex<Vec<String>> = Mutex::new(Vec::<String>::new());
}

Expand Down
2 changes: 1 addition & 1 deletion enclone_vars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ exclude = ["src/bin/var_test.rs", "src/vars"]
[dependencies]
io_utils = { path = "../io_utils" }
itertools.workspace = true
pretty_trace = { path = "../pretty_trace" }

string_utils = { path = "../string_utils" }
vector_utils = { path = "../vector_utils" }
2 changes: 0 additions & 2 deletions enclone_vars/src/bin/export_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@

use enclone_vars::export_code::export_code;
use io_utils::{fwrite, open_for_write_new};
use pretty_trace::PrettyTrace;

use std::io::Write;

fn main() {
PrettyTrace::new().on();
let outs = export_code(0);
for out in outs {
let mut f = open_for_write_new![&out.0];
Expand Down
3 changes: 1 addition & 2 deletions enclone_vars/src/bin/var_sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
// Sort and replace the vars file.

use enclone_vars::sort_vars;
use pretty_trace::PrettyTrace;

use std::io::Write;

fn main() {
PrettyTrace::new().on();
let old = std::fs::read_to_string("enclone_vars/src/vars").unwrap();
let new = sort_vars(&old);
if new != old {
Expand Down
2 changes: 0 additions & 2 deletions enclone_vars/src/bin/var_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
// Parse the vars file to test if it's valid.

use enclone_vars::var::parse_variables;
use pretty_trace::PrettyTrace;

fn main() {
PrettyTrace::new().on();
let old = std::fs::read_to_string("enclone_vars/src/vars").unwrap();
let _ = parse_variables(&old);
}
1 change: 0 additions & 1 deletion equiv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ impl EquivRel {
// there are 1618950 orbits
// 1.5 seconds, delta peak mem = 258 Mb
// disjoint-sets = "0.4.2"
// extern crate disjoint_sets;
use disjoint_sets::UnionFind;
let mut uf = UnionFind::<u32>::new(N as usize);
Expand Down
2 changes: 0 additions & 2 deletions fasta_tools/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions graph_simple/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions hyperbase/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions io_utils/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions kmer_lookup/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions load_feature_bc/README.md

This file was deleted.

1 change: 0 additions & 1 deletion pretty_trace/.gitignore

This file was deleted.

31 changes: 0 additions & 31 deletions pretty_trace/Cargo.toml

This file was deleted.

21 changes: 0 additions & 21 deletions pretty_trace/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion pretty_trace/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions pretty_trace/examples/bad_traceback.rs

This file was deleted.

Loading

0 comments on commit e39af96

Please sign in to comment.