Skip to content

Commit 941c3f0

Browse files
authored
Merge pull request #97 from daniel-thom/local-scratch
Handle local scratch on Kestrel
2 parents c1114e6 + c5defbf commit 941c3f0

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

jade/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
import logging
44

5-
__version__ = "0.10.0"
5+
__version__ = "0.10.1"
66

77
logging.getLogger(__name__).addHandler(logging.NullHandler())

jade/hpc/slurm_manager.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import logging
44
import os
55
import re
6-
from datetime import datetime, timedelta
6+
import tempfile
7+
from datetime import datetime
78

89
from jade.enums import Status
910
from jade.exceptions import ExecutionError # , InvalidConfiguration
@@ -253,7 +254,10 @@ def get_job_stats(self, job_id):
253254
return stats
254255

255256
def get_local_scratch(self):
256-
return os.environ["LOCAL_SCRATCH"]
257+
for key in ("LOCAL_SCRATCH", "TMPDIR"):
258+
if key in os.environ:
259+
return os.environ[key]
260+
return tempfile.gettempdir()
257261

258262
def get_node_id(self):
259263
return os.environ["SLURM_NODEID"]

jade/version.py

-1
This file was deleted.

pyproject.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ Homepage = "https://github.com./NREL/jade"
7676
[tool.hatch.version]
7777
path = "jade/__init__.py"
7878

79-
[tool.hatch.build.targets.sdist]
80-
include = [
81-
"/jade",
82-
]
79+
[tool.hatch.build.targets.wheel]
80+
packages = ["jade"]
8381

8482
[tool.black]
8583
line-length = 99

0 commit comments

Comments
 (0)