Skip to content

Commit

Permalink
Merge pull request #57 from jmills-ncar/master
Browse files Browse the repository at this point in the history
Moved *.yaml file to data directory and changed reference to propoer
  • Loading branch information
jmccreight authored May 22, 2018
2 parents 3e63a7e + 2bff955 commit 0e92cea
Show file tree
Hide file tree
Showing 1,222 changed files with 2,895 additions and 2,314 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name='wrfhydropy',
version='0.0.3dev0',
packages=find_packages(),
package_data={'wrfhydropy': ['core/data/*']},
url='https://github.com/NCAR/wrf_hydro_py',
license='MIT',
install_requires=['pandas','f90nml','deepdiff','pathlib','xarray','datetime','pytest','pytest-datadir-ng','boltons'],
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions wrfhydropy/core/job_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
import pathlib
import pickle
import re
import pkg_resources
import shlex
import socket
import subprocess
import sys
import time
import warnings
import yaml

# Where is wrfhydropy/core dir in the filesystem?
# A method (used by django) about specifying the root dir of the project.
# https://stackoverflow.com/questions/25389095/python-get-path-of-root-project-structure
core_dir = pathlib.PosixPath(os.path.dirname(os.path.abspath(__file__)))
DATA_PATH = pathlib.Path(pkg_resources.resource_filename('wrfhydropy', 'core/data/'))


class PBSError(Exception):
Expand Down Expand Up @@ -738,7 +739,7 @@ def job_status_slurm(jobid=None):
def default_job_spec(machine='docker'):
if machine != 'docker':
warnings.warn("Default job sepcs do not currently make sense except for docker.")
default_job_specs_file = core_dir / 'default_job_specs.yaml'
default_job_specs_file = DATA_PATH / 'default_job_specs.yaml'
with open(default_job_specs_file) as ff:
default_job_specs = yaml.safe_load(ff)
default_job_spec = default_job_specs[machine]
Expand Down
Loading

0 comments on commit 0e92cea

Please sign in to comment.