Skip to content

feat: add --json output flag to submit, list, and report commands - #29

Merged
183amir merged 2 commits into
mainfrom
feat/json-output
Mar 17, 2026
Merged

feat: add --json output flag to submit, list, and report commands#29
183amir merged 2 commits into
mainfrom
feat/json-output

Conversation

@183amir

@183amir 183amir commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add --json flag to submit, list, and report commands for machine-readable output
  • --json is mutually exclusive with --wrap and --truncate on list
  • Document --json flag in README

Examples

$ gridtk submit --json --wrap=echo hello
{"job_id": 1, "slurm_id": 42611, "name": "gridtk"}

$ gridtk list --json
[
  {
    "job_id": 1,
    "slurm_id": 42611,
    "state": "COMPLETED",
    "exit_code": "0",
    "name": "gridtk",
    ...
  }
]

$ gridtk report --json -j 1
[
  {
    "job_id": 1,
    "name": "gridtk",
    "state": "COMPLETED",
    "output_files": [{"path": "logs/gridtk.42611.out", "content": "hello\n"}]
  }
]

🤖 Generated with Claude Code


📚 Documentation preview 📚: https://gridtk--29.org.readthedocs.build/en/29/

@github-actions

github-actions Bot commented Mar 16, 2026

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/gridtk
  cli.py 475, 496-497, 673-678, 681-729
Project Total  

This report was generated by python-coverage-comment-action

@183amir
183amir changed the base branch from main to fix/empty-result-feedback March 16, 2026 16:15
@183amir
183amir requested a review from Yannick-Dayer March 16, 2026 16:57
@183amir 183amir mentioned this pull request Mar 16, 2026
Base automatically changed from fix/empty-result-feedback to main March 16, 2026 17:03
Amir Mohammadi and others added 2 commits March 17, 2026 09:46
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@Yannick-Dayer Yannick-Dayer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool feature.
Everything seems good 👍🏻

@183amir
183amir merged commit 3d3d6bd into main Mar 17, 2026
10 checks passed
@183amir
183amir deleted the feat/json-output branch March 17, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants