Skip to content

Commit

Permalink
Use sdsstools 0.1.9 to allow more user configuration file locations
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed May 14, 2020
1 parent 7ae2f77 commit 48bcb5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/sphinx/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ where ``XXXX``, ``YYYY``, etc are the associated passwords for each set of param
Supported Profiles
------------------

The following `profiles <https://github.com/sdss/sdssdb/blob/master/python/sdssdb/etc/sdssdb.yml>`__ are included with sdssdb. When a :ref:`database connection <conn-db>` is created without an explicit profile, the hostname of the current machine is used to find the best possible profile. Profiles can be added or modified by creating a YAML file in ``~/.sdssdb/sdssdb.yml`` with the same structure.
The following `profiles <https://github.com/sdss/sdssdb/blob/master/python/sdssdb/etc/sdssdb.yml>`__ are included with sdssdb. When a :ref:`database connection <conn-db>` is created without an explicit profile, the hostname of the current machine is used to find the best possible profile. Profiles can be added or modified by creating a YAML file in ``~/.config/sdss/sdssdb.yaml`` with the same structure.

* **local**: a generic localhost profile. Used if the hostname does not match any other profile.
* **apo**: a user on the APO machines.
Expand Down
6 changes: 3 additions & 3 deletions python/sdssdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

log = get_logger(NAME)

# Loads config
config = get_config(NAME, user_path='~/.sdssdb/sdssdb.yml')

# This looks for user configuration in the usual places (including
# ~/.config/sdss/sdssdb.yml and ~/.sdssdb/sdssdb.yml).
config = get_config(NAME)

from .connection import PeeweeDatabaseConnection # noqa
from .connection import SQLADatabaseConnection # noqa
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ install_requires =
six>=1.12.0
peewee>=3.9.6
sqlalchemy>=1.3.6
sdsstools>=0.1.8
sdsstools>=0.1.9
numpy>=1.18.2

[options.packages.find]
Expand All @@ -62,7 +62,7 @@ dev =
pytest>=5.2
pytest-cov>=2.4.0
pytest-sugar>=0.8.0
sdsstools[dev]>=0.1.8
sdsstools[dev]>=0.1.9
ipython>=7.13.0
ipdb>=0.13.2
pytest-postgresql>=2.2.1
Expand Down

0 comments on commit 48bcb5a

Please sign in to comment.