Skip to content

t.list: Add output format options in t.list - #7466

Merged
petrasovaa merged 7 commits into
OSGeo:mainfrom
saket0187:add-output-options-t.list
Jun 4, 2026
Merged

petrasovaa merged 7 commits into
OSGeo:mainfrom
saket0187:add-output-options-t.list

Conversation

@saket0187

Copy link
Copy Markdown
Contributor

This PR adds the feature requested in #7437

  • Added brief documentation updates.
  • Added Output format options

There is currently no test suite available for t.list. I wasn't sure if a new test file (e.g., using pytest) should be introduced in this PR, so I plan to address testing in a future PR instead. If there are any reference implementations or guidelines for using pytest within the temporal modules, please let me know!

@echoix

echoix commented Jun 1, 2026

Copy link
Copy Markdown
Member

If you're adding tests for more than what you added: a new PR to merge first (so then your PR changing the behaviour can catch if breaking something existing).

If you're adding tests only for what you're adding (and it cannot impact existing code), then tests in this PR is welcome.

@petrasovaa are pytest tests in temporal now behaving correctly? I remember seeing one of your PRs addressing something on the subject

@github-actions github-actions Bot added temporal Related to temporal data processing Python Related code is in Python module docs markdown Related to markdown, markdown files labels Jun 1, 2026
@petrasovaa

Copy link
Copy Markdown
Contributor

@petrasovaa are pytest tests in temporal now behaving correctly? I remember seeing one of your PRs addressing something on the subject

Running t.info should be fine, I think the problem is more with running the temporal API directly. So yes, let's do a PR with pytest first.

@petrasovaa petrasovaa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The JSON output should just be a flat array of datasets, not structured under mapsets, similarly the "line" format should be all in one line. We could add mapset option similar to g.list to filter by it, but out of scope of this PR.
Also, the stderr info messages should be used only for plain format (interactive use).
The JSON should likely use columns=all by default unless specified. With other tools we have usually included all information in the JSON output.

Comment thread temporal/t.list/t.list.md Resolved
Comment thread temporal/t.list/t.list.md Resolved
Comment thread temporal/t.list/t.list.py Resolved
@saket0187
saket0187 force-pushed the add-output-options-t.list branch from cbefaf1 to 4c79ca8 Compare June 3, 2026 07:56
petrasovaa
petrasovaa previously approved these changes Jun 3, 2026

@petrasovaa petrasovaa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@github-actions github-actions Bot added the tests Related to Test Suite label Jun 4, 2026
@saket0187
saket0187 requested a review from petrasovaa June 4, 2026 12:25
@petrasovaa
petrasovaa enabled auto-merge (squash) June 4, 2026 14:13
@petrasovaa petrasovaa moved this from Todo to In Progress in GRASS Google Summer of Code 2026 Jun 4, 2026
@petrasovaa
petrasovaa merged commit 38967c6 into OSGeo:main Jun 4, 2026
26 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in GRASS Google Summer of Code 2026 Jun 4, 2026
@github-actions github-actions Bot added this to the 8.6.0 milestone Jun 4, 2026
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs markdown Related to markdown, markdown files module Python Related code is in Python temporal Related to temporal data processing tests Related to Test Suite

Development

Successfully merging this pull request may close these issues.

3 participants