Skip to content

Commit

Permalink
Add scaling factors get func to utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jessbade committed Aug 2, 2024
1 parent e12f950 commit 541fffa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions isicle/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ def tinker_lookup():
return pd.read_csv(path, sep="\t")


def scaling_factors():
path = resources.files("isicle") / "resources/scaling_factors.txt"
return pd.read_csv(path, sep="\t")


def gettempdir():
"""
Return the name of the directory used for temporary files.
Expand All @@ -118,16 +123,16 @@ def gettempdir():
Path to temporary directory.
"""
root = os.path.join(tempfile.gettempdir(), 'isicle')

root = os.path.join(tempfile.gettempdir(), "isicle")
os.makedirs(root, exist_ok=True)

return root


def mkdtemp(prefix=None, suffix=None):
"""
An ISiCLE-specific wrapper of :func:`~tempfile.mkdtemp` to create a
An ISiCLE-specific wrapper of :func:`~tempfile.mkdtemp` to create a
temporary directory for temporary ISiCLE files. The temporary directory
is not automatically removed.
Expand Down

0 comments on commit 541fffa

Please sign in to comment.