From f433ef4339305de5d6cd5b60e7e61e30f16f0503 Mon Sep 17 00:00:00 2001 From: Jeremy Kubica <104161096+jeremykubica@users.noreply.github.com> Date: Tue, 17 Dec 2024 08:41:42 -0500 Subject: [PATCH 1/2] Revert "Merge pull request #754 from dirac-institute/upgrade_numpy" This reverts commit c14abe7d0a5eb7d6af76b178f78948a034b83de1, reversing changes made to 39f025bf4ceec00c346a16fd09ac021461402077. --- include/eigen | 2 +- lib/pybind11 | 2 +- pyproject.toml | 26 ++++++++++++++------------ 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/include/eigen b/include/eigen index c01ff4531..6d829e766 160000 --- a/include/eigen +++ b/include/eigen @@ -1 +1 @@ -Subproject commit c01ff45312582b2ea896ee307a49165ca4790332 +Subproject commit 6d829e766ff1b1ab867d93631163cbc63ed5798f diff --git a/lib/pybind11 b/lib/pybind11 index 741d86f2e..3efe9d4cb 160000 --- a/lib/pybind11 +++ b/lib/pybind11 @@ -1 +1 @@ -Subproject commit 741d86f2e3527b667ba85d273a5eea19a0978ef5 +Subproject commit 3efe9d4cb5d7314faee722205e560b8b932aed9e diff --git a/pyproject.toml b/pyproject.toml index 55077fa27..5ad3bb598 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,17 +32,16 @@ classifiers = [ ] dynamic = ["version"] dependencies = [ - "astropy>=6.1", - "astroquery>=0.4.7", - "dask[array]>=2024.4.1", # Needed for astropy library dependency + "astropy>=5.1", + "astroquery>=0.4.6", "jax", - "jaxlib", - "matplotlib>=3.9", - "numpy>=2.0", - "pandas>=2.2", # Needed for scikit_learn + "joblib>=1.4", + "matplotlib>=3.5", + "numpy<2.0", + "pandas>=1.5.1", "reproject", - "scipy>=1.13", - "scikit_learn>=1.5.0", + "scipy>=1.9.2", + "scikit_learn>=1.0.0", "koffi>=0.1.1", "jplephem", "PyYAML>=6.0" @@ -56,12 +55,15 @@ Changelog = "https://epyc.astro.washington.edu/~kbmod/project_details/release_no [project.optional-dependencies] analysis = [ - "ephem>=4.1", + "tensorflow>=2.9", + "matplotlib>=3.6.1", "ipywidgets>=8.0", + "ephem>=4.1" ] docs = [ - "sphinx>=8.0", - "sphinx-gallery", + "sphinx", + # https://github.com/spatialaudio/nbsphinx/issues/655 + "sphinx-gallery<0.11", "sphinx-codeautolink", "sphinx-design", "numpydoc", From 7f3dc495a7d9a8bd10a031333b6814c831431558 Mon Sep 17 00:00:00 2001 From: Jeremy Kubica <104161096+jeremykubica@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:24:59 -0500 Subject: [PATCH 2/2] Fix the mock fits errors --- tests/test_results.py | 1 - tests/utils/mock_fits.py | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_results.py b/tests/test_results.py index 21a5babfd..30ba6d44d 100644 --- a/tests/test_results.py +++ b/tests/test_results.py @@ -278,7 +278,6 @@ def test_is_empty_value(self): self.assertFalse(np.any(nums_is_empty)) pairs_is_empty = table.is_empty_value("pairs") - print(pairs_is_empty) self.assertTrue(np.array_equal(pairs_is_empty, expected)) def test_filter_by_index(self): diff --git a/tests/utils/mock_fits.py b/tests/utils/mock_fits.py index 305ee517f..501640d07 100644 --- a/tests/utils/mock_fits.py +++ b/tests/utils/mock_fits.py @@ -161,6 +161,14 @@ def get_fits(self, fits_idx, spoof_data=False): warnings.filterwarnings("ignore", category=AstropyUserWarning) for hdr_idx, HDUClass in enumerate(self.hdu_types): hdr = HDUClass() + + # Remove the cards that know we will reinsert them below and + # require a specific order. We rely on the file order. + for key in ["GCOUNT", "NAXIS", "NAXIS1", "NAXIS2", "PCOUNT"]: + if key in hdr.header: + del hdr.header[key] + + # Insert all the cards from the file. for k, v, f in hdu_group.groups[hdr_idx]["keyword", "value", "format"]: hdr.header[k] = self.lexical_cast(v, f) hdul.append(hdr)