-
Notifications
You must be signed in to change notification settings - Fork 2
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
Explicily force catalogdb.sdss_dr16_qso.psfmag to become a peewee ArrayField. #36
Conversation
Add two postgres profiles to ease psql communication via ssh tunnel.
Pull Request Test Coverage Report for Build 300
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tdwelly. I've made a couple changes to the PR. The reason why the psfmag
was not being automatically considered an array is because Peewee didn't include single precision floats as array times (same thing happens with doubles). I've added it so in principle it's not necessary anymore to manually specify it in SDSS_DR16_QSO
, but there's no harm in leaving it.
I've removed the sdss_tunnel_operations
since it's the same as tunnel_operations
but with a different user. You can become admin (i.e., the sdss
user) by doing
>>> from sdssdb.peewee.sdss5db import catalogdb
>>> catalogdb.database.set_profile('tunnel_operations')
>>> catalogdb.database.become_admin()
>>> catalogdb.database.connect_params
{'password': '4-replicant', 'user': 'sdss', 'host': 'localhost', 'port': 7502}
Have a look and feel free to merge.
Hi @albireox My use case for the 'tunnel_operations_sdss' profile was to allow running the command line interface to target_selection as the 'sdss' user, remotely over an ssh tunnel, without having to modify the Carton code. e.g. something like this: i) set up ssh tunnel to operations.sdss.org using personal account u1234567@eboss.sdss.org ii) then run target selection Maybe there's another way of doing this that avoids defining a new profile? I'm happy to keep the 'tunnel_operations_sdss' profile on a non-master branch if it's only me that will use it. Cheers, |
I see! Yes, for that you can do
That will override the user in the profile but leave the rest the same. In general, you don't need to fork the branch to add a new profile. You can also add one in sdss_tunnel_operations:
user: sdss
host: localhost
port: 7502
and that profile will be added to your list of profiles. |
ok great, of course there was an easier way! |
Also, added two new postgres profiles to ease psql communication via ssh tunnels.