Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for new CCL release #620

Merged
merged 32 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ddddc16
Prepare for ccl new minor versions
hsinfan1996 Feb 21, 2024
1586216
Install CCL from main branch
hsinfan1996 Mar 9, 2024
b4fdd1d
setup-miniconda@v3
hsinfan1996 Mar 9, 2024
83965f8
Merge branch 'main' into issue/619/Fix_CCL_version_checking
hsinfan1996 Mar 28, 2024
9d0133a
Update build_check.yml
hsinfan1996 Mar 28, 2024
7da9411
use conda-forge to install ccl
m-aguena Jun 19, 2024
85a29ca
only require CCL v3.0
m-aguena Jun 19, 2024
1f9acb7
install ccl with pip
m-aguena Jun 19, 2024
8ada834
add pylint ignores
m-aguena Jun 19, 2024
6e50941
restore ccl source installation
m-aguena Jun 19, 2024
2ad5fc4
No mamba
hsinfan1996 Jun 19, 2024
e2d8792
Revert
hsinfan1996 Jun 19, 2024
45a42a1
No mamba second attempt
hsinfan1996 Jun 19, 2024
fd0d912
Update build_check.yml
hsinfan1996 Jun 19, 2024
db908bd
Update build_check.yml
hsinfan1996 Jun 19, 2024
3e401f4
Update build_check.yml
hsinfan1996 Jun 19, 2024
eba984c
Update build_check.yml
hsinfan1996 Jun 19, 2024
8342edf
Update build_check.yml
hsinfan1996 Jun 19, 2024
92b8675
--solver=classic
hsinfan1996 Jun 19, 2024
fadf48a
conda-libmamba-solver
hsinfan1996 Jun 19, 2024
f62ef96
Update build_check.yml
hsinfan1996 Jun 19, 2024
00aa03a
libarchive only
hsinfan1996 Jun 19, 2024
2bd0738
Update build_check.yml
hsinfan1996 Jun 19, 2024
b210d98
libarchive=3.6.2
hsinfan1996 Jun 19, 2024
bd0795a
Move Sphinx prereqs up
hsinfan1996 Jun 19, 2024
bb9a51d
Update build_check.yml
hsinfan1996 Jun 19, 2024
dd75298
Cleanup
hsinfan1996 Jun 20, 2024
5717f61
Use latest CCL
hsinfan1996 Jun 20, 2024
fb0371b
Update build_check.yml
hsinfan1996 Jun 20, 2024
ba6e96c
Install setuptools_scm
hsinfan1996 Jun 20, 2024
db01b54
document PR on comment in build_check
m-aguena Jun 20, 2024
3a5f3aa
Update version to 1.12.1
m-aguena Jun 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
- name: Install prereq using conda
run: |
echo "$CONDA/bin" >> $GITHUB_PATH
conda install -c conda-forge gobject-introspection pygobject
conda install -c conda-forge gobject-introspection pygobject sphinx sphinx_rtd_theme nbconvert pandoc ipython
- name: Install prereq using pip
run: |
pip install -r requirements.txt
Expand All @@ -33,11 +33,10 @@ jobs:
pip install .
- name: Install CCL from source
run: |
conda install -c conda-forge cmake swig --override-channels
conda install -c conda-forge cmake swig setuptools_scm
git clone https://github.com/LSSTDESC/CCL
cd CCL
git checkout v3.0.0
pip install .
pip install --no-use-pep517 .
- name: Analysing the code with pylint
run: |
pip install pylint
Expand All @@ -48,9 +47,10 @@ jobs:
pytest tests/ --ignore=cluster_toolkit/tests --cov=clmm/
env:
DISPLAY: test
- name: Install Sphinx prereq
run: |
conda install -c conda-forge sphinx sphinx_rtd_theme nbconvert pandoc ipython ipython_genutils
# temporarily moved up due to libarchive issue
# - name: Install Sphinx prereq
# run: |
# conda install -c conda-forge sphinx sphinx_rtd_theme nbconvert pandoc ipython ipython_genutils
- name: Run the docs
run: |
make -C docs/ html
Expand Down
5 changes: 2 additions & 3 deletions clmm/theory/ccl.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
# Check which versions of ccl are currently supported
from . import _ccl_supported_versions

if parse(ccl.__version__) < parse(_ccl_supported_versions.VMIN) or parse(ccl.__version__) > parse(
_ccl_supported_versions.VMAX
):
if (parse(ccl.__version__) < parse(_ccl_supported_versions.VMIN)
or parse(ccl.__version__).major > parse(_ccl_supported_versions.VMAX).major):
raise EnvironmentError(
f"Current CCL version ({ccl.__version__}) not supported by CLMM. "
f"It must be between {_ccl_supported_versions.VMIN} and {_ccl_supported_versions.VMAX}."
Expand Down
17 changes: 16 additions & 1 deletion clmm/theory/parent_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,10 @@ def eval_tangential_shear(self, r_proj, z_cl, z_src, z_src_info="discrete", verb

if self.halo_profile_model == "einasto" and verbose:
print(f"Einasto alpha = {self._get_einasto_alpha(z_cl=z_cl)}")
gammat = None

# function _validate_z_src already safekeeps from this error:
# pylint: disable=possibly-used-before-assignment

if z_src_info == "discrete":
warning_msg = (
"\nSome source redshifts are lower than the cluster redshift."
Expand Down Expand Up @@ -844,6 +847,9 @@ def eval_convergence(self, r_proj, z_cl, z_src, z_src_info="discrete", verbose=F
if self.halo_profile_model == "einasto" and verbose:
print(f"Einasto alpha = {self._get_einasto_alpha(z_cl=z_cl)}")

# function _validate_z_src already safekeeps from this error:
# pylint: disable=possibly-used-before-assignment

if z_src_info == "discrete":
warning_msg = (
"\nSome source redshifts are lower than the cluster redshift."
Expand Down Expand Up @@ -1053,6 +1059,9 @@ def eval_reduced_tangential_shear(
if self.halo_profile_model == "einasto" and verbose:
print(f"Einasto alpha = {self._get_einasto_alpha(z_cl=z_cl)}")

# functions _validate_z_src, _validate_approx_z_src_info already safekeeps from this error:
# pylint: disable=possibly-used-before-assignment

if approx is None:
if z_src_info == "distribution":
gt = self._pdz_weighted_avg(
Expand Down Expand Up @@ -1211,6 +1220,9 @@ def eval_magnification(
if self.halo_profile_model == "einasto" and verbose:
print(f"Einasto alpha = {self._get_einasto_alpha(z_cl=z_cl)}")

# functions _validate_z_src, _validate_approx_z_src_info already safekeeps from this error:
# pylint: disable=possibly-used-before-assignment

if approx is None:
if z_src_info == "distribution":
mu = self._pdz_weighted_avg(
Expand Down Expand Up @@ -1375,6 +1387,9 @@ def eval_magnification_bias(
if self.halo_profile_model == "einasto" and verbose:
print(f"Einasto alpha = {self._get_einasto_alpha(z_cl=z_cl)}")

# functions _validate_z_src, _validate_approx_z_src_info already safekeeps from this error:
# pylint: disable=possibly-used-before-assignment

if approx is None:
# z_src (float or array) is redshift
if z_src_info == "distribution":
Expand Down