From 6a15d12154497ae7e884e1519031ab73728241fd Mon Sep 17 00:00:00 2001
From: "a.stevan" <antoine.stevan@isae-supaero.fr>
Date: Wed, 29 May 2024 10:47:49 +0200
Subject: [PATCH 1/3] make top-level `.nushell/` a module

---
 .nushell/mod.nu | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 .nushell/mod.nu

diff --git a/.nushell/mod.nu b/.nushell/mod.nu
new file mode 100644
index 00000000..4050035a
--- /dev/null
+++ b/.nushell/mod.nu
@@ -0,0 +1,10 @@
+export module binary.nu
+export module cargo.nu
+export module color.nu
+export module error.nu
+export module formats.nu
+export module fs.nu
+export module math.nu
+export module parse.nu
+export module plot.nu
+export module venv.nu
-- 
GitLab


From d6e654daa506923959f48f437b4cb0389891f05a Mon Sep 17 00:00:00 2001
From: "a.stevan" <antoine.stevan@isae-supaero.fr>
Date: Wed, 29 May 2024 10:48:26 +0200
Subject: [PATCH 2/3] use top-level `.nushell/` as a module

---
 README.md                            | 2 +-
 benchmarks/.nushell/commit/plot.nu   | 6 +++---
 benchmarks/.nushell/fec/plot.nu      | 8 ++++----
 benchmarks/.nushell/fec/run.nu       | 2 +-
 benchmarks/.nushell/recoding/plot.nu | 8 ++++----
 benchmarks/.nushell/recoding/run.nu  | 2 +-
 benchmarks/.nushell/setup/plot.nu    | 6 +++---
 bins/inbreeding/plot.nu              | 6 +++---
 bins/inbreeding/run.nu               | 2 +-
 examples/cli.nu                      | 2 +-
 komodo.nu                            | 2 +-
 tests/binary.nu                      | 2 +-
 tests/cli.nu                         | 2 +-
 tests/color.nu                       | 2 +-
 14 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/README.md b/README.md
index ae38c5eb..35f4be8d 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ Komodo provides a bunch of other binaries that might be interesting of useful to
 
 The easiest is to use the `cargo.nu` Nushell module as follows
 ```bash
-use .nushell/cargo.nu "cargo bin"
+use .nushell cargo "cargo bin"
 help cargo bin
 ```
 
