-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from LSSTDESC/use-official-firecrown
Use conda-released Firecrown version; update build
- Loading branch information
Showing
5 changed files
with
80 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,42 @@ pip install --no-deps -e . | |
|
||
You are now ready to try a simple forecast as outlined in the next section. | ||
|
||
|
||
----------- | ||
## Installation using Conda | ||
|
||
Because Augur depends upon Firecrown, and Firecrown requires installation using Conda, we use Conda to install Augur. | ||
|
||
# clone the Augur repository | ||
git clone [email protected]:LSSTDESC/augur.git | ||
|
||
# conda env update, when run as suggested, is able to create a new environment, as | ||
# well as updating an existing environment. | ||
conda env update -f augur/environment.yml | ||
conda activate forecasting | ||
|
||
# The following line loads the firecrown module from the environment, and queries | ||
# it to find the installation location. | ||
FIRECROWN_DIR=$(python -c "import firecrown; print('/'.join(firecrown.__spec__.submodule_search_locations[0].split('/')[0:-1]))") | ||
|
||
# We define some environment variables that will be defined whenever you activate | ||
# the conda environment. | ||
conda env config vars set AUGUR_DIR=${PWD}/augur CSL_DIR=${CONDA_PREFIX}/cosmosis-standard-library FIRECROWN_DIR=${FIRECROWN_DIR} | ||
# The command above does not immediately define the environment variables. | ||
# They are made available on every fresh activation of the environment. | ||
# So we have to deactivate and then reactivate... | ||
conda deactivate | ||
conda activate forecasting | ||
# Now we can finish building the CosmoSIS Standard Library. | ||
source ${CONDA_PREFIX}/bin/cosmosis-configure | ||
# We want to put the CSL into the same directory as conda environment upon which it depends | ||
cd ${CONDA_PREFIX} | ||
cosmosis-build-standard-library | ||
# Now change directory into the Augur repository | ||
cd ${AUGUR_DIR} | ||
# And finally make an editable (developer) installation of firecrown into the conda environment | ||
python -m pip install --no-deps --editable ${PWD} | ||
|
||
## Usage | ||
|
||
`augur` has changed from its initial version and currently only contains a | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.1.0" | ||
__version__ = "0.1.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: forecasting | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- firecrown | ||
- healpy | ||
- jinja2 | ||
- numpydoc | ||
- pip | ||
- pip: | ||
- tjpcov | ||
- qp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[metadata] | ||
name = augur | ||
version = attr: augur._version.__version__ | ||
author = DESC Team | ||
description = DESC Cosmology Forecasting Tool | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
url = https://github.com/LSSTDESC/augur | ||
license_files = LICENSE | ||
|
||
[options] | ||
include_package_data = True | ||
packages = find: | ||
python_requires = >=3.9 | ||
install_requires = | ||
firecrown | ||
jinja2 | ||
healpy | ||
numpydoc | ||
qp | ||
|
||
[options.packages.find] | ||
exclude = | ||
examples* | ||
tests* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,7 @@ | ||
import os | ||
from setuptools import setup, find_packages | ||
"""Setup script for augur. | ||
""" | ||
|
||
scripts = ['bin/augur'] | ||
from setuptools import setup | ||
|
||
__version__ = None | ||
pth = os.path.join( | ||
os.path.dirname(os.path.realpath(__file__)), | ||
"augur", | ||
"_version.py") | ||
with open(pth, 'r') as fp: | ||
exec(fp.read()) | ||
|
||
setup( | ||
name='augur', | ||
version=__version__, | ||
description="DESC Cosmology Forecasting Tool", | ||
author="DESC Team", | ||
packages=find_packages(), | ||
include_package_data=True, | ||
scripts=scripts, | ||
install_requires=[ | ||
'pyccl', 'click', 'numpy', 'firecrown', | ||
'scipy', 'pandas', 'pyyaml', 'jinja2'], | ||
) | ||
if __name__ == "__main__": | ||
setup() |