Rad Helper Script
The RAD helper script is an interactive terminal App that automates the process of creating, editing, and bumping the RAD schemas. Its primary purpose is to help manage if/when the version of a RAD resource (schema or manifest) needs to be updated and it ensures that all the URIs and tags throughout the RAD resources are updated accorrdingly.
The helper script can be run from the terminal at the root of the RAD repository using the command:
python scripts/rad_helper.py
Note
The helper script assists in figuring out when a version bump is needed by analyzing the git history of RAD. It does this by scanning through the tags in the git repository looking for ones corresponding to a RAD release. It then reads the RAD resources at that release time, recording all the URIs used.
In order to do this, the helper script will synchronize the your local repository’s git tags with the main RAD repository’s git tags. This way it can accurately pick up any RAD releases that have been made since the last time the git tags were synchronized. This is important because forking and cloning git repositories does not automatically synchronize the git tags, so the helper script will automatically do this for you.
When you run the helper script, it will take a few seconds to actually start up. This is due to the fact that it is processing the git history and pulling a lot of information from it. This is only needs to be done once per app run so the performance of the app will remain snappy for actual usage.
You should get a page that looks something like:
You can navigate the app using a keyboard and mouse. Additionally, you can use <TAB>,
and the arrow keys to navigate the app, with <ENTER> to select/interact with an item.
Note that the main functionalities of the app are available on the main screen by clicking
on the tabs along the top of the screen. Currently, there is only one tab, the Edit Resources tab,
but future functionalities will be added as additional tabs.
Quitting the App
Note at the bottom of the main screen of the app, there is a red button labeled Quit, processing
this will exit the app immediately:
Moreover, you can hit the <q> key on your keyboard in any non-text input field to quit the app
at any time as well.
Warning
Any unsaved/applied changes will be lost when the app is quit.
Note
There are some additional global keyboard shortcuts that can be used:
<d>toggles between dark and light mode, with the default being dark mode.<e>toggles to the edit tab.
Edit Resources Tab
As the name, Edit Resources, suggests this tab facilitates the editing of the
RAD resources in a way that maintains both the versioning and makes sure a given
resource is properly linked into RAD. It provides three general functions
Newbutton in green at the top of the tab will start the process to create a brand new resource.Editbutton in blue at the top of the tab will start the process to edit an existing resource.Bumpbutton in yellow at the top of the tab will start the process to bump a schema version.
These buttons maybe grayed out indicating they are disabled. This occurs when the given function is not applicable to the selected resource, see below.
Below these buttons there is an interactive directory tree that allows you to navigate through the latest RAD resources. Each item in the tree is marked with on of the following icons:
📂/📁 indicating a directory (clicking on a directory will toggle the expansion of the contents)
📄 indicating a schema that does not need a version bump in order to be edited.
🔒 indicating a schema that needs a version bump prior to editing.
You can click on any of these items to select it, with clicking on a directory expanding or collapsing its contents. When you select a resource file, its path will be displayed at the top of the tab next to the text prompt.
By selecting a resource will enable the applicable buttons at the top of the tab. Such as: