datajoint-python icon indicating copy to clipboard operation
datajoint-python copied to clipboard

DataJoint CLI / launcher script

Open ixcat opened this issue 4 years ago • 0 comments
trafficstars

Feature Request

Problem

Often, a user wants to quickly check on something in a pipeline, etc. without using a 'full' pipeline environment with pipeline code, dependencies, etc. In these cases, often the workflow is:

  • start datajoint
  • set auth configuration
  • connect
  • create virtual modules
  • perform specific task desired

It would be nice to provide a simple utility to quickly launch a connected datajoint session with appropriate schemas loaded as virtual modules for these cases. Potentially this could be designed in a future-proof way for managing other common DataJoint related things (e.g. create pipeline, change password, setup external, launch UI etc)

Requirements

  • cli utility to launch a connected datajoint session with virtual modules loaded

Justification

see 'Problem'

Alternative Considerations

see 'Problem'

Additional Research and Context

Created a basic script to this end for personal use available here: https://github.com/ixcat/djwip/blob/master/djwip/ixcat/djcli/dj.py

synopsis:

$ dj -h
usage: dj [-u user] [-p password] [-h host] [-s db:schema ...]

-u/-p/-h should be straightforward; -s will map the database schema named db to the schema virtual module named schema e.g. -s ixcat_subject:subject to map the ixcat_subject database schema to a virtual module bound to the variable schema within the resulting interpreter.

ixcat avatar Aug 09 '21 21:08 ixcat