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

listruns() should get db from session if possible #468

Closed
prjemian opened this issue Dec 17, 2020 · 4 comments · Fixed by #474
Closed

listruns() should get db from session if possible #468

prjemian opened this issue Dec 17, 2020 · 4 comments · Fixed by #474
Assignees
Milestone

Comments

@prjemian
Copy link
Contributor

When using an intake-style catalog, the listruns() defaults through to an existing mongodb_config instead. Make this smarter (but not at the expense of more fragile).

@prjemian prjemian added this to the 1.4.0 milestone Dec 17, 2020
@prjemian prjemian self-assigned this Dec 17, 2020
@prjemian
Copy link
Contributor Author

Use get_ipython() (if successful) to get db from the environment if both db and cat are not given as kwargs.

@prjemian
Copy link
Contributor Author

A challenge is to identify the best database to who with listruns(). Thus, listruns() should report the name of the database it is reporting.

@prjemian
Copy link
Contributor Author

prjemian commented Jan 13, 2021

It is observed that when Broker-style yaml files are opened with db = databroker.catalog["db_name"] (for example), the configuration name reported by db.name is None instead of db_name. This should be addressed in upstream databroker package.

In [222]: mdb.name

In [223]: mdb2 = databroker.Broker.named("mongodb_config")

In [224]: mdb2.name
Out[224]: 'mongodb_config'

In [225]: mdb = databroker.catalog["mongodb_config"]

In [226]: mdb.name

@prjemian
Copy link
Contributor Author

Tough to report the database name since the output of listruns() is a pyRestTable.Table() instance. Could implement when printing=True.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant