From a6e5814849fcffb3ae16615d5cb4f05c2da42c73 Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Thu, 31 Oct 2024 19:36:33 +0000 Subject: [PATCH 01/17] update code for namaster v2 --- environment.yml | 5 +++-- pyproject.toml | 6 +++--- tests/data/conf_covariance_calculator.yml | 6 ++---- tests/data/conf_covariance_calculator_mpi.yml | 6 ++---- .../conf_covariance_gaussian_fourier_nmt.yaml | 6 ++---- ...nf_covariance_gaussian_fourier_nmt_txpipe.yaml | 6 ++---- ...ovariance_gaussian_fourier_nmt_txpipe_mpi.yaml | 6 ++---- tests/test_covariance_fourier_gaussian_nmt.py | 14 +++++++------- tjpcov/covariance_fourier_gaussian_nmt.py | 15 ++++++++------- 9 files changed, 31 insertions(+), 39 deletions(-) diff --git a/environment.yml b/environment.yml index 1e51b2d0..b909c26e 100644 --- a/environment.yml +++ b/environment.yml @@ -11,11 +11,12 @@ dependencies: - pytest-rerunfailures - coveralls - numpy - - scipy + # - scipy + - scipy<1.12 # <1.12 to avoid bug in CCL<3.1 (not in pypy) with simpson integration - pyyaml - pyccl>=3.0.0 - sacc>=0.12 - - namaster + - namaster>2 - camb - Jinja2 - healpy diff --git a/pyproject.toml b/pyproject.toml index cd3aa1ca..78f81c3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Physics" ] dependencies = [ - "scipy", + "scipy<1.12", # <1.12 to avoid bug in CCL<3.1 (not in pypy) with simpson integration "numpy", "Jinja2", "pyyaml", @@ -47,13 +47,13 @@ doc = [ "sphinx-book-theme", ] nmt = [ - "pymaster>=1.4.0" + "pymaster>=2" ] mpi = [ "mpi4py" ] full = [ - "pymaster>=1.4.0", + "pymaster>=2", "mpi4py", "sphinx", "sphinx-autoapi", diff --git a/tests/data/conf_covariance_calculator.yml b/tests/data/conf_covariance_calculator.yml index fc7e87ac..d5ab3f5b 100644 --- a/tests/data/conf_covariance_calculator.yml +++ b/tests/data/conf_covariance_calculator.yml @@ -41,19 +41,17 @@ NaMaster: module: pymaster f: n_iter: 0 - lmax_sht: -1 + lmax: null + lmax_mask: null w: - lmax_mask: -1 l_toeplitz: -1 l_exact: -1 dl_band: -1 - n_iter: 3 recompute: True cw: l_toeplitz: -1 l_exact: -1 dl_band: -1 - n_iter: 3 recompute: True cache: diff --git a/tests/data/conf_covariance_calculator_mpi.yml b/tests/data/conf_covariance_calculator_mpi.yml index 23438dec..b6d38485 100644 --- a/tests/data/conf_covariance_calculator_mpi.yml +++ b/tests/data/conf_covariance_calculator_mpi.yml @@ -42,19 +42,17 @@ NaMaster: module: pymaster f: n_iter: 0 - lmax_sht: -1 + lmax: null + lmax_mask: null w: - lmax_mask: -1 l_toeplitz: -1 l_exact: -1 dl_band: -1 - n_iter: 3 recompute: True cw: l_toeplitz: -1 l_exact: -1 dl_band: -1 - n_iter: 3 recompute: True cache: diff --git a/tests/data/conf_covariance_gaussian_fourier_nmt.yaml b/tests/data/conf_covariance_gaussian_fourier_nmt.yaml index d370cc76..35118288 100644 --- a/tests/data/conf_covariance_gaussian_fourier_nmt.yaml +++ b/tests/data/conf_covariance_gaussian_fourier_nmt.yaml @@ -40,19 +40,17 @@ NaMaster: module: pymaster f: n_iter: 0 - lmax_sht: -1 + lmax: null + lmax_mask: null w: - lmax_mask: -1 l_toeplitz: -1 l_exact: -1 dl_band: -1 - n_iter: 3 recompute: True cw: l_toeplitz: -1 l_exact: -1 dl_band: -1 - n_iter: 3 recompute: True parameters: diff --git a/tests/data/conf_covariance_gaussian_fourier_nmt_txpipe.yaml b/tests/data/conf_covariance_gaussian_fourier_nmt_txpipe.yaml index 2e85a600..752af664 100644 --- a/tests/data/conf_covariance_gaussian_fourier_nmt_txpipe.yaml +++ b/tests/data/conf_covariance_gaussian_fourier_nmt_txpipe.yaml @@ -26,19 +26,17 @@ NaMaster: module: pymaster f: n_iter: 0 - lmax_sht: -1 + lmax: null + lmax_mask: null w: - lmax_mask: -1 l_toeplitz: -1 l_exact: -1 dl_band: -1 - n_iter: 3 recompute: True cw: l_toeplitz: -1 l_exact: -1 dl_band: -1 - n_iter: 3 recompute: True parameters: diff --git a/tests/data/conf_covariance_gaussian_fourier_nmt_txpipe_mpi.yaml b/tests/data/conf_covariance_gaussian_fourier_nmt_txpipe_mpi.yaml index fbef6b7f..c560f504 100644 --- a/tests/data/conf_covariance_gaussian_fourier_nmt_txpipe_mpi.yaml +++ b/tests/data/conf_covariance_gaussian_fourier_nmt_txpipe_mpi.yaml @@ -26,19 +26,17 @@ NaMaster: module: pymaster f: n_iter: 0 - lmax_sht: -1 + lmax: null + lmax_mask: null w: - lmax_mask: -1 l_toeplitz: -1 l_exact: -1 dl_band: -1 - n_iter: 3 recompute: True cw: l_toeplitz: -1 l_exact: -1 dl_band: -1 - n_iter: 3 recompute: True parameters: diff --git a/tests/test_covariance_fourier_gaussian_nmt.py b/tests/test_covariance_fourier_gaussian_nmt.py index 9bb593cb..0714ce36 100644 --- a/tests/test_covariance_fourier_gaussian_nmt.py +++ b/tests/test_covariance_fourier_gaussian_nmt.py @@ -389,16 +389,16 @@ def test_get_cl_for_cov(cov_fg_nmt): with pytest.raises(ValueError): cov_fg_nmt.get_cl_for_cov( - cl_fid_Sh, cl["nl_cp"], m, m, w, nl_is_cp=True + cl_fid_Sh['cl'], cl["nl_cp"], m, m, w, nl_is_cp=True ) with pytest.raises(ValueError): # Uncoupled binned noise - cov_fg_nmt.get_cl_for_cov(cl_fid, cl["nl"], m, m, w, nl_is_cp=True) + cov_fg_nmt.get_cl_for_cov(cl_fid['cl'], cl["nl"], m, m, w, nl_is_cp=True) with pytest.raises(ValueError): cov_fg_nmt.get_cl_for_cov( - cl_fid, cl["nl_cp"], m, m, wSh, nl_is_cp=True + cl_fid['cl'], cl["nl_cp"], m, m, wSh, nl_is_cp=True ) @@ -662,7 +662,7 @@ def test_get_covariance_block_cache(cov_fg_nmt, tracer_comb1, tracer_comb2): @pytest.mark.parametrize( "kwargs", - [{}, {"l_toeplitz": 10, "l_exact": 10, "dl_band": 10, "n_iter": 0}], + [{}, {"l_toeplitz": 10, "l_exact": 10, "dl_band": 10}], ) def test_get_covariance_workspace(cov_fg_nmt, kwargs): m1 = get_mask_from_dtype("galaxy_clustering") @@ -715,7 +715,7 @@ def test_get_covariance_workspace(cov_fg_nmt, kwargs): # Check only the first is written/computed created & that cw is correct for fields, masks_names in zip(combinations, combinations_names): - spins = [fi.fl.spin for fi in fields] + spins = [fi.spin for fi in fields] cw_code = cov_fg_nmt.get_covariance_workspace( *fields, *masks_names, **kwargs ) @@ -967,7 +967,7 @@ def get_data_types(self): @pytest.mark.parametrize( "kwargs", - [{}, {"l_toeplitz": 10, "l_exact": 10, "dl_band": 10, "n_iter": 0}], + [{}, {"l_toeplitz": 10, "l_exact": 10, "dl_band": 10}], ) def test_get_workspace(cov_fg_nmt, kwargs): # Compute NmtBins @@ -1030,7 +1030,7 @@ def test_get_workspace(cov_fg_nmt, kwargs): @pytest.mark.parametrize( "kwargs", - [{}, {"l_toeplitz": 10, "l_exact": 10, "dl_band": 10, "n_iter": 0}], + [{}, {"l_toeplitz": 10, "l_exact": 10, "dl_band": 10}], ) def test_get_workspace_dict(cov_fg_nmt, kwargs): tracers = get_tracers_dict_for_cov() diff --git a/tjpcov/covariance_fourier_gaussian_nmt.py b/tjpcov/covariance_fourier_gaussian_nmt.py index 57a589f4..2cbb2244 100644 --- a/tjpcov/covariance_fourier_gaussian_nmt.py +++ b/tjpcov/covariance_fourier_gaussian_nmt.py @@ -319,7 +319,7 @@ def get_covariance_block( mn[2], mn[3], mn[4], - lmax=int(ell[-1]), + # lmax=int(ell[-1]), # Not available in NaMaster v2 **self.nmt_conf["cw"], ) @@ -385,10 +385,10 @@ def get_covariance_workspace( """ outdir = self.io.outdir spins = { - m1: f1.fl.spin, - m2: f2.fl.spin, - m3: f3.fl.spin, - m4: f4.fl.spin, + m1: f1.spin, + m2: f2.spin, + m3: f3.spin, + m4: f4.spin, } # Any other symmetry? @@ -481,6 +481,7 @@ def get_fields_dict(self, tracer_names, cache=None, masks=None, **kwargs): # We add the spin to make sure we distinguish fields of # different types even though they share the same mask k = mask_names[i] + str(spins[i]) + print(nmt_conf) if k not in f_by_mask_name: f_by_mask_name[k] = nmt.NmtField( masks[i], None, spin=spins[i], **nmt_conf @@ -673,7 +674,7 @@ def get_workspace(self, f1, f2, m1, m2, bins, **kwargs): ) outdir = self.io.outdir - s1, s2 = f1.fl.spin, f2.fl.spin + s1, s2 = f1.spin, f2.spin # Currently, outdir will be always not None. If not specified, it # will be the current directory. I leave this for now since we might @@ -763,7 +764,7 @@ def get_workspaces_dict( if key in cache: w[i] = cache[key] else: - s1, s2 = fields[i1].fl.spin, fields[i2].fl.spin + s1, s2 = fields[i1].spin, fields[i2].spin # In this case you have to check for m1 x m2 and m2 x m1 k = (mask_names[i1], mask_names[i2]) sk = "".join(sorted(f"{s1}{s2}")) From 62cbda926be2981bf68267709c6be6cf425f344d Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Mon, 4 Nov 2024 14:19:56 +0000 Subject: [PATCH 02/17] fixed RecursionError --- tjpcov/covariance_gaussian_fsky.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tjpcov/covariance_gaussian_fsky.py b/tjpcov/covariance_gaussian_fsky.py index 972252e7..80fcc363 100644 --- a/tjpcov/covariance_gaussian_fsky.py +++ b/tjpcov/covariance_gaussian_fsky.py @@ -43,7 +43,7 @@ def get_binning_info(self, binning="linear"): # TODO: This should be obtained from the sacc file or the input # configuration. Check how it is done in TXPipe: # https://github.com/LSSTDESC/TXPipe/blob/a9dfdb7809ac7ed6c162fd3930c643a67a - out = self.get_binning_info() + out = super().get_binning_info() if out is not None: ell = out[0] ell_eff = out[1] From 8e5ff3fcd7b7125e8033728d37878873a40b40c2 Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Mon, 4 Nov 2024 14:23:10 +0000 Subject: [PATCH 03/17] blacked --- tests/test_covariance_fourier_gaussian_nmt.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_covariance_fourier_gaussian_nmt.py b/tests/test_covariance_fourier_gaussian_nmt.py index 0714ce36..8e3016d9 100644 --- a/tests/test_covariance_fourier_gaussian_nmt.py +++ b/tests/test_covariance_fourier_gaussian_nmt.py @@ -389,16 +389,18 @@ def test_get_cl_for_cov(cov_fg_nmt): with pytest.raises(ValueError): cov_fg_nmt.get_cl_for_cov( - cl_fid_Sh['cl'], cl["nl_cp"], m, m, w, nl_is_cp=True + cl_fid_Sh["cl"], cl["nl_cp"], m, m, w, nl_is_cp=True ) with pytest.raises(ValueError): # Uncoupled binned noise - cov_fg_nmt.get_cl_for_cov(cl_fid['cl'], cl["nl"], m, m, w, nl_is_cp=True) + cov_fg_nmt.get_cl_for_cov( + cl_fid["cl"], cl["nl"], m, m, w, nl_is_cp=True + ) with pytest.raises(ValueError): cov_fg_nmt.get_cl_for_cov( - cl_fid['cl'], cl["nl_cp"], m, m, wSh, nl_is_cp=True + cl_fid["cl"], cl["nl_cp"], m, m, wSh, nl_is_cp=True ) From 915b931854d60741b750e18da528bab4a2dd77a0 Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Mon, 4 Nov 2024 17:23:00 +0000 Subject: [PATCH 04/17] trying to fix coveralls --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b345ddba..9f5ef99e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -122,6 +122,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} flag-name: run-${{ join(matrix.*, '-') }} parallel: true + file: .coverage finish: needs: tests From 74314a74916e557b02e3d5481cfacc5a425c8038 Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 08:42:35 +0000 Subject: [PATCH 05/17] new try 2 --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9f5ef99e..f2d6388e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -97,7 +97,8 @@ jobs: pip install -U mpi4py --no-cache-dir --no-deps - name: Run Tests - run: coverage run --source=tjpcov -m pytest -vv tests/ + # run: coverage run --source=tjpcov -m pytest -vv tests/ test_covariance_io.py + run: coverage run --source=tjpcov -m pytest -vv tests/test_covariance_io.py - name: Run MPI Tests (OpenMPI) run: | @@ -122,7 +123,6 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} flag-name: run-${{ join(matrix.*, '-') }} parallel: true - file: .coverage finish: needs: tests From 8d149928c01b48abcad532b7e2280ace528d0a8f Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 08:52:38 +0000 Subject: [PATCH 06/17] new try 3 --- .github/workflows/ci.yaml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f2d6388e..38c3193b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -97,25 +97,25 @@ jobs: pip install -U mpi4py --no-cache-dir --no-deps - name: Run Tests - # run: coverage run --source=tjpcov -m pytest -vv tests/ test_covariance_io.py - run: coverage run --source=tjpcov -m pytest -vv tests/test_covariance_io.py + # run: coverage run --source=tjpcov -m pytest -vv tests/ + run: coverage run --source=tjpcov -m pytest -vv tests/test_covariance_io.py && coverage lcov - - name: Run MPI Tests (OpenMPI) - run: | - mpiexec -n 2 pytest -vv tests/test_mpi.py + # - name: Run MPI Tests (OpenMPI) + # run: | + # mpiexec -n 2 pytest -vv tests/test_mpi.py - mamba remove -y openmpi - pip uninstall -y mpi4py + # mamba remove -y openmpi + # pip uninstall -y mpi4py - - name: Run MPI Tests (mpich) - run: | - mamba install -y mpich - pip install -U mpi4py --no-cache-dir --no-deps + # - name: Run MPI Tests (mpich) + # run: | + # mamba install -y mpich + # pip install -U mpi4py --no-cache-dir --no-deps - mpiexec -n 2 pytest -vv tests/test_mpi.py + # mpiexec -n 2 pytest -vv tests/test_mpi.py - mamba remove -y mpich - pip uninstall -y mpi4py + # mamba remove -y mpich + # pip uninstall -y mpi4py - name: Collect coverage report uses: coverallsapp/github-action@v2 @@ -123,6 +123,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} flag-name: run-${{ join(matrix.*, '-') }} parallel: true + path: coverage.lcov finish: needs: tests From 494668fa5858e392951fe4cb3cae9f303d3897f9 Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 09:07:22 +0000 Subject: [PATCH 07/17] fixed coveralls --- .github/workflows/ci.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 38c3193b..3452fce3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -98,24 +98,24 @@ jobs: - name: Run Tests # run: coverage run --source=tjpcov -m pytest -vv tests/ - run: coverage run --source=tjpcov -m pytest -vv tests/test_covariance_io.py && coverage lcov + run: coverage run --source=tjpcov -m pytest -vv tests && coverage lcov - # - name: Run MPI Tests (OpenMPI) - # run: | - # mpiexec -n 2 pytest -vv tests/test_mpi.py + - name: Run MPI Tests (OpenMPI) + run: | + mpiexec -n 2 pytest -vv tests/test_mpi.py - # mamba remove -y openmpi - # pip uninstall -y mpi4py + mamba remove -y openmpi + pip uninstall -y mpi4py - # - name: Run MPI Tests (mpich) - # run: | - # mamba install -y mpich - # pip install -U mpi4py --no-cache-dir --no-deps + - name: Run MPI Tests (mpich) + run: | + mamba install -y mpich + pip install -U mpi4py --no-cache-dir --no-deps - # mpiexec -n 2 pytest -vv tests/test_mpi.py + mpiexec -n 2 pytest -vv tests/test_mpi.py - # mamba remove -y mpich - # pip uninstall -y mpi4py + mamba remove -y mpich + pip uninstall -y mpi4py - name: Collect coverage report uses: coverallsapp/github-action@v2 From e5f9e4fdd553b642d3e29d404323911f3c127adc Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 09:30:51 +0000 Subject: [PATCH 08/17] clean comments --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3452fce3..59e63131 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -97,7 +97,6 @@ jobs: pip install -U mpi4py --no-cache-dir --no-deps - name: Run Tests - # run: coverage run --source=tjpcov -m pytest -vv tests/ run: coverage run --source=tjpcov -m pytest -vv tests && coverage lcov - name: Run MPI Tests (OpenMPI) From d8500a90c9e74a38be1331e4cb4d491f6f0beed5 Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 09:47:53 +0000 Subject: [PATCH 09/17] tying to fix macos pip problem --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 59e63131..d6ae66ea 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -84,6 +84,7 @@ jobs: run: | export MAMBA_NO_BANNER=1 mamba env update --file ${{ env.CONDA_ENV }} + pip install -U pip - name: Install TJPCov run: | From cd7c0df38e1c50af0f5bf16b28bce06d74ac8ed1 Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 10:00:15 +0000 Subject: [PATCH 10/17] updated to miniforge as mambaforge is deprecated --- .github/workflows/ci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d6ae66ea..356b1b9c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -62,7 +62,7 @@ jobs: use-mamba: true activate-environment: tjpcov miniforge-version: latest - miniforge-variant: Mambaforge + miniforge-variant: Miniforge - name: Cache Date id: get-date @@ -84,7 +84,6 @@ jobs: run: | export MAMBA_NO_BANNER=1 mamba env update --file ${{ env.CONDA_ENV }} - pip install -U pip - name: Install TJPCov run: | From 0bdd5c3ca8ebc2c58663f21a68d36911cb1077cc Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 10:03:28 +0000 Subject: [PATCH 11/17] removed offending line --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 356b1b9c..868dd4b5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -62,7 +62,6 @@ jobs: use-mamba: true activate-environment: tjpcov miniforge-version: latest - miniforge-variant: Miniforge - name: Cache Date id: get-date From 200d3ab8af08332c7caa3b21c74aacb18ba8f145 Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 10:55:58 +0000 Subject: [PATCH 12/17] use correct input name --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 868dd4b5..5b924f1a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -121,7 +121,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} flag-name: run-${{ join(matrix.*, '-') }} parallel: true - path: coverage.lcov + path-to-lcov: coverage.lcov finish: needs: tests From 3c5a23b45ddcb20cc918ee350738c44bf3c5052d Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 11:05:51 +0000 Subject: [PATCH 13/17] trying to fix macos pip install . error --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5b924f1a..8efc5296 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -86,7 +86,8 @@ jobs: - name: Install TJPCov run: | - pip install .[nmt] --no-deps + # pip install .[nmt] --no-deps + pip install "git+https://github.com/LSSTDESC/TJPCov.git#egg=TJPCov[nmt]" --no-deps - name: Install mpi4py into cache # If this is cached, re-add mpi4py From 28d7a98ba984e5a6a18adc99273901cf4d9132c3 Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 11:22:46 +0000 Subject: [PATCH 14/17] new try --- .github/workflows/ci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8efc5296..d830a56d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -86,8 +86,7 @@ jobs: - name: Install TJPCov run: | - # pip install .[nmt] --no-deps - pip install "git+https://github.com/LSSTDESC/TJPCov.git#egg=TJPCov[nmt]" --no-deps + pip install --ignored-installed .[nmt] --no-deps - name: Install mpi4py into cache # If this is cached, re-add mpi4py From 05f7d4a7b95e9a2085bbed684d5071d0cf5172ad Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 11:25:11 +0000 Subject: [PATCH 15/17] fixed typo --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d830a56d..cbcbe952 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -86,7 +86,7 @@ jobs: - name: Install TJPCov run: | - pip install --ignored-installed .[nmt] --no-deps + pip install --ignore-installed .[nmt] --no-deps - name: Install mpi4py into cache # If this is cached, re-add mpi4py From 6fcc8cc37094c74a72934f1e1ca4081ef676027b Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Tue, 5 Nov 2024 11:38:02 +0000 Subject: [PATCH 16/17] revert pip installation and comment out cache --- .github/workflows/ci.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cbcbe952..20384420 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -63,20 +63,20 @@ jobs: activate-environment: tjpcov miniforge-version: latest - - name: Cache Date - id: get-date - run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT - - - name: Check for cached environment - uses: actions/cache@v3 - id: cache - env: - # Increase this value to reset cache if etc/example-environment.yml has not changed - CACHE_NUMBER: 0 - with: - path: ${{env.CONDA}}/envs - key: - ${{runner.os}}.${{runner.arch}}.mamba-py.${{matrix.python-version}}.${{hashFiles('pyproject.toml')}}.${{hashFiles('environment.yml')}}.${{steps.get-date.outputs.today}}.${{env.CACHE_NUMBER}} + # - name: Cache Date + # id: get-date + # run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT + # + # - name: Check for cached environment + # uses: actions/cache@v3 + # id: cache + # env: + # # Increase this value to reset cache if etc/example-environment.yml has not changed + # CACHE_NUMBER: 0 + # with: + # path: ${{env.CONDA}}/envs + # key: + # ${{runner.os}}.${{runner.arch}}.mamba-py.${{matrix.python-version}}.${{hashFiles('pyproject.toml')}}.${{hashFiles('environment.yml')}}.${{steps.get-date.outputs.today}}.${{env.CACHE_NUMBER}} - name: Install environment packages if: steps.cache.outputs.cache-hit != 'true' @@ -86,7 +86,7 @@ jobs: - name: Install TJPCov run: | - pip install --ignore-installed .[nmt] --no-deps + pip install .[nmt] --no-deps - name: Install mpi4py into cache # If this is cached, re-add mpi4py From eb948e6f61a708521d58272bf6006f48ed707822 Mon Sep 17 00:00:00 2001 From: carlosggarcia Date: Wed, 13 Nov 2024 12:04:06 +0000 Subject: [PATCH 17/17] david comments --- tjpcov/covariance_fourier_gaussian_nmt.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tjpcov/covariance_fourier_gaussian_nmt.py b/tjpcov/covariance_fourier_gaussian_nmt.py index 2cbb2244..945048fb 100644 --- a/tjpcov/covariance_fourier_gaussian_nmt.py +++ b/tjpcov/covariance_fourier_gaussian_nmt.py @@ -319,7 +319,6 @@ def get_covariance_block( mn[2], mn[3], mn[4], - # lmax=int(ell[-1]), # Not available in NaMaster v2 **self.nmt_conf["cw"], ) @@ -481,7 +480,6 @@ def get_fields_dict(self, tracer_names, cache=None, masks=None, **kwargs): # We add the spin to make sure we distinguish fields of # different types even though they share the same mask k = mask_names[i] + str(spins[i]) - print(nmt_conf) if k not in f_by_mask_name: f_by_mask_name[k] = nmt.NmtField( masks[i], None, spin=spins[i], **nmt_conf