diff --git a/benchmarks/.nushell/commit/plot.nu b/benchmarks/.nushell/commit/plot.nu
index c0b9e95b..576b200f 100644
--- a/benchmarks/.nushell/commit/plot.nu
+++ b/benchmarks/.nushell/commit/plot.nu
@@ -1,6 +1,6 @@
-use ../../../.nushell/math.nu *
-use ../../../.nushell/fs.nu check-file
-use ../../../.nushell/plot.nu [ into-axis-options, COMMON_OPTIONS, gplt ]
+use ../../../.nushell math *
+use ../../../.nushell fs check-file
+use ../../../.nushell plot [ into-axis-options, COMMON_OPTIONS, gplt ]
 
 export def main [data: path, --save: path] {
     check-file $data --span (metadata $data).span
diff --git a/benchmarks/.nushell/fec/plot.nu b/benchmarks/.nushell/fec/plot.nu
index 1d6efeb6..9ed47a41 100644
--- a/benchmarks/.nushell/fec/plot.nu
+++ b/benchmarks/.nushell/fec/plot.nu
@@ -1,7 +1,7 @@
-use ../../../.nushell/math.nu *
-use ../../../.nushell/plot.nu [ into-axis-options, COMMON_OPTIONS ]
-use ../../../.nushell/fs.nu check-file
-use ../../../.nushell/plot.nu gplt
+use ../../../.nushell math *
+use ../../../.nushell plot [ into-axis-options, COMMON_OPTIONS ]
+use ../../../.nushell fs check-file
+use ../../../.nushell plot gplt
 
 export def encoding [data: path, --save: path] {
     check-file $data --span (metadata $data).span
diff --git a/benchmarks/.nushell/fec/run.nu b/benchmarks/.nushell/fec/run.nu
index 8eccebec..ceafe8ad 100644
--- a/benchmarks/.nushell/fec/run.nu
+++ b/benchmarks/.nushell/fec/run.nu
@@ -1,4 +1,4 @@
-use ../../../.nushell/formats.nu *
+use ../../../.nushell formats *
 
 export def main [
     --output: path = "./fec.ndjson",
diff --git a/benchmarks/.nushell/recoding/plot.nu b/benchmarks/.nushell/recoding/plot.nu
index 64657f1a..ccc32ec2 100644
--- a/benchmarks/.nushell/recoding/plot.nu
+++ b/benchmarks/.nushell/recoding/plot.nu
@@ -1,7 +1,7 @@
-use ../../../.nushell/math.nu *
-use ../../../.nushell/plot.nu [ into-axis-options, COMMON_OPTIONS ]
-use ../../../.nushell/fs.nu check-file
-use ../../../.nushell/plot.nu gplt
+use ../../../.nushell math *
+use ../../../.nushell plot [ into-axis-options, COMMON_OPTIONS ]
+use ../../../.nushell fs check-file
+use ../../../.nushell plot gplt
 
 export def main [data: path, --save: path] {
     check-file $data --span (metadata $data).span
diff --git a/benchmarks/.nushell/recoding/run.nu b/benchmarks/.nushell/recoding/run.nu
index 0bd79e73..9b42ae72 100644
--- a/benchmarks/.nushell/recoding/run.nu
+++ b/benchmarks/.nushell/recoding/run.nu
@@ -1,4 +1,4 @@
-use ../../../.nushell/formats.nu *
+use ../../../.nushell formats *
 
 export def main [
     --output: path = "./recoding.ndjson",
diff --git a/benchmarks/.nushell/setup/plot.nu b/benchmarks/.nushell/setup/plot.nu
index c2ce80e4..c0ff7b9f 100644
--- a/benchmarks/.nushell/setup/plot.nu
+++ b/benchmarks/.nushell/setup/plot.nu
@@ -1,6 +1,6 @@
-use ../../../.nushell/math.nu *
-use ../../../.nushell/fs.nu check-file
-use ../../../.nushell/plot.nu [ into-axis-options, COMMON_OPTIONS, gplt ]
+use ../../../.nushell math *
+use ../../../.nushell fs check-file
+use ../../../.nushell plot [ into-axis-options, COMMON_OPTIONS, gplt ]
 
 export def main [data: path, --save: path] {
     check-file $data --span (metadata $data).span
diff --git a/bins/inbreeding/plot.nu b/bins/inbreeding/plot.nu
index 189b09fd..abb10a24 100644
--- a/bins/inbreeding/plot.nu
+++ b/bins/inbreeding/plot.nu
@@ -1,9 +1,9 @@
 use std repeat
 
 use consts.nu
-use ../../.nushell/plot.nu gplt
-use ../../.nushell/color.nu *
-use ../../.nushell/error.nu "error throw"
+use ../../.nushell plot gplt
+use ../../.nushell color *
+use ../../.nushell error "error throw"
 
 def "parse strategy" []: string -> record<type: string> {
     let s = $in
diff --git a/bins/inbreeding/run.nu b/bins/inbreeding/run.nu
index 920b0a19..f18f72c1 100644
--- a/bins/inbreeding/run.nu
+++ b/bins/inbreeding/run.nu
@@ -1,5 +1,5 @@
 use consts.nu
-use ../../.nushell/cargo.nu "cargo bin"
+use ../../.nushell cargo "cargo bin"
 
 export def main [
     --options: record<
diff --git a/examples/cli.nu b/examples/cli.nu
index c0cc5c72..12b75025 100755
--- a/examples/cli.nu
+++ b/examples/cli.nu
@@ -7,7 +7,7 @@ use ../komodo.nu [
     "komodo reconstruct",
     "komodo ls",
 ]
-use ../.nushell/binary.nu [ "bytes from_int" ]
+use ../.nushell binary [ "bytes from_int" ]
 
 use std assert
 
diff --git a/komodo.nu b/komodo.nu
index f0addc70..38b51c1a 100644
--- a/komodo.nu
+++ b/komodo.nu
@@ -2,7 +2,7 @@
 #
 # please run `komodo --help` or `komodo <tab>` to have a look at more information
 
-use .nushell/binary.nu ["bytes from_int"]
+use .nushell binary ["bytes from_int"]
 
 const KOMODO_BINARY = "./target/release/komodo"
 const DEFAULT_LOG_LEVEL = "INFO"
diff --git a/tests/binary.nu b/tests/binary.nu
index 8f45732e..1cb755f6 100644
--- a/tests/binary.nu
+++ b/tests/binary.nu
@@ -1,4 +1,4 @@
-use ../.nushell/binary.nu [
+use ../.nushell binary [
     "bytes decode", "bytes encode", "bytes from_int", "bytes to_int"
 ]
 
diff --git a/tests/cli.nu b/tests/cli.nu
index 637fcb8f..fd149dff 100644
--- a/tests/cli.nu
+++ b/tests/cli.nu
@@ -7,7 +7,7 @@ use ../komodo.nu [
     "komodo ls",
     "komodo clean",
 ]
-use ../.nushell/binary.nu [ "bytes from_int" ]
+use ../.nushell binary [ "bytes from_int" ]
 
 use std assert
 
diff --git a/tests/color.nu b/tests/color.nu
index 0374a9ea..27609447 100644
--- a/tests/color.nu
+++ b/tests/color.nu
@@ -1,4 +1,4 @@
-use ../.nushell/color.nu [
+use ../.nushell color [
     "color from-floats",
     "color from-ints",
     "color from-string",
-- 
GitLab


From faa0a026d3e0c6cee3c538eacc5486290cd20cb6 Mon Sep 17 00:00:00 2001
From: "a.stevan" <antoine.stevan@isae-supaero.fr>
Date: Wed, 29 May 2024 11:07:52 +0200
Subject: [PATCH 3/3] remove `.nushell venv` module

it's annoying to rely on a file being there at parse time...
---
 .nushell/mod.nu  | 1 -
 .nushell/plot.nu | 3 ---
 .nushell/venv.nu | 1 -
 3 files changed, 5 deletions(-)
 delete mode 100644 .nushell/venv.nu

diff --git a/.nushell/mod.nu b/.nushell/mod.nu
index 4050035a..c6e1c6a9 100644
--- a/.nushell/mod.nu
+++ b/.nushell/mod.nu
@@ -7,4 +7,3 @@ export module fs.nu
 export module math.nu
 export module parse.nu
 export module plot.nu
-export module venv.nu
diff --git a/.nushell/plot.nu b/.nushell/plot.nu
index 76d5c7dc..b31a4058 100644
--- a/.nushell/plot.nu
+++ b/.nushell/plot.nu
@@ -1,5 +1,3 @@
-use venv.nu VENV
-
 export const COMMON_OPTIONS = [
     --x-scale log
     --x-scale-base 2
@@ -70,6 +68,5 @@ export def into-axis-options [-x: string, -y: string]: table<x: float, y: float>
 }
 
 export def --wrapped gplt [...args: string] {
-    overlay use $VENV
     ^gplt ...$args
 }
diff --git a/.nushell/venv.nu b/.nushell/venv.nu
deleted file mode 100644
index 38a6002b..00000000
--- a/.nushell/venv.nu
+++ /dev/null
@@ -1 +0,0 @@
-export const VENV = ($nu.home-path | path join ".local/share/venvs/gplt/bin/activate.nu")
-- 
GitLab