However, when attempting applying this method in practice it became
- apparent that the recognition of relationships was insufficient. Consider
- the directories `deprecated` and `scratch_pad`. There is no
- 'Mr. Deprecated' or 'Mr. Scratch_Pad' who the contained files are
- for. (And this conclusion is not for the lack of trying. Even mythological
- beings did not suffice as agents.) Rather than saying a file has a
- relationship with an agent, these properties (directory names) are states
- imposed by decree by an agent on a file. Perhaps the developer, has
+
When attempting to apply the is-for property in practice it
+ became apparent that using this sole property was insufficient. Consider
+ the directories deprecated/ and scratch_pad/. There is no
+ Mr. Deprecated or Mr. Scratch_Pad who the contained
+ files are for. (And this conclusion is not for the lack of trying. Even
+ mythological beings did not suffice as agents.) Rather than being for an
+ agent, the files collected in such a directory have in common a state of
+ being that was imposed upon them by decree. Perhaps the developer, has
decreed that a file is now deprecated, or a build script has decreed that
it is a scratch_pad file. Such decrees are typically more dynamic than the
relationship properties. Also, these properties are disconnected from the
- contents of the file. When, for example, we say a file is for the java
- compiler we can surmise something about its contents. However when we say
- a file is `deprecated` we can surmise nothing about its contents.
+ contents of the file. When, for example, a file has the property of being
+ for the java compiler, we gain some information about its contents. In the
+ universe of possible messages sent through a file, such a file will
+ contain text that is proposed to be java syntax conforming. In contrast,
+ when we learn that a file is deprecated/ we gain no
+ information about the contents of the file, because any file can
+ be deprecated, independent of its contents.
To understand a directory name within this system, one can imagine
reading said name as part of a sentence that integrates the
- property. Consider two property names: 'is-a' and 'is-for'. For example,
- "Each file in the document/ directory is a document," or
- "Each file in the developer/ directory is for the developer."
- Although the property name is not carried over to the conventional file
- system, we can typically infer what it must be. It is beyond the scope of
- discussion here, but in actuality, our collections are defined by
- predicates that are given a file's properties and relationships as
- arguments, where the predicate resolves to true if and only if the file
- belongs to the collection. Now wouldn't that be interesting if we
- instead derived a probability?
+ property. Consider two property names: is-a
+ and is-for. For example, "Each file in
+ the document/ directory is-a document," or "Each
+ file in the developer/ directory is-for the
+ developer." Although the property name is not carried over from the
+ property based file system to the conventional file system, we can
+ typically infer what it must have been. (It is beyond the scope of
+ discussion here, but in actuality, property based file system collections
+ are defined by predicates. Each predicate is given a file's properties and
+ relationships as arguments, then resolves to true if and only if the file
+ belongs to the collection. Now wouldn't that be interesting if we instead
+ derived a probability?)
It is uncommon for a property value to be plural. While it is not
@@ -159,8 +190,8 @@
property. Hence when we make a file collection based on a shared property,
then carry that over as a directory name in a conventional file system,
the resulting directory name will often be singular. This pattern can be
- observed in the case of the `document/` directory, as shown in the prior
- paragraph.
+ observed in the case of the document/ directory, as shown in
+ the prior paragraph.
diff --git a/release_candidate/.githolder b/release/.githolder
similarity index 100%
rename from release_candidate/.githolder
rename to release/.githolder
diff --git a/release_candidate/black b/release/black
similarity index 100%
rename from release_candidate/black
rename to release/black
diff --git a/release_candidate/blue b/release/blue
similarity index 100%
rename from release_candidate/blue
rename to release/blue
diff --git a/release_candidate/green b/release/green
similarity index 100%
rename from release_candidate/green
rename to release/green
diff --git a/tester/javac/TestBench.java b/tester/javac/TestBench.java
new file mode 100644
index 0000000..0a9de3d
--- /dev/null
+++ b/tester/javac/TestBench.java
@@ -0,0 +1,29 @@
+import java.util.Map;
+
+public class TestBench {
+
+ public static void runTest_Map(Map test_map){
+ int totalTest_Map = test_map.size();
+ int passedTest_Map = 0;
+ int failedTest_Map = 0;
+
+ for( Map.Entry test : test_map.entrySet() ){
+ try{
+ if( test.getValue() ){
+ passedTest_Map++;
+ } else{
+ System.out.println( "failed: " + test.getKey() );
+ failedTest_Map++;
+ }
+ } catch(Exception e){
+ System.out.println( "failed: " + test.getKey() );
+ failedTest_Map++;
+ }
+ }
+
+ System.out.println("Total test_map run: " + totalTest_Map);
+ System.out.println("Total test_map passed: " + passedTest_Map);
+ System.out.println("Total test_map failed: " + failedTest_Map);
+ }
+
+}
diff --git a/tester/tool/env b/tester/tool/env
new file mode 100644
index 0000000..a630a47
--- /dev/null
+++ b/tester/tool/env
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+## input guards
+
+# instead of bailing, we will go fetch what we need
+env_should_be="tool_shared/bespoke/env"
+if [ "$ENV" != "$env_should_be" ]; then
+ source "$REPO_HOME"/"$env_should_be"
+fi
+
+if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
+ echo "$script_name:: This script must be sourced, not executed."
+ exit 1
+fi
+
+cd "$REPO_HOME"/tester/
+
+export ENV=$(script_fp)
+export PROJECT="$PROJECT"_tester
+
+export PATH=\
+"$REPO_HOME"/tester/tool/\
+:"$REPO_HOME"/tool_shared/bespoke/\
+"$JAVA_HOME"/bin\
+:"$PATH"
+
+export CLASSPATH=\
+:"$REPO_HOME"/developer/release/Ariadne.jar\
+:"$JAVA_HOME"/lib\
+:"$CLASSPATH"
+
+echo "$ENV complete."
diff --git a/tester/tool/env_tester b/tester/tool/env_tester
deleted file mode 100644
index eb6b6c7..0000000
--- a/tester/tool/env_tester
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-# environment common to all tests
-# each test directory also has an environment
-
-export JAVA_HOME="$REPO_HOME/tool/jdk-11"
-export GROOVY_HOME="$REPO_HOME/tool/groovy-4.0.9"
-
-export PATH=\
-"$REPO_HOME"/release_candidate\
-:"$JAVA_HOME"/bin\
-:"$GROOVY_HOME"/bin\
-:"$PATH"
diff --git a/tester/tool/make.sh b/tester/tool/make
similarity index 50%
rename from tester/tool/make.sh
rename to tester/tool/make
index 4ecb729..c9aca35 100755
--- a/tester/tool/make.sh
+++ b/tester/tool/make
@@ -1,10 +1,12 @@
#!/bin/env bash
-if [ -z "$ENV_TESTER" ]; then
+script_name=$(basename ${BASH_SOURCE[0]})
+if [ -z "$ENV_TESTER_LOCAL" ]; then
echo "make.sh:: script can only be run in the tester environment"
env_error=true
fi
-set -x
-groovyc TestGraph.groovy
+
+
+echo "$script_name done."
diff --git a/tool/env_administrator b/tool/env
similarity index 71%
rename from tool/env_administrator
rename to tool/env
index b85bd37..830913d 100644
--- a/tool/env_administrator
+++ b/tool/env
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
-# Ensure the script is sourced
+script_name=$(basename ${BASH_SOURCE[0]})
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
- echo "This script must be sourced, not executed. Exiting."
- return 1
+ echo "$script_name must be sourced, not executed. Exiting."
+ exit 1
fi
if [ -z "$ENV_BASE" ]; then
@@ -22,6 +22,6 @@ export PATH=\
# no sneaky hidden files
alias ls="ls -a"
-
export ENV_PM=true
-echo "${BASH_SOURCE[0]}" "complete"
+echo "$script_name done."
+
diff --git a/tool/env_base b/tool/env_base
deleted file mode 100644
index ff49183..0000000
--- a/tool/env_base
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-
-# Ensure the script is sourced
-if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
- echo "This script must be sourced, not executed. Exiting."
- return 1
-fi
-
-# These are things set by the `repo` command found in the `resource` project,
-# but if you don't have that, then source this into the environment.
-
-script_path="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
-export REPO_HOME="${script_path%/*}/"
-export PROJECT=$(basename "$REPO_HOME")
-
-PPS1="\n[$PROJECT]\n\u@\h§$(pwd)§\n> "
-PPS2=">> "
-
-echo REPO_HOME "$REPO_HOME"
-echo PROJECT "$PROJECT"
-echo "${BASH_SOURCE[0]}" "complete"
-
-export ENV_BASE=true
diff --git a/tool/env_developer b/tool/env_developer
deleted file mode 100644
index b1c5ffa..0000000
--- a/tool/env_developer
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-# Ensure the script is sourced
-if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
- echo "This script must be sourced, not executed. Exiting."
- return 1
-fi
-
-if [ -z "$ENV_BASE" ]; then
- script_path="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
- source "${script_path}/env_base"
-fi
-
-PROJECT="$PROJECT"_developer
-
-export PATH=\
-"$REPO_HOME"/developer/tool/\
-:"$REPO_HOME"/tool_shared/bespoke/\
-:"$PATH"
-
-# so the .gitignore files can be seen:
-alias ls="ls -a"
-
-cd "$REPO_HOME"/developer/
-export ENV_DEVELOPER=true
-source tool/env
-
-echo "${BASH_SOURCE[0]}" "complete"
-
-
-
diff --git a/tool/env_tester b/tool/env_tester
deleted file mode 100644
index 7a52fe9..0000000
--- a/tool/env_tester
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-
-# Ensure the script is sourced
-if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
- echo "This script must be sourced, not executed. Exiting."
- return 1
-fi
-
-# Check if REPO_HOME is set, if not source env_base
-if [ -z "$ENV_BASE" ]; then
- script_path="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
- source "${script_path}/env_base"
-fi
-
-PROJECT="$PROJECT"_TESTER
-
-export PATH=\
-"$REPO_HOME"/tester/executor/\
-:"$REPO_HOME"/tool_shared/bespoke/\
-:"$PATH"
-
-cd "$REPO_HOME"/tester/
-export ENV_TESTER=true
-source tool/env
-
-echo "${BASH_SOURCE[0]}" "complete"
diff --git a/tool_shared/bespoke/deprecate b/tool_shared/bespoke/deprecate
new file mode 100755
index 0000000..821e7ab
--- /dev/null
+++ b/tool_shared/bespoke/deprecate
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# cp subtree at under file path , and make all the copied
+# files read-only. The intended use case is for moving files to a `deprecated`
+# directory. This helps prevent subsequent accidental editing.
+
+SCRIPT_NAME=$(basename "$0")
+if [ "$#" -lt 2 ]; then
+ echo "Usage: $SCRIPT_NAME "
+ exit 1
+fi
+SRC="$1"
+DEST="$2"
+
+mkdir -p "$DEST"
+mv "$SRC" "$DEST"
+
+# make stuff readonly
+cd "$DEST" || exit
+chmod -R u-w,go-rwx "$DEST"
diff --git a/tool_shared/bespoke/env b/tool_shared/bespoke/env
new file mode 100644
index 0000000..1939b29
--- /dev/null
+++ b/tool_shared/bespoke/env
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+# environment shared by entire project
+
+# Path to this script
+script_path="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
+
+
+
+# Path to the repo is two directories up
+export REPO_HOME="${script_path%/*/*}/"
+
+# script name and path relative to the top of the project
+script_fn(){
+ echo "$(basename ${BASH_SOURCE[0]})"
+}
+script_fp(){
+ echo "$(realpath --relative-to="$REPO_HOME" "$script_path")/$(script_fn)"
+}
+export -f script_fn script_fp
+
+# REPO_HOME relative file path to this script
+# Calling the function correctly without braces
+export ENV=$(script_fp)
+
+# this script must be sourced, sort of like Python activate
+if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
+ echo "$ENV must be sourced, not executed. Exiting."
+ exit 1
+fi
+
+export PROJECT=$(basename "$REPO_HOME")
+
+# Third party tool(s) that the project admin kindly installed.
+# The developer and tester should use these links to find them.
+export JAVA_HOME="$REPO_HOME/tool_shared/third_party/jdk-11"
+
+# set the shell prompt to show the project
+PPS1="\n[$PROJECT]\n\u@\h§$(pwd)§\n> "
+PPS2=">> "
+
+echo ENV "$ENV"
+echo REPO_HOME "$REPO_HOME"
+echo PROJECT "$PROJECT"
+echo "$ENV completed."
+
+
diff --git a/tool_shared/bespoke/temp b/tool_shared/bespoke/temp
new file mode 100644
index 0000000..0a80f78
--- /dev/null
+++ b/tool_shared/bespoke/temp
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+# Path to this script
+script_path="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
+
+# Path to the repo is two directories up
+export REPO_HOME="${script_path%/*/*}/"
+
+# script name and path relative to the top of the project
+script_fn(){
+ echo "$(basename ${BASH_SOURCE[0]})"
+}
+script_fp(){
+ echo "$(realpath --relative-to="$REPO_HOME" "$script_path")/$(script_fn)"
+}
+
+# REPO_HOME relative file path to this script
+# Calling the function correctly without braces
+export ENV=$(script_fp)
+
+# Output the values
+echo "Script path: $script_path"
+echo "Repo home: $REPO_HOME"
+echo "ENV: $ENV"
diff --git a/tool_shared/bespoke/version b/tool_shared/bespoke/version
index 6e696ef..a2fede5 100755
--- a/tool_shared/bespoke/version
+++ b/tool_shared/bespoke/version
@@ -1,4 +1,8 @@
#!/bin/env bash
-echo 0.1
+# 0.1 pulled groovy files from GQL_to_Cypher build.gradle
+# 0.2 conversion to Java
+# 0.3 refactored, split into smaller pieces, made into package
+
+echo 0.3
diff --git a/tool_shared/bespoke/wipe_replease b/tool_shared/bespoke/wipe_replease
new file mode 100755
index 0000000..4b92b4b
--- /dev/null
+++ b/tool_shared/bespoke/wipe_replease
@@ -0,0 +1,17 @@
+#!/bin/bash
+# remove all files in the release directory
+set -e
+
+script_name=$(basename ${BASH_SOURCE[0]})
+if [ -z "$REPO_HOME" ]; then
+ echo "$script_name:: REPO_HOME is not set."
+ exit 1
+fi
+
+set -x
+cd "$REPO_HOME"
+rm -rf release/*
+set +x
+
+echo "$script_name done."
+
--
2.20.1