From c57bc3f7d7762548fcc38976c8d86d76e06b6b31 Mon Sep 17 00:00:00 2001 From: mdlpstsci Date: Thu, 25 Jul 2024 13:09:56 -0400 Subject: [PATCH] T2 newcandidate 371rc6 (#1851) Co-authored-by: Zach Burnett Co-authored-by: Steve Goldman <32876747+s-goldman@users.noreply.github.com> --- CHANGELOG.rst | 13 +++++++++++++ JenkinsfileRT | 4 ++-- drizzlepac/haputils/deconvolve_utils.py | 4 ++-- tests/hap/base_test.py | 2 +- tests/hap/test_pipeline.py | 5 ++++- tests/resources.py | 2 +- tox.ini | 2 +- 7 files changed, 24 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f2772b420..055966c6a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -18,8 +18,21 @@ number of the code change for that issue. These PRs can be viewed at: https://github.com/spacetelescope/drizzlepac/pulls +3.7.2 (unreleased) +================== +- Added python 3.12 to testing matrix for Jenkins and github actions. [#1843] + +- ``manageInputCopies`` now copies successfully even if the original files were + defined by full paths rather than being in the current working directory. [#1835] + + 3.7.1 (unreleased) ================== +- Modified the call to the hamming function in the deconvolve_utils.py module + as SciPy deprecated the way window filtering functions can be invoked. These + functions can no longer be imported from the scipy.signal namespace but need + to be accessed via scipy.signal.windows. [#1848] + - Modify the dependencies portion of the project.toml file to specify numpy<2.0 [#1813] diff --git a/JenkinsfileRT b/JenkinsfileRT index 1976d11ae..7d6308db9 100644 --- a/JenkinsfileRT +++ b/JenkinsfileRT @@ -40,10 +40,10 @@ bc1.test_configs = [data_config] bc1.failedFailureThresh = 0 bc2 = new BuildConfig() -bc2.name = '3.10-dev' +bc2.name = '3.11-dev' bc2.nodetype = 'linux' bc2.env_vars = ['TEST_BIGDATA=https://bytesalad.stsci.edu/artifactory'] -bc2.conda_packages = ['python=3.10'] +bc2.conda_packages = ['python=3.11'] bc2.build_cmds = ["pip install numpy astropy pytest-cov ci-watson || true", "pip install -r requirements-dev.txt --upgrade -e '.[test]' || true", "pip freeze || true"] diff --git a/drizzlepac/haputils/deconvolve_utils.py b/drizzlepac/haputils/deconvolve_utils.py index c93072492..09c63e824 100644 --- a/drizzlepac/haputils/deconvolve_utils.py +++ b/drizzlepac/haputils/deconvolve_utils.py @@ -28,7 +28,7 @@ from astropy.stats import sigma_clipped_stats from astropy.table import Table from scipy import ndimage -import scipy.signal as ss +from scipy.signal import windows from stsci.tools import logutil @@ -479,7 +479,7 @@ def _create_input_psf(psf_name, calimg, total_flux): lib_size = [lib_psf_arr.shape[0] // 2, lib_psf_arr.shape[1] // 2] # create hamming 2d filter to avoid edge effects - h = ss.hamming(lib_psf_arr.shape[0]) + h = windows.hamming(lib_psf_arr.shape[0]) h2d = np.sqrt(np.outer(h, h)) lib_psf_arr *= h2d diff --git a/tests/hap/base_test.py b/tests/hap/base_test.py index 1370950f4..53d04a4a3 100644 --- a/tests/hap/base_test.py +++ b/tests/hap/base_test.py @@ -98,7 +98,7 @@ def get_input_file(self, *args, refsep='$', **kwargs): # Download from FTP, if applicable if self.use_ftp_crds: - download_crds(ref_file, timeout=self.timeout) + download_crds(ref_file) return filenames # Pytest function to support the parameterization of these classes diff --git a/tests/hap/test_pipeline.py b/tests/hap/test_pipeline.py index 33e4b4d04..b4c8db729 100644 --- a/tests/hap/test_pipeline.py +++ b/tests/hap/test_pipeline.py @@ -102,7 +102,10 @@ def get_input_file(self, *args, refsep='$', docopy=True): else: # Download from FTP, if applicable refname = os.path.join(ref_file) if self.use_ftp_crds: - download_crds(refname, self.timeout) + if isinstance(refname, str): + download_crds(refname) + else: + raise TypeError("Expected string, got {}".format(type(refname))) return filename diff --git a/tests/resources.py b/tests/resources.py index 14517c3b1..d5c3b6bed 100644 --- a/tests/resources.py +++ b/tests/resources.py @@ -113,7 +113,7 @@ def get_input_file(self, *args, refsep='$'): else: # Download from FTP, if applicable refname = os.path.join(ref_file) if self.use_ftp_crds: - download_crds(refname, self.timeout) + download_crds(refname) return filename def compare_outputs(self, outputs, raise_error=True): diff --git a/tox.ini b/tox.ini index 72630e68c..dc686f995 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ skip_install = true deps = ruff commands = - ruff . {posargs} + ruff check . {posargs} [testenv:check-security] description = run bandit to check security compliance