From 3505400ba761f2ef844a6e603e16a5967e53f2f1 Mon Sep 17 00:00:00 2001 From: Mike Wilensky Date: Tue, 8 Jul 2025 18:38:54 -0400 Subject: [PATCH 1/7] Get rid of redundant healpy entry --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2538d0d..e99b89b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,6 @@ scipy healpy matvis pygdsm -healpy pyuvsim spherical hera_sim From 3d14364386662e373de53677917ada660117b101 Mon Sep 17 00:00:00 2001 From: Mike Wilensky Date: Tue, 8 Jul 2025 18:39:06 -0400 Subject: [PATCH 2/7] Add a pyproject.toml --- pyproject.toml | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7ee7808 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,66 @@ +[build-system] +requires = ["setuptools>=64", "wheel", "setuptools_scm>=8.1"] +build-backend = "setuptools.build_meta" + +[project] +name = "hydra" +authors = [ + {name = "Phil Bull", email="phil.bull@manchester.ac.uk"}, + {name = "Hugh Garsden", email="hugh.garsden@manchester.ac.uk"} + {name = "Katrine A. Glasscock", email="katrine.glasscock@manchester.ac.uk"}, + {name = "Michael J. Wilensky", email="michael.wilensky@mcgill.ca"}, +] +maintainers = [ + {name = "Phil Bull", email="phil.bull@manchester.ac.uk"}, +] +description = "Gibbs sampling for 21cm cosmology experiments" +readme = "README.md" +dynamic = ["version"] +dependencies = [ + "numpy<2.0", + scipy, + healpy, + matvis, + pygdsm, + pyuvsim, + spherical, + hera_sim, +] +requires-python = ">=3.10" +keywords = ["Gibbs sampling", "Bayesian inference"] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering :: Astronomy", +] + +[project.urls] +Repository = "https://github.com/HydraRadio/Hydra" +Documentation = "https://hydraradio.github.io/Hydra/api/" + +# Note that this approach is "discouraged" in favor of [project.scripts], but +# that requires entry-point functions, which would require some refactoring. +[tool.setuptools] +script-files = [ + "scripts/beam_diagnostic.py", + "scripts/chain_mix.py", + "scripts/concatenate_uvh5.py", + "scripts/freqidx_select.py, + "scripts/generate_perturbed_beam.py", + "scripts/generate_slurm.py", + "scripts/minimal_antenna_set.py", + "scripts/precompute_response_sh.py", + "scripts/precompute_response_sh_singlefreq.py", + "scripts/precompute_response_sh_singlefreq_general.py", + "scripts/redundant_select.py", + "scripts/shortbls_select.py", + "beam_example.py" + "example.py" +] + +# This has to be here for Mac builds to work. +[tool.setuptools_scm] +version_file = "hydra/version.py" \ No newline at end of file From e000ae5250962c9b1328386abd9667c60be1ee64 Mon Sep 17 00:00:00 2001 From: Mike Wilensky Date: Mon, 27 Oct 2025 15:22:32 -0400 Subject: [PATCH 3/7] Add missing punctuation --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7ee7808..997c4ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "hydra" authors = [ {name = "Phil Bull", email="phil.bull@manchester.ac.uk"}, - {name = "Hugh Garsden", email="hugh.garsden@manchester.ac.uk"} + {name = "Hugh Garsden", email="hugh.garsden@manchester.ac.uk"}, {name = "Katrine A. Glasscock", email="katrine.glasscock@manchester.ac.uk"}, {name = "Michael J. Wilensky", email="michael.wilensky@mcgill.ca"}, ] @@ -48,7 +48,7 @@ script-files = [ "scripts/beam_diagnostic.py", "scripts/chain_mix.py", "scripts/concatenate_uvh5.py", - "scripts/freqidx_select.py, + "scripts/freqidx_select.py", "scripts/generate_perturbed_beam.py", "scripts/generate_slurm.py", "scripts/minimal_antenna_set.py", @@ -57,7 +57,7 @@ script-files = [ "scripts/precompute_response_sh_singlefreq_general.py", "scripts/redundant_select.py", "scripts/shortbls_select.py", - "beam_example.py" + "beam_example.py", "example.py" ] From 957092a455a79eaa5911dbc1bfcfd02e6b265797 Mon Sep 17 00:00:00 2001 From: Mike Wilensky Date: Mon, 27 Oct 2025 15:22:47 -0400 Subject: [PATCH 4/7] Remove python 3.10 --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 997c4ec..ca7e1ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,6 @@ keywords = ["Gibbs sampling", "Bayesian inference"] classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Astronomy", From b3403cf9ddcdf73e8b0965a0918cc464c1e2d86a Mon Sep 17 00:00:00 2001 From: Mike Wilensky Date: Mon, 27 Oct 2025 15:23:21 -0400 Subject: [PATCH 5/7] Actually enforce python 3.10 removal --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ca7e1ce..857d010 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ dependencies = [ spherical, hera_sim, ] -requires-python = ">=3.10" +requires-python = ">=3.11" keywords = ["Gibbs sampling", "Bayesian inference"] classifiers = [ "Development Status :: 3 - Alpha", From b6e32b595a2954a4f6109f6ad6c88604e3f00d60 Mon Sep 17 00:00:00 2001 From: Mike Wilensky Date: Mon, 27 Oct 2025 15:29:53 -0400 Subject: [PATCH 6/7] Add pyuvdata dependency --- pyproject.toml | 3 ++- requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 857d010..a407374 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,8 @@ description = "Gibbs sampling for 21cm cosmology experiments" readme = "README.md" dynamic = ["version"] dependencies = [ - "numpy<2.0", + numpy, + pyuvdata, scipy, healpy, matvis, diff --git a/requirements.txt b/requirements.txt index e99b89b..b83b79f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -numpy<2.0 +numpy scipy healpy matvis @@ -6,3 +6,4 @@ pygdsm pyuvsim spherical hera_sim +pyuvdata From a05d6a4b3b432023eed2f4d256f4b0fd2072b214 Mon Sep 17 00:00:00 2001 From: Mike Wilensky Date: Mon, 27 Oct 2025 15:32:06 -0400 Subject: [PATCH 7/7] Update script files --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a407374..4b4c1c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,9 @@ script-files = [ "scripts/precompute_response_sh_singlefreq_general.py", "scripts/redundant_select.py", "scripts/shortbls_select.py", - "beam_example.py", + "power_beam_example.py", + "per_antenna_beam_example.py", + "beam_example_utils.py", "example.py" ]