{"action":"created","issue":{"url":"https://api.github.com/repos/skyportal/skyportal/issues/113","repository_url":"https://api.github.com/repos/skyportal/skyportal","labels_url":"https://api.github.com/repos/skyportal/skyportal/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/skyportal/skyportal/issues/113/comments","events_url":"https://api.github.com/repos/skyportal/skyportal/issues/113/events","html_url":"https://github.com/skyportal/skyportal/issues/113","id":394062297,"node_id":"MDU6SXNzdWUzOTQwNjIyOTc=","number":113,"title":"be able to import ORM objects in other codes ","user":{"login":"dannygoldstein","id":2769632,"node_id":"MDQ6VXNlcjI3Njk2MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/2769632?v=4","gravatar_id":"","url":"https://api.github.com/users/dannygoldstein","html_url":"https://github.com/dannygoldstein","followers_url":"https://api.github.com/users/dannygoldstein/followers","following_url":"https://api.github.com/users/dannygoldstein/following{/other_user}","gists_url":"https://api.github.com/users/dannygoldstein/gists{/gist_id}","starred_url":"https://api.github.com/users/dannygoldstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannygoldstein/subscriptions","organizations_url":"https://api.github.com/users/dannygoldstein/orgs","repos_url":"https://api.github.com/users/dannygoldstein/repos","events_url":"https://api.github.com/users/dannygoldstein/events{/privacy}","received_events_url":"https://api.github.com/users/dannygoldstein/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-26T01:39:33Z","updated_at":"2018-12-30T19:15:28Z","closed_at":"2018-12-30T19:15:28Z","author_association":"NONE","body":"As a developer writing a script to insert stuff from my pipeline into the PSQL database behind skyportal, it would be nice if I could import skyportal's object-relationally mapped objects into my code and instantiate them there, to put stuff into skyportal. Otherwise I am just writing raw SQL to do this..."},"comment":{"url":"https://api.github.com/repos/skyportal/skyportal/issues/comments/450580853","html_url":"https://github.com/skyportal/skyportal/issues/113#issuecomment-450580853","issue_url":"https://api.github.com/repos/skyportal/skyportal/issues/113","id":450580853,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDU4MDg1Mw==","user":{"login":"dannygoldstein","id":2769632,"node_id":"MDQ6VXNlcjI3Njk2MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/2769632?v=4","gravatar_id":"","url":"https://api.github.com/users/dannygoldstein","html_url":"https://github.com/dannygoldstein","followers_url":"https://api.github.com/users/dannygoldstein/followers","following_url":"https://api.github.com/users/dannygoldstein/following{/other_user}","gists_url":"https://api.github.com/users/dannygoldstein/gists{/gist_id}","starred_url":"https://api.github.com/users/dannygoldstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannygoldstein/subscriptions","organizations_url":"https://api.github.com/users/dannygoldstein/orgs","repos_url":"https://api.github.com/users/dannygoldstein/repos","events_url":"https://api.github.com/users/dannygoldstein/events{/privacy}","received_events_url":"https://api.github.com/users/dannygoldstein/received_events","type":"User","site_admin":false},"created_at":"2018-12-30T19:15:28Z","updated_at":"2018-12-30T19:15:28Z","author_association":"NONE","body":"I figured out how to do this. Basically, you create a file called `config.yaml` in the skyportal toplevel directory that is a modified `docker.yaml` that points to your database. Then you modify your `$PYTHONPATH` to include the toplevel skyportal directory. Then you can import skyportal and baselayer and the objects will reference your database.\r\n\r\nThis is a bit unwieldy, would be nice if there were an easier way to do this. "}}
{"actor":{"display_login":"dannygoldstein"}}