diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 6873d3d5a..6afd87db7 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -26,7 +26,6 @@ Besides passing all CI checks and coverage is at 100%, make sure you also checke After the PR has been approved by two reviewers: -- [ ] Update the code version in `clmm/__ini__.py`. +- [ ] Update the code version in `clmm/__init__.py`. - [ ] Keep only relevant points in the squash and merge commit message. -- [ ] If any dependencies have been altered, update `environment.yml`, `pyproject.toml`, `INSTALL.md`, and `README.md`. A maintainer should also be notified to change the requirements on conda-forge. -- [ ] Update `clmm/theory/_ccl_supported_versions.py` and `clmm/theory/ccl.py` if pyccl's version constraints have been altered. +- [ ] If any dependencies have been altered, update `environment.yml`, `pyproject.toml`, `INSTALL.md`, and `README.md`. A maintainer should also be notified to change the requirements on conda-forge. \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 88419725a..000000000 --- a/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ -language: python - -cache: pip - -python: -- 3.6 -- nightly - -# We don't want travis to fail if a new experimental feature breaks us -jobs: - allow_failures: - - python: nightly - fast_finish: true - -install: - # Update apt-get and install GSL - - sudo apt-get update - - sudo apt-get install libgsl0-dev swig3.0 libfftw3-dev gobject-introspection python-gobject gfortran libmpfr-dev libhdf5-dev liblapack-dev libnlopt-dev libcfitsio3-dev gir1.2-glib-2.0 libgirepository1.0-dev python3-gi python-gi -y - - # Install the dependencies - - git clone https://github.com/tmcclintock/cluster_toolkit.git ; cd cluster_toolkit ; python setup.py install ; cd - - - git clone https://github.com/LSSTDESC/CCL ; cd CCL ; python setup.py install ; cd - - - wget https://github.com/NumCosmo/NumCosmo/releases/download/v0.15.2/numcosmo-0.15.2.tar.gz && tar xf numcosmo-0.15.2.tar.gz && cd numcosmo-0.15.2 && ./configure --prefix=/usr && make -j4 && sudo make install && cd - - - pip install pycairo==1.19.1 - - pip install pygobject - - export MPLBACKEND="agg" - - pip install matplotlib - - python3 numcosmo-0.15.2/examples/example_simple.py - - pip install -r requirements.txt - - #- export GI_TYPELIB_PATH="${GI_TYPELIB_PATH}:/usr/share/gir-1.0" - - # Install the package - - python setup.py install - - # Install dependencies required to test the docs - - sudo apt-get install pandoc -y - - pip install ipykernel - - python -m ipykernel install --user --name python3 --display-name python3 - - pip install sphinx==2.1.2 sphinx_rtd_theme nbconvert jupyter_client - - # Install coveralls for test coverage - - pip install coveralls pytest-cov - -script: - # Run the unit tests: - - py.test tests/ --ignore=cluster_toolkit/tests --cov=clmm/ - - # Run the docs: - - make -C docs/ html - -after_success: - - coveralls diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a544cad65..3fdde94b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,7 +73,7 @@ In this case you will not have to reinstall it at every change. - **Build the documentation:** To test the docs, in the root package directory after installing, run `./update_docs`. This script both deletes the old compiled documentation files and rebuilds them. You can view the compiled docs by running `open docs/_build/html/index.html`. > **NOTE:** If the changes you are making affect which CCL or NumCosmo versions are compatible with the code, -> please update `clmm/theory/_ccl_supported_versions.py`, `environment.yml`, `README.md` and `INSTALL.md` accordingly. +> please update `environment.yml`, `README.md` and `INSTALL.md` accordingly. > Also, any changes on the constraints on CLMM dependencies should be reflected on `environment.yml` and `pyproject.toml`. It is also necessary to update those constraints on conda-forge after a specific release. Please notify the maintainers if that's necessary. All these steps (except running the notebooks) are run automatically on each pull request on GitHub, so you will know if any of them require further attention before considering youre changes are ready to be reviewed. Check `details` on `Build and Check / build-gcc-ubuntu (pull_request)` section at the end of the PR and `coverage` under the `coveralls` comment in the middle of the PR. diff --git a/INSTALL.md b/INSTALL.md index c0f6c5dfe..02fc8809b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -37,7 +37,7 @@ This should automatically pull all necessary dependencies, with the exception of ### Theory backend installation First, choose and install a theory backend for CLMM. This can be CCL (versions 3.1.2 or later), -NumCosmo (versions between v0.19 and v0.22), +NumCosmo (version v0.24), or cluster_toolkit and they are installable as follows. To install CCL as the theory/cosmology backend, run diff --git a/README.md b/README.md index 24f9ca48e..85dea1ef1 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ For the theoretical predictions of the signal, CLMM relies on existing libraries - [cluster-toolkit](https://cluster-toolkit.readthedocs.io/en/latest/) - [CCL](https://ccl.readthedocs.io/en/latest/) (versions 3.1.2 or later) -- [NumCosmo](https://numcosmo.github.io/) (versions between v0.19 and v0.22) +- [NumCosmo](https://numcosmo.github.io/) (version v0.24) (See the [INSTALL documentation](INSTALL.md) for more detailed installation instructions.) diff --git a/clmm/__init__.py b/clmm/__init__.py index f1a42f5ef..596f76bd5 100644 --- a/clmm/__init__.py +++ b/clmm/__init__.py @@ -27,4 +27,4 @@ ) from .utils import compute_radial_averages, convert_units, make_bins -__version__ = "1.16.10" +__version__ = "1.16.11" diff --git a/environment.yml b/environment.yml index a2b42be74..0b458ef6b 100644 --- a/environment.yml +++ b/environment.yml @@ -13,7 +13,7 @@ dependencies: - isort - jupyter - matplotlib - - numcosmo <= 0.24 + - numcosmo == 0.24 - numpy >= 2.0 - pandoc - pip diff --git a/tests/conftest.py b/tests/conftest.py index 52a9fd1d3..788957d13 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -42,7 +42,6 @@ "theory_reltol": 2.0e-6, "ps_reltol": 5.0e-3, }, - {"nick": "testnotabackend", "cosmo_reltol": 0.0, "theory_reltol": 0.0}, ], ) def modeling_data(request): @@ -51,7 +50,7 @@ def modeling_data(request): try: avail = clmm.theory.backend_is_available(param["nick"]) except ValueError: - pytest.skip(f"Unsupported backend '{param}'.") + pytest.fail(f"Unsupported backend '{param}'.") if avail or param["nick"] == "notabackend": os.environ["CLMM_MODELING_BACKEND"] = param["nick"] @@ -60,7 +59,7 @@ def modeling_data(request): importlib.reload(clmm) return param else: - pytest.skip(f"Backend not available '{param}'.") + pytest.fail(f"Backend not available '{param}'.") @pytest.fixture( diff --git a/tests/test_theory_be.py b/tests/test_theory_be.py index 3eceac885..56dc4120b 100644 --- a/tests/test_theory_be.py +++ b/tests/test_theory_be.py @@ -30,6 +30,9 @@ def test_base(monkeypatch): "prereqs": ["notaprereq"], }, } + + assert clmm.theory.backend_is_available("testnotabackend") is False + assert_raises(ImportError, clmm.theory.load_backend_env) # broken backend clmm.theory.__backends["notabackend"]["prereqs"] = []