-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Development] Updated Centralized Metadata Storage (Database) #437
Draft
Tearran
wants to merge
35
commits into
main
Choose a base branch
from
module_options
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bugfix
Pull request is fixing a bug
Discussion
Being discussed - Voice your opinions :)
Documentation
Documentation changes or additions
Framework
Framework components
GitHub Actions
GitHub Actions code
size/large
PR with 250 lines or more
Unit Tests
Work in progress
Unfinished / work in progress
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
module_options
: Centralized Metadata Storage (Database)The
module_options
array is used as a centralized Metadata Storage (Database) in the Armbian config system. This tool and pull request aim to unify the relative key pairs used betweenunit-testing
,UX-menu
, andCLI-api
, ensuring consistency and preventing divergence across different paths.Purpose
The primary purpose of
module_options
is to store all relevant metadata for each module in a centralized manner. By centralizing this metadata, the system can dynamically generate various configurations and scripts, such as JSON objects, unit tests, and documentation, while reducing redundancy and ensuring consistency.Commands
The
module_api_files
script provides several commands to work with themodule_options
array:./bin/armbian-config --api module_api_files help
Usage
Command Descriptions
array
module_options
files from the productionmodule_options
array.*_array.sh
file in the corresponding parent folder. For arrays without the required subgroup keys, the added*_array.sh
file is placed in./tools/dev/array/
to indicate an update is needed.json
module_options
.module_options
array into a JSON object, providing a structured format for the metadata.test
module_options
../bin/armbian-config --api module_api_files test
module_options
array.all
Example
To generate the
module_options
files and add missing keys, use:This will disassemble the array and handle the keys as described, ensuring that the metadata is up-to-date and accurately reflects the current state of the modules.
By using
module_options
as a centralized metadata storage (database), the Armbian config system can dynamically handle commands, generate required configurations, and reduce redundancy, leading to a more streamlined and unified process.