feat: add --json output flag to all commands (Closes #1)#54
Open
alexanderxfgl-bit wants to merge 4 commits intoApexOpsStudio:mainfrom
Open
feat: add --json output flag to all commands (Closes #1)#54alexanderxfgl-bit wants to merge 4 commits intoApexOpsStudio:mainfrom
alexanderxfgl-bit wants to merge 4 commits intoApexOpsStudio:mainfrom
Conversation
- Add --json flag to add, list, and done commands - JSON output returns valid parseable JSON objects/arrays - Error states return JSON with 'error' key - Add 6 new tests covering JSON output scenarios - Closes ApexOpsStudio#1
- load_config() now creates default config.yaml if missing - Creates parent directories as needed - Add 3 tests for config handling - All 11 tests pass Closes ApexOpsStudio#2
4 tasks
This file contains hidden or 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
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.
What
Adds
--jsonflag to all CLI commands (add, list, done) for structured output.Changes
task.py: Add global--jsonargument, passjson_outputto commandscommands/add.py: Return task dict as JSON when flag setcommands/list.py: Return tasks array as JSON when flag setcommands/done.py: Return task dict or error object as JSON when flag settest_task.py: 6 new tests covering JSON output for all commands + edge casesTesting
Example
Closes #1