From 52701bdeda64d80892b5f6b7b870d4619f1f9e73 Mon Sep 17 00:00:00 2001
From: "a.stevan" <antoine.stevan@isae-supaero.fr>
Date: Mon, 3 Jun 2024 13:15:14 +0200
Subject: [PATCH 1/4] refactor inbreeding submodules in `src/.nushell/`

---
 bins/inbreeding/mod.nu                        | 14 +++++++-------
 bins/inbreeding/{ => src/.nushell}/build.nu   |  0
 bins/inbreeding/{ => src/.nushell}/consts.nu  |  0
 bins/inbreeding/{ => src/.nushell}/inspect.nu |  0
 bins/inbreeding/{ => src/.nushell}/list.nu    |  0
 bins/inbreeding/{ => src/.nushell}/load.nu    |  2 +-
 bins/inbreeding/{ => src/.nushell}/parse.nu   |  0
 bins/inbreeding/{ => src/.nushell}/path.nu    |  0
 bins/inbreeding/{ => src/.nushell}/plot.nu    |  6 +++---
 bins/inbreeding/{ => src/.nushell}/run.nu     |  2 +-
 bins/inbreeding/{ => src/.nushell}/watch.nu   |  0
 11 files changed, 12 insertions(+), 12 deletions(-)
 rename bins/inbreeding/{ => src/.nushell}/build.nu (100%)
 rename bins/inbreeding/{ => src/.nushell}/consts.nu (100%)
 rename bins/inbreeding/{ => src/.nushell}/inspect.nu (100%)
 rename bins/inbreeding/{ => src/.nushell}/list.nu (100%)
 rename bins/inbreeding/{ => src/.nushell}/load.nu (98%)
 rename bins/inbreeding/{ => src/.nushell}/parse.nu (100%)
 rename bins/inbreeding/{ => src/.nushell}/path.nu (100%)
 rename bins/inbreeding/{ => src/.nushell}/plot.nu (97%)
 rename bins/inbreeding/{ => src/.nushell}/run.nu (98%)
 rename bins/inbreeding/{ => src/.nushell}/watch.nu (100%)

diff --git a/bins/inbreeding/mod.nu b/bins/inbreeding/mod.nu
index 15e876c6..bb0b45a4 100644
--- a/bins/inbreeding/mod.nu
+++ b/bins/inbreeding/mod.nu
@@ -1,7 +1,7 @@
-export use build.nu
-export use watch.nu
-export use run.nu
-export use inspect.nu
-export use list.nu
-export use load.nu
-export use plot.nu
+export use src/.nushell/build.nu
+export use src/.nushell/watch.nu
+export use src/.nushell/run.nu
+export use src/.nushell/inspect.nu
+export use src/.nushell/list.nu
+export use src/.nushell/load.nu
+export use src/.nushell/plot.nu
diff --git a/bins/inbreeding/build.nu b/bins/inbreeding/src/.nushell/build.nu
similarity index 100%
rename from bins/inbreeding/build.nu
rename to bins/inbreeding/src/.nushell/build.nu
diff --git a/bins/inbreeding/consts.nu b/bins/inbreeding/src/.nushell/consts.nu
similarity index 100%
rename from bins/inbreeding/consts.nu
rename to bins/inbreeding/src/.nushell/consts.nu
diff --git a/bins/inbreeding/inspect.nu b/bins/inbreeding/src/.nushell/inspect.nu
similarity index 100%
rename from bins/inbreeding/inspect.nu
rename to bins/inbreeding/src/.nushell/inspect.nu
diff --git a/bins/inbreeding/list.nu b/bins/inbreeding/src/.nushell/list.nu
similarity index 100%
rename from bins/inbreeding/list.nu
rename to bins/inbreeding/src/.nushell/list.nu
diff --git a/bins/inbreeding/load.nu b/bins/inbreeding/src/.nushell/load.nu
similarity index 98%
rename from bins/inbreeding/load.nu
rename to bins/inbreeding/src/.nushell/load.nu
index 8581c85b..dcff55d8 100644
--- a/bins/inbreeding/load.nu
+++ b/bins/inbreeding/src/.nushell/load.nu
@@ -1,7 +1,7 @@
 use consts.nu
 use parse.nu [ "parse arg-experiment", "parse experiment" ]
 use path.nu [ "remove-cache-prefix" ]
-use ../../.nushell error "error throw"
+use ../../../../.nushell error "error throw"
 
 use list.nu
 
diff --git a/bins/inbreeding/parse.nu b/bins/inbreeding/src/.nushell/parse.nu
similarity index 100%
rename from bins/inbreeding/parse.nu
rename to bins/inbreeding/src/.nushell/parse.nu
diff --git a/bins/inbreeding/path.nu b/bins/inbreeding/src/.nushell/path.nu
similarity index 100%
rename from bins/inbreeding/path.nu
rename to bins/inbreeding/src/.nushell/path.nu
diff --git a/bins/inbreeding/plot.nu b/bins/inbreeding/src/.nushell/plot.nu
similarity index 97%
rename from bins/inbreeding/plot.nu
rename to bins/inbreeding/src/.nushell/plot.nu
index 6b267131..74522e15 100644
--- a/bins/inbreeding/plot.nu
+++ b/bins/inbreeding/src/.nushell/plot.nu
@@ -1,9 +1,9 @@
 use std repeat
 
 use consts.nu
-use ../../.nushell plot gplt
-use ../../.nushell color *
-use ../../.nushell error "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/src/.nushell/run.nu
similarity index 98%
rename from bins/inbreeding/run.nu
rename to bins/inbreeding/src/.nushell/run.nu
index 59610af7..a7d28512 100644
--- a/bins/inbreeding/run.nu
+++ b/bins/inbreeding/src/.nushell/run.nu
@@ -1,5 +1,5 @@
 use consts.nu
