Skip to content

Commit

Permalink
use path expansion from ubiquerg
Browse files Browse the repository at this point in the history
  • Loading branch information
vreuter committed May 8, 2019
1 parent 26d459d commit b5a8b98
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
11 changes: 0 additions & 11 deletions attmap/helpers.py
Expand Up @@ -17,17 +17,6 @@ def copy(self):
return obj


def expandpath(p):
"""
Expand environment and/or user variable(s) in a path.
:param str p: path in which to populate variables for which value is
available in current state
:return str: variable-expanded path
"""
return os.path.expanduser(os.path.expandvars(p))


def get_logger(name):
"""
Return a logger equipped with a null handler.
Expand Down
2 changes: 1 addition & 1 deletion attmap/pathex_attmap.py
@@ -1,7 +1,7 @@
""" Canonical behavior for attmap in pepkit projects """

from .attmap import AttMap
from .helpers import expandpath
from ubiquerg import expandpath

__author__ = "Vince Reuter"
__email__ = "vreuter@virginia.edu"
Expand Down
1 change: 1 addition & 0 deletions requirements/requirements-all.txt
@@ -0,0 +1 @@
ubiquerg>=0.0.5
5 changes: 2 additions & 3 deletions setup.py
Expand Up @@ -17,12 +17,11 @@ def read_reqs(reqs_name):
for l in f:
if not l.strip():
continue
#deps.append(l.split("=")[0].rstrip("<>"))
deps.append(l)
return deps

#DEPENDENCIES = read_reqs("all")
DEPENDENCIES = []

DEPENDENCIES = read_reqs("all")

# 2to3
if sys.version_info >= (3, ):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_path_expansion.py
Expand Up @@ -6,7 +6,7 @@
import string
import pytest
from attmap import *
from attmap.helpers import expandpath
from ubiquerg import expandpath

__author__ = "Vince Reuter"
__email__ = "vreuter@virginia.edu"
Expand Down

0 comments on commit b5a8b98

Please sign in to comment.