Repository: kamangir/vancouver-watching (language: python)

Issue:
refactor - kamangir/bolt#746



Discussion / hints:

Fix patch:
diff --git a/.abcli/actions.sh b/.abcli/actions.sh
deleted file mode 100644
index 39b54fe..0000000
--- a/.abcli/actions.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /usr/bin/env bash
-
-function vancouver_watching_action_git_before_push() {
-    vancouver_watching pypi build
-}
diff --git a/notebooks/ultralytics_api.ipynb b/notebooks/ultralytics_api.ipynb
index b2d3580..bdb60ed 100644
--- a/notebooks/ultralytics_api.ipynb
+++ b/notebooks/ultralytics_api.ipynb
@@ -16,7 +16,7 @@
             "metadata": {},
             "outputs": [],
             "source": [
-                "# !cd ~/git/Vancouver-Watching; pip3 install -e ."
+                "# !cd ~/git/vancouver-watching; pip3 install -e ."
             ]
         },
         {
diff --git a/notebooks/ultralytics_original.ipynb b/notebooks/ultralytics_original.ipynb
index 38babdd..1751a60 100644
--- a/notebooks/ultralytics_original.ipynb
+++ b/notebooks/ultralytics_original.ipynb
@@ -16,7 +16,7 @@
             "metadata": {},
             "outputs": [],
             "source": [
-                "# !cd ~/git/Vancouver-Watching; pip3 install -e ."
+                "# !cd ~/git/vancouver-watching; pip3 install -e ."
             ]
         },
         {
diff --git a/notebooks/update.ipynb b/notebooks/update.ipynb
index 8452780..5965000 100644
--- a/notebooks/update.ipynb
+++ b/notebooks/update.ipynb
@@ -24,7 +24,7 @@
             "metadata": {},
             "outputs": [],
             "source": [
-                "# !pip3 install -r ~/git/Vancouver-Watching/requirements.txt\n",
+                "# !pip3 install -r ~/git/vancouver-watching/requirements.txt\n",
                 "# !pip3 uninstall -y abcli\n",
                 "# !cd ~/git/awesome-bash-cli/; pip3 install -e ."
             ]
diff --git a/setup.py b/setup.py
index 9fe38ec..09aeabe 100644
--- a/setup.py
+++ b/setup.py
@@ -1,9 +1,9 @@
-from vancouver_watching import NAME, VERSION, DESCRIPTION
+from vancouver_watching import NAME, VERSION, DESCRIPTION, REPO_NAME
 from blueness.pypi import setup
 
 setup(
     filename=__file__,
-    repo_name="Vancouver-Watching",
+    repo_name=REPO_NAME,
     name=NAME,
     version=VERSION,
     description=DESCRIPTION,
diff --git a/vancouver_watching/.abcli/actions.sh b/vancouver_watching/.abcli/actions.sh
new file mode 100644
index 0000000..c92b28f
--- /dev/null
+++ b/vancouver_watching/.abcli/actions.sh
@@ -0,0 +1,6 @@
+#! /usr/bin/env bash
+
+function vancouver_watching_action_git_before_push() {
+    [[ "$(abcli_git get_branch)" == "main" ]] &&
+        vancouver_watching pypi build
+}
diff --git a/.abcli/aka.sh b/vancouver_watching/.abcli/aka.sh
similarity index 100%
rename from .abcli/aka.sh
rename to vancouver_watching/.abcli/aka.sh
diff --git a/.abcli/alias.sh b/vancouver_watching/.abcli/alias.sh
similarity index 100%
rename from .abcli/alias.sh
rename to vancouver_watching/.abcli/alias.sh
diff --git a/.abcli/discover.sh b/vancouver_watching/.abcli/discover.sh
similarity index 93%
rename from .abcli/discover.sh
rename to vancouver_watching/.abcli/discover.sh
index 793642a..c0d43ab 100644
--- a/.abcli/discover.sh
+++ b/vancouver_watching/.abcli/discover.sh
@@ -35,5 +35,4 @@ function vancouver_watching_discover() {
     abcli_upload - $object_name
 }
 
-abcli_source_path \
-    $abcli_path_git/Vancouver-Watching/.abcli/discovery
+abcli_source_path - caller,suffix=/discovery
diff --git a/.abcli/discovery/iran.sh b/vancouver_watching/.abcli/discovery/iran.sh
similarity index 100%
rename from .abcli/discovery/iran.sh
rename to vancouver_watching/.abcli/discovery/iran.sh
diff --git a/.abcli/discovery/vancouver.sh b/vancouver_watching/.abcli/discovery/vancouver.sh
similarity index 100%
rename from .abcli/discovery/vancouver.sh
rename to vancouver_watching/.abcli/discovery/vancouver.sh
diff --git a/.abcli/ingest.sh b/vancouver_watching/.abcli/ingest.sh
similarity index 100%
rename from .abcli/ingest.sh
rename to vancouver_watching/.abcli/ingest.sh
diff --git a/.abcli/list.sh b/vancouver_watching/.abcli/list.sh
similarity index 100%
rename from .abcli/list.sh
rename to vancouver_watching/.abcli/list.sh
diff --git a/.abcli/openai_vision.sh b/vancouver_watching/.abcli/openai_vision.sh
similarity index 100%
rename from .abcli/openai_vision.sh
rename to vancouver_watching/.abcli/openai_vision.sh
diff --git a/.abcli/process.sh b/vancouver_watching/.abcli/process.sh
similarity index 100%
rename from .abcli/process.sh
rename to vancouver_watching/.abcli/process.sh
diff --git a/.abcli/update.sh b/vancouver_watching/.abcli/update.sh
similarity index 100%
rename from .abcli/update.sh
rename to vancouver_watching/.abcli/update.sh
diff --git a/.abcli/vancouver_watching.sh b/vancouver_watching/.abcli/vancouver_watching.sh
similarity index 78%
rename from .abcli/vancouver_watching.sh
rename to vancouver_watching/.abcli/vancouver_watching.sh
index 6565733..c1e7307 100755
--- a/.abcli/vancouver_watching.sh
+++ b/vancouver_watching/.abcli/vancouver_watching.sh
@@ -18,12 +18,11 @@ function vancouver_watching() {
         "${@:2}"
 }
 
-abcli_source_path \
-    $abcli_path_git/Vancouver-Watching/.abcli/tests
+abcli_source_path - caller,suffix=/tests
 
 abcli_env dot load \
-    plugin=Vancouver-Watching
+    plugin=vancouver_watching
 abcli_env dot load \
-    filename=vancouver_watching/config.env,plugin=Vancouver-Watching
+    filename=vancouver_watching/config.env,plugin=vancouver_watching
 
 abcli_log $(vancouver_watching version --show_icon 1)
diff --git a/vancouver_watching/__init__.py b/vancouver_watching/__init__.py
index 90dfd5c..6e0178f 100644
--- a/vancouver_watching/__init__.py
+++ b/vancouver_watching/__init__.py
@@ -4,4 +4,6 @@
 
 DESCRIPTION = f"{ICON} Vancouver Watching with AI."
 
-VERSION = "3.349.1"
+VERSION = "3.359.1"
+
+REPO_NAME = "vancouver-watching"
diff --git a/vancouver_watching/discover/functions.py b/vancouver_watching/discover/functions.py
index 98e515e..f056387 100644
--- a/vancouver_watching/discover/functions.py
+++ b/vancouver_watching/discover/functions.py
@@ -68,8 +68,8 @@ def get_list_of_areas():
         file.name(filename)
         for filename in file.list_of(
             os.path.join(
-                env.abcli_path_git,
-                "Vancouver-Watching/.abcli/discovery/*.sh",
+                file.path(__file__),
+                "../.abcli/discovery/*.sh",
             )
         )
     ]


Test patch:
diff --git a/.abcli/tests/ingest.sh b/vancouver_watching/.abcli/tests/ingest.sh
similarity index 100%
rename from .abcli/tests/ingest.sh
rename to vancouver_watching/.abcli/tests/ingest.sh
diff --git a/.abcli/tests/list.sh b/vancouver_watching/.abcli/tests/list.sh
similarity index 100%
rename from .abcli/tests/list.sh
rename to vancouver_watching/.abcli/tests/list.sh
diff --git a/.abcli/tests/process.sh b/vancouver_watching/.abcli/tests/process.sh
similarity index 100%
rename from .abcli/tests/process.sh
rename to vancouver_watching/.abcli/tests/process.sh