Skip to content

Commit

Permalink
update truth file path on artifactory.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-goldman committed Jan 16, 2025
1 parent 7951b66 commit aaa8313
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions tests/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
from ci_watson.hst_helpers import download_crds, ref_from_image


TODAYS_DATE = datetime.datetime.now().strftime("%Y-%m-%d")


# Base classes for actual tests.
# NOTE: Named in a way so pytest will not pick them up here.
@pytest.mark.bigdata
Expand Down Expand Up @@ -146,15 +149,14 @@ def compare_outputs(self, outputs, raise_error=True):
testpath, testname = os.path.split(os.path.abspath(os.curdir))
# organize results by day test was run...could replace with git-hash
whoami = getpass.getuser() or 'nobody'
dt = datetime.datetime.now().strftime("%d%b%YT")
ttime = datetime.datetime.now().strftime("%H_%M_%S")
user_tag = 'NOT_CI_{}_{}'.format(whoami, ttime)
build_tag = os.environ.get('BUILD_TAG', user_tag)
build_suffix = os.environ.get('BUILD_MATRIX_SUFFIX', 'standalone')
testdir = "{}_{}_{}".format(testname, build_tag, build_suffix)
tree = os.path.join(self.results_root, self.input_loc,
dt, testdir) + os.sep

user_tag = 'NOT_CI_{}'.format(whoami)
build_tag = os.environ.get('BUILD_TAG', user_tag)
build_matrix_suffix = os.environ.get('BUILD_MATRIX_SUFFIX', '0')
subdir = '{}_{}_{}'.format(TODAYS_DATE, build_tag, build_matrix_suffix)

# subdir exmaple: # example: 2025-01-16_GITHUB_CI_Linux-X64-py3.11-783
# full path: drizzlepac_results/*subdir*/acs/test_tweak0/filename.fits
tree = os.path.join(self.results_root, subdir, self.input_loc, testname) + os.sep
updated_outputs = []
for actual, desired in outputs:
# Get "truth" image
Expand Down

0 comments on commit aaa8313

Please sign in to comment.