<head>
<meta charset="UTF-8">
<title>Project Structure and Ontology</title>
- <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap" rel="stylesheet">
<script src="setup.js"></script>
- <script> window.StyleRT.body_visibility_hidden(); </script>
<script>
window.StyleRT.include('RT/theme');
window.StyleRT.include('RT/layout/article_tech_ref');
<h1>Top-Level Repository Layout</h1>
<p>
- A team member will source the project setup file to take on a role. As of this writing, the supported roles are: <RT-code>administrator</RT-code>, <RT-code>developer</RT-code>, <RT-code>tester</RT-code>, and <RT-code>user</RT-code>.
+ A team member will source the project setup file to take on a role. As of this writing, the supported roles are: <RT-code>administrator</RT-code>, <RT-code>developer</RT-code>, <RT-code>tester</RT-code>, and <RT-code>consumer</RT-code>.
</p>
<ul>
<li><RT-code>administrator/</RT-code> — Project-local tools and skeleton maintenance.</li>
<li><RT-code>developer/</RT-code> — Primary workspace for developers.</li>
<li><RT-code>tester/</RT-code> — Regression and validation workspace for testers.</li>
- <li><RT-code>user/</RT-code> — Consumption workspace holding the <RT-code>release</RT-code> directory.</li>
+ <li><RT-code>consumer/</RT-code> — Consumption workspace holding the <RT-code>release</RT-code> directory.</li>
<li><RT-code>shared/</RT-code> — Shared ecosystem tools and global environments.</li>
</ul>
- <h1>The User Tree</h1>
+ <h1>The Consumer Tree</h1>
<p>
- The <RT-code>user/release/</RT-code> tree is where developers put work product that is ready to be consumed. The entire <RT-code>user/release</RT-code> directory is git-ignored and treated as a transient deployment target.
+ The <RT-code>consumer/release/</RT-code> tree is where developers put work product that is ready to be consumed. The entire <RT-code>consumer/release</RT-code> directory is git-ignored and treated as a transient deployment target.
</p>
<p>
Artifacts arrive in the <RT-code>release/</RT-code> tree <em>only</em> when the developer invokes the <RT-code>release</RT-code> script, which performs a flat-copy from the developer's <RT-code>scratchpad/stage</RT-code> directory.
<head>
<meta charset="UTF-8">
<title>Workflow and Build Contract</title>
- <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap" rel="stylesheet">
- <script src="../../style/body_visibility_hidden.js"></script>
- <script> window.StyleRT.body_visibility_hidden(); </script>
+ <script src="setup.js"></script>
+ <script>
+ window.StyleRT.include('RT/theme');
+ window.StyleRT.include('RT/layout/article_tech_ref');
+ </script>
</head>
<body>
<RT-article>
<li>Write and modify <RT-code>authored/</RT-code> source.</li>
<li>Run builds and stage artifacts in <RT-code>scratchpad/stage</RT-code>.</li>
<li>Spot test in <RT-code>experiment/</RT-code>.</li>
- <li>Execute the <RT-code>release write</RT-code> script to copy artifacts to <RT-code>user/release</RT-code> for consumption/testing.</li>
+ <li>Execute the <RT-code>release write</RT-code> script to copy artifacts to <RT-code>consumer/release</RT-code> for consumption/testing.</li>
</ol>
<h2>Tester Role</h2>
<p>Responsibilities:</p>
<ol>
- <li>Validate candidates under <RT-code>user/release/</RT-code>.</li>
+ <li>Validate candidates under <RT-code>consumer/release/</RT-code>.</li>
<li>Run regression suites.</li>
<li>Approve for quality and completeness, and create release branches.</li>
</ol>
. setup administrator
. setup developer
. setup tester
-. setup user
+. setup consumer
</RT-code>
<p>
It is common to have multiple terminal sessions or IDEs open, each running under a different role environment.
<h1>Release Promotion</h1>
<p>
- Building and promotion are separate activities. The developer compiles and stages files in <RT-code>developer/scratchpad/stage</RT-code>. The developer then runs <RT-code>release write</RT-code> to transfer those files to <RT-code>user/release</RT-code>.
+ Building and promotion are separate activities. The developer compiles and stages files in <RT-code>developer/scratchpad/stage</RT-code>. The developer then runs <RT-code>release write</RT-code> to transfer those files to <RT-code>consumer/release</RT-code>.
</p>
<p>
- The <RT-code>user/release</RT-code> directory is strictly an untracked deployment target. No tools may rebuild during promotion, and no builds are run directly inside the release directory.
+ The <RT-code>consumer/release</RT-code> directory is strictly an untracked deployment target. No tools may rebuild during promotion, and no builds are run directly inside the release directory.
</p>
-
- <script src="../../style/style_orchestrator.js"></script>
</RT-article>
</body>
</html>
window.RT_REPO_ROOT = "../../";
-
document.write('<script src="' + window.RT_REPO_ROOT + 'shared/style_directory_dict.js"></script>');
document.write('<script src="' + window.RT_REPO_ROOT + 'shared/third_party/RT-style-JS_public/consumer/release/RT/core/loader.js"></script>');
document.write('<script src="' + window.RT_REPO_ROOT + 'shared/third_party/RT-style-JS_public/consumer/release/RT/core/body_visibility_hidden.js"></script>');
<head>
<meta charset="UTF-8">
<title>RT Prescriptive Code Format Guide</title>
- <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap" rel="stylesheet">
- <script src="../../style/body_visibility_hidden.js"></script>
- <script> window.StyleRT.body_visibility_hidden(); </script>
+ <script src="setup.js"></script>
+ <script>
+ window.StyleRT.include('RT/theme');
+ window.StyleRT.include('RT/layout/article_tech_ref');
+ </script>
</head>
<body>
<RT-article>
<li>Never use tabs.</li>
<li>Nest lines under the syntactic element that opened them.</li>
</ul>
-
- <script src="../../style/style_orchestrator.js"></script>
</RT-article>
</body>
</html>
<head>
<meta charset="UTF-8">
<title>RT Prescriptive Code Format Guide</title>
- <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap" rel="stylesheet">
- <script src="../../style/body_visibility_hidden.js"></script>
- <script> window.StyleRT.body_visibility_hidden(); </script>
+ <script src="setup.js"></script>
+ <script>
+ window.StyleRT.include('RT/theme');
+ window.StyleRT.include('RT/layout/article_tech_ref');
+ </script>
</head>
<body>
<RT-article>
<li>Never use tabs.</li>
<li>Nest lines under the syntactic element that opened them.</li>
</ul>
-
- <script src="../../style/style_orchestrator.js"></script>
</RT-article>
</body>
</html>
<head>
<meta charset="UTF-8">
<title>Naming and Directory Conventions</title>
- <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap" rel="stylesheet">
- <script src="../../style/body_visibility_hidden.js"></script>
- <script> window.StyleRT.body_visibility_hidden(); </script>
+ <script src="setup.js"></script>
+ <script>
+ window.StyleRT.include('RT/theme');
+ window.StyleRT.include('RT/layout/article_tech_ref');
+ </script>
</head>
<body>
<RT-article>
<p>
The RT C coding environment does not use separate source and header files. Instead, a variable is set that gates off the implementation if the source code is to be used as a header. Hence, all of our C source fits fine within an <RT-code>authored</RT-code> directory.
</p>
-
- <script src="../../style/style_orchestrator.js"></script>
</RT-article>
</body>
</html>
<head>
<meta charset="UTF-8">
<title>Language Addenda (C, Python, Bash, Lisp)</title>
- <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap" rel="stylesheet">
- <script src="../../style/body_visibility_hidden.js"></script>
- <script> window.StyleRT.body_visibility_hidden(); </script>
+ <script src="setup.js"></script>
+ <script>
+ window.StyleRT.include('RT/theme');
+ window.StyleRT.include('RT/layout/article_tech_ref');
+ </script>
</head>
<body>
<RT-article>
<p>
When in doubt, start with <RT-code>02_RT_Code_Format.html</RT-code> for the core rules, then apply the relevant language section here. If a language requires deviation from the generic rules, document that deviation in this file instead of ad-hoc decisions.
</p>
-
- <script src="../../style/style_orchestrator.js"></script>
</RT-article>
</body>
</html>
--- /dev/null
+window.RT_REPO_ROOT = "../../";
+document.write('<script src="' + window.RT_REPO_ROOT + 'shared/style_directory_dict.js"></script>');
+document.write('<script src="' + window.RT_REPO_ROOT + 'shared/third_party/RT-style-JS_public/consumer/release/RT/core/loader.js"></script>');
+document.write('<script src="' + window.RT_REPO_ROOT + 'shared/third_party/RT-style-JS_public/consumer/release/RT/core/body_visibility_hidden.js"></script>');
# input guards
setup_must_be="developer/tool/setup"
- if [ "$ENV" != "$env_must_be" ]; then
- echo "$(script_fp):: error: must be run in the $env_must_be environment"
+ if [ "$SETUP" != "$setup_must_be" ]; then
+ echo "$(script_fp):: error: must be run in the $setup_must_be environment"
exit 1
fi
# input guards
setup_must_be="developer/tool/setup"
- if [ "$ENV" != "$env_must_be" ]; then
- echo "$(script_fp):: error: must be run in the $env_must_be environment"
+ if [ "$SETUP" != "$setup_must_be" ]; then
+ echo "$(script_fp):: error: must be run in the $setup_must_be environment"
exit 1
fi
import os ,sys ,shutil ,stat ,pwd ,grp ,glob ,tempfile
HELP = """usage: release {write|clean|ls|diff|help|dry write}
- write Writes promoted files from scratchpad/stage into user/release. Only updates newer files.
- clean Remove all contents of the user/release directory.
- ls List user/release as an indented tree: PERMS OWNER NAME.
- diff List files in user/release that are not in scratchpad/stage, or are newer.
+ write Writes promoted files from scratchpad/stage into consumer/release. Only updates newer files.
+ clean Remove all contents of the consumer/release directory.
+ ls List consumer/release as an indented tree: PERMS OWNER NAME.
+ diff List files in consumer/release that are not in scratchpad/stage, or are newer.
help Show this message.
dry write Preview what write would do without modifying the filesystem.
"""
print(f"release: {msg}" ,file=sys.stderr)
sys.exit(code)
-def assert_env():
- env = os.environ.get("ENV" ,"")
- if(env != ENV_MUST_BE):
+def assert_setup():
+ setup_val = os.environ.get("SETUP" ,"")
+ if(setup_val != SETUP_MUST_BE):
hint = (
"SETUP is not 'developer/tool/setup'.\n"
"Enter the project with: . setup developer\n"
"That script exports: ROLE=developer; SETUP=$ROLE/tool/setup"
)
- exit_with_status(f"bad environment: ENV='{env}'. {hint}")
+ exit_with_status(f"bad environment: SETUP='{setup_val}'. {hint}")
def repo_home():
rh = os.environ.get("REPO_HOME")
,*parts
)
-def upath(*parts):
+def cpath(*parts):
return os.path.join(
repo_home()
- ,"user"
+ ,"consumer"
,"release"
,*parts
)
def dev_root():
return dpath()
-def user_root():
- return upath()
+def consumer_root():
+ return cpath()
def _display_src(p_abs: str) -> str:
try:
try:
rel = os.path.relpath(
p_abs
- ,user_root()
+ ,consumer_root()
)
rel = "" if rel == "." else rel
- return "$REPO_HOME/user/release" + ("/" + rel if rel else "")
+ return "$REPO_HOME/consumer/release" + ("/" + rel if rel else "")
except Exception:
return p_abs
def ensure_dir(path_str ,mode=DEFAULT_DIR_MODE ,dry=False):
if(dry):
if( not os.path.isdir(path_str) ):
- shown = _display_dst(path_str) if path_str.startswith(user_root()) else (
+ shown = _display_dst(path_str) if path_str.startswith(consumer_root()) else (
os.path.relpath(path_str ,dev_root()) if path_str.startswith(dev_root()) else path_str
)
print(f"(dry) mkdir -m {oct(mode)[2:]} '{shown}'")
if( len(ownergrp) > ogw ):
ogw = len(ownergrp)
- print("user/release/")
+ print("consumer/release/")
for isdir ,depth ,perms ,ownergrp ,name in entries:
indent = " " * depth
print(f"{perms} {ownergrp:<{ogw}} {indent}{name}")
print(f"+ install -m {oct(mode)[2:]} '{src_show}' '{dst_show}'")
def cmd_write(dry=False):
- assert_env()
- ensure_dir(upath() ,DEFAULT_DIR_MODE ,dry=dry)
+ assert_setup()
+ ensure_dir(cpath() ,DEFAULT_DIR_MODE ,dry=dry)
src_root = dpath(
"scratchpad"
for fn in files:
src_abs = os.path.join(root ,fn)
rel = os.path.relpath(src_abs ,src_root)
- dst_abs = os.path.join(upath() ,rel)
+ dst_abs = os.path.join(cpath() ,rel)
if( os.path.exists(dst_abs) ):
src_mtime = os.stat(src_abs).st_mtime
print(f"(info) nothing new to promote from {_display_src(src_root)}")
def cmd_diff():
- assert_env()
- dst_root = upath()
+ assert_setup()
+ dst_root = cpath()
src_root = dpath(
"scratchpad"
,"stage"
print("No differences found. Release matches stage.")
def cmd_clean():
- assert_env()
- user_root_dir = upath()
- if( not os.path.isdir(user_root_dir) ):
+ assert_setup()
+ consumer_root_dir = cpath()
+ if( not os.path.isdir(consumer_root_dir) ):
return
- for name in os.listdir(user_root_dir):
- p = os.path.join(user_root_dir ,name)
+ for name in os.listdir(consumer_root_dir):
+ p = os.path.join(consumer_root_dir ,name)
if( os.path.isdir(p) and not os.path.islink(p) ):
shutil.rmtree(p ,ignore_errors=True)
else:
elif(cmd == "clean"):
cmd_clean()
elif(cmd == "ls"):
- list_tree(upath())
+ list_tree(cpath())
elif(cmd == "diff"):
cmd_diff()
elif(cmd == "help"):
--- /dev/null
+window.RT_REPO_ROOT = "../";
+document.write('<script src="' + window.RT_REPO_ROOT + 'shared/style_directory_dict.js"></script>');
+document.write('<script src="' + window.RT_REPO_ROOT + 'shared/third_party/RT-style-JS_public/consumer/release/RT/core/loader.js"></script>');
+document.write('<script src="' + window.RT_REPO_ROOT + 'shared/third_party/RT-style-JS_public/consumer/release/RT/core/body_visibility_hidden.js"></script>');
--- /dev/null
+window.RT_REPO_ROOT = "../../";
+document.write('<script src="' + window.RT_REPO_ROOT + 'shared/style_directory_dict.js"></script>');
+document.write('<script src="' + window.RT_REPO_ROOT + 'shared/third_party/RT-style-JS_public/consumer/release/RT/core/loader.js"></script>');
+document.write('<script src="' + window.RT_REPO_ROOT + 'shared/third_party/RT-style-JS_public/consumer/release/RT/core/body_visibility_hidden.js"></script>');