Skip to content

Commit

Permalink
moved to using appdirs for sunpyrc config
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Feb 1, 2019
1 parent 9daaa2e commit 6e3c8d3
Show file tree
Hide file tree
Showing 6 changed files with 712 additions and 121 deletions.
1 change: 1 addition & 0 deletions changelog/2911.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Moved to using `AppDirs <https://github.com/ActiveState/appdirs>`_ as the place to host our configuration file.
13 changes: 6 additions & 7 deletions sunpy/data/sunpyrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
; of it on your system in site-packages/sunpy/data/sunpyrc. If you edit it
; there, please note that it will be overridden in your next install.
; If you want to keep a permanent local copy that will not be
; over-written, place it in HOME/.sunpy/sunpyrc (unix/linux
; like systems) and C:\Documents and Settings\yourname\.sunpy
; (win32 systems).
;
; over-written, we use AppDirs https://pypi.org/project/appdirs/
; to find the right place for each OS to place it.
; So if you open the link, you can find the user_config_dir
; or print(sunpy.util.config.CONFIG_DIR) to find it on your own system.
; Note that any relative filepaths specified in the SunPy configuration file
; will be relative to SunPy's working directory.
;

;;;;;;;;;;;;;;;;;;;
; General Options ;
Expand Down Expand Up @@ -51,6 +50,6 @@ sample_dir = data/sample_data
; Location to specify sunpy database parameters.
; The default url of the database location can specified here. The url of
; the database comprises the database driver, its location and name, as well
; as optional authentication parameters
; as optional authentication parameters
; Default value: sqlite:////<user's home directory>/sunpy/sunpydb.sqlite
; url = sqlite:////home/$USER/sunpy/sunpydb.sqlite
; url = sqlite:////home/$USER/sunpy/sunpydb.sqlite
13 changes: 13 additions & 0 deletions sunpy/extern/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sunpy.extern
============

This sub-package contains third-party Python packages/modules that are
required for some of SunPy's core functionality.

In particular, this currently includes for Python:

- `AppDirs`_ (Python 2 and 3 versions): This provides the core config file handling for SunPy's configuration system.

To replace any of the other Python modules included in this package, simply remove them and update any imports in SunPy to import the system versions rather than the bundled copies.

.. _AppDirs: https://github.com/ActiveState/appdirs
Loading

0 comments on commit 6e3c8d3

Please sign in to comment.