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

v.info: Add JSON output for history #4989

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

NishantBansal2003
Copy link
Contributor

Fixes: #4217
Use parson to add json output format support to the v.info module for history flag.
The JSON output looks like as follows:

$ grass --exec v.info -h map=roadsmajor format=json
{
    "records": [
        {
            "command": "v.in.ogr dsn=\"majorroads.shp\" output=\"roads_major\" min_area=0.0001 snap=-1",
            "mapset_path": "\/bigdata\/grassdata05\/wakestpfeet\/PERMANENT",
            "user": "helena",
            "date": "Tue Nov  7 18:34:20 2006"
        },
        {
            "command": "v.proj input=\"wroads_major\" location=\"wakestpfeet\" output=\"roadsmajor_wake\"",
            "mapset_path": "\/bigdata\/grassdata05\/ncfromfile\/PERMANENT",
            "user": "helena",
            "date": "Wed Nov  8 00:18:50 2006"
        },
        {
            "command": "v.db.connect -o map=\"roadsmajor@PERMANENT\" driver=\"sqlite\" database=\"\/home\/neteler\/grassdata\/nc_spm_latest\/nc_spm_08\/PERMANENT\/sqlite\/sqlite.db\" table=\"roadsmajor\" key=\"cat\" layer=\"1\" separator=\"|\"",
            "mapset_path": "\/home\/neteler\/grassdata\/nc_spm_latest\/nc_spm_08\/PERMANENT",
            "user": "neteler",
            "date": "Mon Nov 26 16:55:38 2012"
        },
        {
            "command": "v.db.connect -o map=\"roadsmajor@PERMANENT\" driver=\"sqlite\" database=\"$GISDBASE\/$LOCATION_NAME\/$MAPSET\/sqlite\/sqlite.db\" table=\"roadsmajor\" key=\"cat\" layer=\"1\" separator=\"|\"",
            "mapset_path": "\/home\/neteler\/grassdata\/nc_spm_08_grass7\/PERMANENT",
            "user": "neteler",
            "date": "Fri Dec  7 23:25:12 2012"
        }
    ]
}

@github-actions github-actions bot added vector Related to vector data processing Python Related code is in Python C Related code is in C module tests Related to Test Suite labels Jan 25, 2025
Signed-off-by: Nishant Bansal <[email protected]>
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
@NishantBansal2003
Copy link
Contributor Author

NishantBansal2003 commented Jan 27, 2025

Failing gunittest tests on the macOS build: FAILED ./scripts/g.extension/testsuite/test_addons_download.py (1 test failed). I am unsure why this test is failing.

Previously in the macOS CI, test_github_official_module_man_page_src_code_links_exists was failing.
Now, test_github_install is failing inside ./scripts/g.extension/testsuite/test_addons_download.py.

@neteler
Copy link
Member

neteler commented Jan 27, 2025

macOS: I have restarted this test.

And the OSGeo4W CI error is a bit unexpected:

checking whether to use PostgreSQL... "yes"
checking for location of PostgreSQL includes... /c/OSGeo4W/include
checking for libpq-fe.h... yes
checking for location of PostgreSQL library... /c/OSGeo4W/lib
checking for PQsetdbLogin in -lpq... no
checking for PQsetdbLogin in -lpq... no
checking for PQsetdbLogin in -lpq... no
checking for PQsetdbLogin in -lpq... no
configure: error: *** Unable to locate PostgreSQL library.

@nilason
Copy link
Contributor

nilason commented Jan 27, 2025

And the OSGeo4W CI error is a bit unexpected:

See #4990

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C module Python Related code is in Python tests Related to Test Suite vector Related to vector data processing
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

[Feat] Add JSON output for history in v.info
5 participants