Skip to content
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

119 task split json into main sections and put it into separate folder #124

Conversation

Tearran
Copy link
Member

@Tearran Tearran commented Sep 28, 2024

Description

This PR introduces a method to manage the JSON configuration data by splitting it into multiple files and merging them at runtime. This approach helps organize configuration elements logically by their functionality, improving modularity and maintainability.

Issue reference: #119

Implementation Details

  • *Set all "status" to "Preview" or "disabled" to establish a baseline

  • *Added logic to loop through JSON files in the json_parts_dir ($lib_dir/armbian.config.jobs) and merge them at runtime.

    • Introduced naming convention for JSON files for better modularity.
  • Justification for the changes:

    • By separating JSON files, it allows better readability, maintainability, and modular configuration management.
    • This also makes it easier to add, modify, or remove configuration modules without affecting other parts.

Testing Procedure

  • Test 1:

    • Description: Verify that each of the separate JSON files (armbian.system.json, armbian.network.json, etc.) is correctly merged into a single JSON object at runtime.
    • Results: Successfully merged all JSON parts without errors, and the final JSON data structure matched expectations.
  • Test 2:

    • Description: Ensure that the merged JSON data is used correctly by the configuration scripts during execution, particularly for accessing nested properties.
    • Results: Configuration scripts executed without errors, indicating that the merged data is being correctly utilized.

Checklist

  • I have performed a self-review of my code.
  • I have ensured that my changes do not introduce new warnings or errors.
  • No new external dependencies are included.
  • Changes have been tested and verified.

@Tearran Tearran linked an issue Sep 28, 2024 that may be closed by this pull request
@github-actions github-actions bot added size/large PR with 250 lines or more Scripts labels Sep 28, 2024
@Tearran Tearran added the Work in progress Unfinished / work in progress label Sep 28, 2024
@Tearran Tearran closed this Sep 28, 2024
@Tearran Tearran deleted the 119-task-split-json-into-main-sections-and-put-it-into-separate-folder branch October 1, 2024 02:03
@Tearran Tearran restored the 119-task-split-json-into-main-sections-and-put-it-into-separate-folder branch October 6, 2024 19:50
@Tearran Tearran deleted the 119-task-split-json-into-main-sections-and-put-it-into-separate-folder branch October 6, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/large PR with 250 lines or more Work in progress Unfinished / work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Split json into main sections and put it into separate folder
1 participant