From: Thomas Walker Lynch Date: Tue, 23 Jun 2026 07:41:43 +0000 (+0000) Subject: updates RT-style method X-Git-Url: https://git.reasoningtechnology.com/RT-Style_locator.js?a=commitdiff_plain;h=3184da7328272c25001d0f952159d4434804fb32;p=Harmony updates RT-style method --- diff --git a/RT-style.js b/RT-style.js new file mode 100644 index 0000000..94ebd32 --- /dev/null +++ b/RT-style.js @@ -0,0 +1,38 @@ +// RT-style.js +window.RT = window.RT || {}; + +// Configuration +window.RT.project_name = "RT-style"; +window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-style/consumer/made"; + +(function() { + let style_path = window.RT.server_url; + + if (window.RT.project_name) { + const path = window.location.pathname; + const project_root_index = path.indexOf('/' + window.RT.project_name + '/'); + + if (project_root_index !== -1) { + const absolute_project_root = path.substring(0, project_root_index + window.RT.project_name.length + 1); + style_path = absolute_project_root + "/shared/linked-project/RT-style/consumer/made"; + } else { + console.warn("RT-style: Cannot locate project root '/" + window.RT.project_name + "/'. Falling back to server URL."); + } + } + + window.RT.dirpr_library = style_path; + + // 1. Inject the loader script + document.write(' - diff --git a/administrator/document/installation_Python.org b/administrator/document/installation_Python.org new file mode 100644 index 0000000..06155b7 --- /dev/null +++ b/administrator/document/installation_Python.org @@ -0,0 +1,73 @@ +#+TITLE: Installing Python in Harmony +#+AUTHOR: Thomas Walker Lynch +#+OPTIONS: toc:2 num:nil + +* Overview + +This document describes how to install a project-local Python environment under: + +#+begin_src bash +shared/linked-project/Python +#+end_src + +* Precondition + +Ensure the following: + +- You are in a POSIX shell with =python3= installed. +- The =python3-venv= package is available (on Debian: =sudo apt install python3-venv=). +- You have sourced the Harmony environment via =env_toolsmith= to initialize =REPO_HOME= and related variables. + +* Step-by-Step Installation + +1. Source the Harmony environment: + #+begin_src bash + source env_toolsmith + #+end_src + +2. Create the virtual environment: + #+begin_src bash + python3 -m venv "$REPO_HOME/shared/linked-project/Python" + #+end_src + +3. Activate it temporarily to install required packages: + #+begin_src bash + source "$REPO_HOME/shared/linked-project/Python/bin/activate" + pip install --upgrade pip + pip install pytest # Add any shared packages here + deactivate + #+end_src + +4. Rename Python's default activate and deactivate: + Harmony provides its own role-aware environment management. Using Python’s default activation scripts may interfere with prompt logic, PATH order, and role-specific behavior. + + Disable the default scripts by renaming them: + #+begin_src bash + mv "$REPO_HOME/shared/linked-project/Python/bin/activate" \ + "$REPO_HOME/shared/linked-project/Python/bin/activate_deprecated" + #+end_src + + This ensures that accidental sourcing of Python’s =activate= script won't override Harmony's environment setup. + +5. Verify installation: + #+begin_src bash + ls "$REPO_HOME/shared/linked-project/Python/bin/python3" + #+end_src + + The binary should exist and report a working Python interpreter when run. + +* Notes + +- The virtual environment is deliberately named =Python=, not =venv=, to reflect its role as a shared system component. +- Harmony environment scripts define and control =VIRTUAL_ENV=, =PYTHON_HOME=, and =PATH=, making Python activation seamless and uniform. +- There is no need to use Python’s =bin/activate= directly — it is fully replaced by Harmony’s environment logic. + +* Related Files + +- =shared/authored/env= +- =shared/authored/env_source= +- =env_developer=, =env_tester=, =env_toolsmith= + +* Last Verified + +2025-05-19 :: Activate/deactivate renamed post-install. Requires Harmony environment sourcing prior to execution. diff --git a/administrator/document/installation_generic.org b/administrator/document/installation_generic.org new file mode 100644 index 0000000..db88651 --- /dev/null +++ b/administrator/document/installation_generic.org @@ -0,0 +1,81 @@ + +This is the generic install.org doc that comes with the skeleton. + +1. $REPO_HOME/shared/linked-project/.gitignore: + + * + !/.gitignore + !/patch + + The only things from the third party directory that will be pushed to the repo origin is the .gitignore file and the patches. + + +2. downloaded tar files etc. go into the directory `upstream` + + $REPO_HOME/shared/upstream + + Typically the contents of upstream are deleted after the install. + +3. for the base install + + cd $REPO_HOME/shared/linked-project + do whatever it takes to install tool, as examples: + git clone + tar -xzf ../upstream/tar + ... + + Be sure to add the path to the tool executable(s) in the $REPO_HOME/env_$ROLE files for the $ROLE who uses the tool. + + Assuming you are not also developing the tool, for safety + change each installed git project to a local branch: + + b=__local_$USER + git switch -c "$b" + + +4. Define some variables to simplify our discussion. Lowercase variable names + are not exported from the shell. + + # already set in the environment + # REPO_HOME + # PROJECT + # USER + + # example tool names: 'RT_gcc' 'RT-project share` etc. + tool= + tool_dpath="$REPO_HOME/shared/linked-project/$tool" + patch_dpath="$REPO_HOME/shared/patch/" + + +5. create a patch series (from current vendor state → your local edits) + + # this can be repeated and will create an encompassing diff file + + # optionally crate a new branch after cloning the third party tool repo and work from there. You won't make any commits, but in case you plan to ever check the changes in, or have a the bad habit of doing ommits burned into your brain-stem, making a brnch will help. + + # make changes + + cd "$tool_dpath" + + # do your edits + + # Stage edits. Do not commit them!! Be sure you are in the third party + # tool directory when doing `git add -A` and `git diff` commands. + git add -A + + # diff the stage from the current repo to create the patch file + git diff --staged > "$patch_dpath/$tool" + + # the diff file can be added to the project and checked in at the project level. + + +6. how to apply an existing patch + + Get a fresh clone of the tool into $tool_dpath. + + cd "$tool_dpath" + git apply "$patch_dpath/$tool" + + You can see what `git apply` would do by running + + git apply --check /path/to/your/patch_dpath/$tool diff --git a/developer/document/RT-style.js b/developer/document/RT-style.js new file mode 100644 index 0000000..f5a7c75 --- /dev/null +++ b/developer/document/RT-style.js @@ -0,0 +1,42 @@ +// RT-style.js (External consumer project router) +window.RT = window.RT || {}; + +// --- Configuration --- +// Define the consumer project name to allow dynamic local file:// calculation. +window.RT.project_name = "Harmony"; + +// Fallback URL when served over a network where the project root is not in the URI. +window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-style/consumer/made/Manuscript"; + +(function() { + let style_path = window.RT.server_url; + + if (window.RT.project_name) { + const path = window.location.pathname; + const project_root_index = path.indexOf('/' + window.RT.project_name + '/'); + + if (project_root_index !== -1) { + // substring(0, stop) extracts up to the project name, leaving off the trailing slash. + // We append the explicit forward slash before navigating into the shared boundary. + const absolute_project_root = path.substring(0, project_root_index + window.RT.project_name.length + 1); + style_path = absolute_project_root + "/shared/linked-project/RT-style/consumer/made/Manuscript"; + } else { + console.warn("RT-style: Cannot locate project root '/" + window.RT.project_name + "/' in URI. Falling back to server_url."); + } + } + + window.RT.dirpr_library = style_path; + + // 1. Inject the loader script + document.write(' - diff --git a/developer/document/single-file_C-module-and-namespace.html b/developer/document/single-file_C-module-and-namespace.html index 3109daa..db0e657 100644 --- a/developer/document/single-file_C-module-and-namespace.html +++ b/developer/document/single-file_C-module-and-namespace.html @@ -3,16 +3,9 @@ C modules, namespaces, and the build lifecycle + - diff --git a/document/RT-style.js b/document/RT-style.js new file mode 100644 index 0000000..f5a7c75 --- /dev/null +++ b/document/RT-style.js @@ -0,0 +1,42 @@ +// RT-style.js (External consumer project router) +window.RT = window.RT || {}; + +// --- Configuration --- +// Define the consumer project name to allow dynamic local file:// calculation. +window.RT.project_name = "Harmony"; + +// Fallback URL when served over a network where the project root is not in the URI. +window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-style/consumer/made/Manuscript"; + +(function() { + let style_path = window.RT.server_url; + + if (window.RT.project_name) { + const path = window.location.pathname; + const project_root_index = path.indexOf('/' + window.RT.project_name + '/'); + + if (project_root_index !== -1) { + // substring(0, stop) extracts up to the project name, leaving off the trailing slash. + // We append the explicit forward slash before navigating into the shared boundary. + const absolute_project_root = path.substring(0, project_root_index + window.RT.project_name.length + 1); + style_path = absolute_project_root + "/shared/linked-project/RT-style/consumer/made/Manuscript"; + } else { + console.warn("RT-style: Cannot locate project root '/" + window.RT.project_name + "/' in URI. Falling back to server_url."); + } + } + + window.RT.dirpr_library = style_path; + + // 1. Inject the loader script + document.write(' - diff --git a/document/role-and-workflow_product-development.html b/document/role-and-workflow_product-development.html index 57adde1..47c5b2a 100644 --- a/document/role-and-workflow_product-development.html +++ b/document/role-and-workflow_product-development.html @@ -3,16 +3,9 @@ Product development roles and workflow + - diff --git a/document/role-and-workflow_product-maintenance.html b/document/role-and-workflow_product-maintenance.html index 5cccbbd..e2c59db 100644 --- a/document/role-and-workflow_product-maintenance.html +++ b/document/role-and-workflow_product-maintenance.html @@ -3,16 +3,9 @@ Product maintenance roles and workflow + - diff --git a/shared/document/.gitkeep b/shared/document/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/shared/document/RT-style.js b/shared/document/RT-style.js new file mode 100644 index 0000000..f5a7c75 --- /dev/null +++ b/shared/document/RT-style.js @@ -0,0 +1,42 @@ +// RT-style.js (External consumer project router) +window.RT = window.RT || {}; + +// --- Configuration --- +// Define the consumer project name to allow dynamic local file:// calculation. +window.RT.project_name = "Harmony"; + +// Fallback URL when served over a network where the project root is not in the URI. +window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-style/consumer/made/Manuscript"; + +(function() { + let style_path = window.RT.server_url; + + if (window.RT.project_name) { + const path = window.location.pathname; + const project_root_index = path.indexOf('/' + window.RT.project_name + '/'); + + if (project_root_index !== -1) { + // substring(0, stop) extracts up to the project name, leaving off the trailing slash. + // We append the explicit forward slash before navigating into the shared boundary. + const absolute_project_root = path.substring(0, project_root_index + window.RT.project_name.length + 1); + style_path = absolute_project_root + "/shared/linked-project/RT-style/consumer/made/Manuscript"; + } else { + console.warn("RT-style: Cannot locate project root '/" + window.RT.project_name + "/' in URI. Falling back to server_url."); + } + } + + window.RT.dirpr_library = style_path; + + // 1. Inject the loader script + document.write('