Skip to content
This repository has been archived by the owner on Aug 9, 2020. It is now read-only.

Commit

Permalink
👍 Add custom wradex directory feature
Browse files Browse the repository at this point in the history
  • Loading branch information
astropenguin committed Apr 23, 2019
1 parent 7c8a295 commit ddfc61a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion wradex/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@
]

# standard library
import os
from pathlib import Path

# dependent packages
import wradex

# local constants
WRADEX_DIR = Path('~', '.wradex').expanduser()
if 'WRADEX_DIR' in os.environ:
path = os.environ.get('WRADEX_DIR')
WRADEX_DIR = Path(path).expanduser()
else:
WRADEX_DIR = Path.home() / '.wradex'

WRADEX_CONFIG = Path(WRADEX_DIR, 'config.yaml')
_WRADEX_CONFIG = Path(*wradex.__path__, 'data', 'config.yaml')

0 comments on commit ddfc61a

Please sign in to comment.