-use ../../.nushell error "error throw"
+use ../../../../.nushell error "error throw"
 
 const VALID_HEX_CHARS = "abcdefABCDEF0123456789"
 
diff --git a/bins/inbreeding/watch.nu b/bins/inbreeding/src/.nushell/watch.nu
similarity index 100%
rename from bins/inbreeding/watch.nu
rename to bins/inbreeding/src/.nushell/watch.nu
-- 
GitLab


From e99de24d0a99a03e275db37df22c4e7c96d7ad5d Mon Sep 17 00:00:00 2001
From: "a.stevan" <antoine.stevan@isae-supaero.fr>
Date: Mon, 3 Jun 2024 13:17:15 +0200
Subject: [PATCH 2/4] refactor `../../../../.nushell` in const

---
 bins/inbreeding/src/.nushell/consts.nu | 2 ++
 bins/inbreeding/src/.nushell/load.nu   | 2 +-
 bins/inbreeding/src/.nushell/plot.nu   | 6 +++---
 bins/inbreeding/src/.nushell/run.nu    | 2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/bins/inbreeding/src/.nushell/consts.nu b/bins/inbreeding/src/.nushell/consts.nu
index 177d568c..f7357d9d 100644
--- a/bins/inbreeding/src/.nushell/consts.nu
+++ b/bins/inbreeding/src/.nushell/consts.nu
@@ -1,2 +1,4 @@
 export const BIN = "./target/release/inbreeding"
 export const CACHE = ($nu.home-path | path join .cache komodo inbreeding)
+
+export const NUSHELL = "../../../../.nushell"
diff --git a/bins/inbreeding/src/.nushell/load.nu b/bins/inbreeding/src/.nushell/load.nu
index dcff55d8..d410a90a 100644
--- a/bins/inbreeding/src/.nushell/load.nu
+++ b/bins/inbreeding/src/.nushell/load.nu
@@ -1,7 +1,7 @@
 use consts.nu
 use parse.nu [ "parse arg-experiment", "parse experiment" ]
 use path.nu [ "remove-cache-prefix" ]
-use ../../../../.nushell error "error throw"
+use $consts.NUSHELL error "error throw"
 
 use list.nu
 
diff --git a/bins/inbreeding/src/.nushell/plot.nu b/bins/inbreeding/src/.nushell/plot.nu
index 74522e15..4405a12b 100644
--- a/bins/inbreeding/src/.nushell/plot.nu
+++ b/bins/inbreeding/src/.nushell/plot.nu
@@ -1,9 +1,9 @@
 use std repeat
 
 use consts.nu
-use ../../../../.nushell plot gplt
-use ../../../../.nushell color *
-use ../../../../.nushell error "error throw"
+use $consts.NUSHELL plot gplt
+use $consts.NUSHELL color *
+use $consts.NUSHELL error "error throw"
 
 def "parse strategy" []: string -> record<type: string> {
     let s = $in
diff --git a/bins/inbreeding/src/.nushell/run.nu b/bins/inbreeding/src/.nushell/run.nu
index a7d28512..bd0d37c0 100644
--- a/bins/inbreeding/src/.nushell/run.nu
+++ b/bins/inbreeding/src/.nushell/run.nu
@@ -1,5 +1,5 @@
 use consts.nu
-use ../../../../.nushell error "error throw"
+use $consts.NUSHELL error "error throw"
 
 const VALID_HEX_CHARS = "abcdefABCDEF0123456789"
 
-- 
GitLab


From e7547f23ffbda74f8aed8e8089145db0c05c54e3 Mon Sep 17 00:00:00 2001
From: "a.stevan" <antoine.stevan@isae-supaero.fr>
Date: Mon, 3 Jun 2024 13:31:44 +0200
Subject: [PATCH 3/4] update the README

---
 bins/inbreeding/README.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bins/inbreeding/README.md b/bins/inbreeding/README.md
index e747cd4f..257e1f5a 100644
--- a/bins/inbreeding/README.md
+++ b/bins/inbreeding/README.md
@@ -1,6 +1,6 @@
-- build the example for best performance with [`inbreeding build`](./build.nu)
-- run the experiment with [`inbreeding run`](./run.nu)
-- plot the results with [`inbreeding plot`](./plot.nu)
+- build the example for best performance with [`inbreeding build`](./src/.nushell/build.nu)
+- run the experiment with [`inbreeding run`](./src/.nushell/run.nu)
+- plot the results with [`inbreeding plot`](./src/.nushell/plot.nu)
 
 # Example
 ```bash
-- 
GitLab


From 3ea5b4addf984c4e1871d7eef6a6329fcdd879e5 Mon Sep 17 00:00:00 2001
From: "a.stevan" <antoine.stevan@isae-supaero.fr>
Date: Mon, 3 Jun 2024 13:33:53 +0200
Subject: [PATCH 4/4] fix snippet

---
 bins/inbreeding/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bins/inbreeding/README.md b/bins/inbreeding/README.md
index 257e1f5a..32e32cac 100644
--- a/bins/inbreeding/README.md
+++ b/bins/inbreeding/README.md
@@ -42,7 +42,7 @@ inbreeding load $experiment | inbreeding plot
 
 ## plot all experiments
 ```bash
-use bins/inbreeding/consts.nu CACHE
+use bins/inbreeding/src/.nushell/consts.nu CACHE
 use bins/inbreeding
 
 const FIGURES_DIR = ($CACHE | path join figures)
-- 
GitLab