How to Browse the Registry¶
CLI¶
List Registry Components¶
Assuming you have already configured dsgrid to point to the right database (URL and name), you can list components by type: projects, datasets, dimensions, dimension mappings:
$ dsgrid registry projects list
$ dsgrid registry datasets list
$ dsgrid registry dimensions list
$ dsgrid registry dimension-mappings list
You can filter the output of each table like this:
$ dsgrid registry dimensions list -f Type==geography
You can also list all components at once:
$ dsgrid registry list
You can also browse different registries by specifying the database URL and name directly on the command line:
$ dsgrid -u http://dsgrid-registry.hpc.nrel.gov:8529 -N standard-scenarios registry list
Project Viewer¶
dsgrid provides a Dash application that allows you to browse the registry in a web UI.
Set these environment variables in preparation for starting the dsgrid API server.
$ export DSGRID_REGISTRY_DATABASE_URL=sqlite:///<your-db-path>
$ export DSGRID_QUERY_OUTPUT_DIR=api_query_output
$ export DSGRID_API_SERVER_STORE_DIR=.
Start the server
$ uvicorn dsgrid.api.app:app
Check the output for the address and port. The examples below assume that the server is running at http://127.0.0.1:8000.
Start the project viewer app.
$ python dsgrid/apps/project_viewer/app.py