Skip to content

Commit

Permalink
Move cosmopower to optional dep (#96)
Browse files Browse the repository at this point in the history
* remove cosmopower requirement

* added all test env with cosmopower extra dep

* typo fix

* added readme and install notes about cosmopower extra
  • Loading branch information
itrharrison authored Feb 1, 2023
1 parent d3132da commit 7b0a2e5
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Using conda

We have provided a conda environment defined in `soliket-tests.yml <https://github.com/simonsobs/SOLikeT/blob/master/soliket-tests.yml>`_ which provides easy set up of a virtual envrinoment with all the dependencies installed in order to run SOLikeT and its tests on multiple platforms (explicitly tested for ubuntu and MacOS-11).

In order to use the CosmoPower Theories within SOLikeT you will need to additionally install CosmoPower (and with it tensorflow, which is rather heavy and hence left out of the default installation).

This should be easily achievable with:

```
pip install cosmopower
```

If you wish to install it using your own system tools some useful information is provided below.

On your own laptop/virtual machine
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ cd soliket
pip install -e .
```

### Optional Extras

In order to use the CosmoPower Theories within SOLikeT you will need to additionally install CosmoPower (and with it tensorflow, which is rather heavy and hence left out of the default installation).

This should be easily achievable with:

```
pip install cosmopower
```

## Running Tests

Running tests
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dill
fuzzywuzzy
astropy
camb
cosmopower
getdist
cobaya
pyccl
Expand Down
5 changes: 4 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ install_requires =
scikit-learn
astropy
camb
cosmopower
getdist
cobaya
pyccl
Expand All @@ -32,6 +31,10 @@ soliket = *.yaml,*.bibtex,clusters/data/*,clusters/data/selFn_equD56/*,lensing/d
testpaths = "soliket"
text_file_format = rst

[options.extras_require]
all =
cosmopower

[flake8]
select = E713,E704,E703,E714,E741,E10,E11,E20,E22,E23,E25,E27,E301,E302,E304,E9,
F405,F406,F5,F6,F7,F8,W1,W2,W3,W6,E501
Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ description =
oldest: with the oldest supported version of key dependencies
cov: and test coverage

extras =
all: all

commands =
pip freeze
cobaya-install planck_2018_highl_plik.TTTEEE_lite_native --no-set-global
Expand Down

0 comments on commit 7b0a2e5

Please sign in to comment.