Skip to content

Commit

Permalink
Update installation instructions to work with conda environments
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminrose committed Aug 11, 2020
1 parent 7a276e7 commit a22f322
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 3 deletions.
15 changes: 14 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,20 @@ This project is an adaption of UNITY_ that allows for standardization of Type Ia
Installing UNITY
================

This application is maintained via via Poetry_ and the ``pyproject.toml`` file. Its depends on Python 3 (tested with 3.7) and most of the typical scientific software stack_.
Installation is poorly tested and documented after one reinstall. Bellow there be errors.

With the repo downloaded and a `conda` installation working, from inside the root directory of UNITY:

.. code-block:: bash
conda env create -f unity.yaml
conda activate unity
pip install .
The full list of pinned dependencies can be found in ``unity-lock.yaml``. Installing `unity` can also be done in editable mode: `` pip install -e .``. Currently only the `unity` application is supported; it is not accessible as an importable module.

Previous and still possible installation instructions, if if you change the ``pyproject.toml`` and ``setup.py`` files :

This application was maintained via via Poetry_ and the ``pyproject.toml`` file. Its depends on Python 3 (tested with 3.7) and most of the typical scientific software stack_.

.. _Poetry: https://poetry.eustace.io
.. _stack: https://github.com/rubind/host_unity/blob/master/pyproject.toml#L18
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ sphinx_rtd_theme = "^0.4.3"
[tool.poetry.scripts]
unity = "unity.cli:cli"

#[build-system]
#requires = ["poetry>=0.12"]
#build-backend = "poetry.masonry.api"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
requires = ["setuptools", "wheel", "oldest-supported-numpy", "Cython"]
24 changes: 24 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env python

import setuptools

if __name__ == "__main__":
setuptools.setup(name = "unity",
version = "0.1.1-alpha.2",
description = "",
author = ["Benjamin Rose", "David Rubin"],
author_email = ["[email protected]", "[email protected]"],
license = "MIT",
# readme = "README.rst",
url = "https://github.com/rubind/host_unity",
# homepage
# documentation
classifiers = ["Develoment Status :: 4 - Beta",
"Environment :: Console",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX"],
# entry_points = {'unity': ["unity.cli:cli"]}
entry_points = '''[console_scripts]
unity=unity.cli:cli
''',
)
92 changes: 92 additions & 0 deletions unity-lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: unity
channels:
- conda-forge
- defaults
dependencies:
- arviz=0.9.0=py_0
- astropy=4.0.1.post1=py38h64e0658_0
- bzip2=1.0.8=h0b31af3_2
- c-ares=1.16.1=haf1e3a3_0
- ca-certificates=2020.6.20=hecda079_0
- cctools=949.0.1=h22b1bf0_0
- cctools_osx-64=949.0.1=h5ba7a2e_0
- certifi=2020.6.20=py38h32f6830_0
- cftime=1.2.1=py38h9c4ca6c_0
- clang=9.0.1=default_hf57f61e_0
- clang_osx-64=9.0.1=h05bbb7f_0
- clangxx=9.0.1=default_hf57f61e_0
- clangxx_osx-64=9.0.1=h05bbb7f_2
- click=7.1.2=pyh9f0ad1d_0
- compiler-rt=9.0.1=h6a512c6_3
- compiler-rt_osx-64=9.0.1=h99342c6_3
- corner=2.1.0=pyh9f0ad1d_0
- curl=7.71.1=hbdca1c0_4
- cycler=0.10.0=py_2
- cython=0.29.21=py38hc84c608_0
- extinction=0.4.5=py38h65ad66c_0
- freetype=2.10.2=h8da9a1a_0
- hdf4=4.2.13=h84186c3_1003
- hdf5=1.10.6=nompi_haae91d6_101
- jpeg=9d=h0b31af3_0
- kiwisolver=1.2.0=py38ha0d09dd_0
- krb5=1.17.1=h14dd6a4_2
- lcms2=2.11=h174193d_0
- ld64=530=0
- ld64_osx-64=530=h3c32e8a_0
- libblas=3.8.0=17_openblas
- libcblas=3.8.0=17_openblas
- libcurl=7.71.1=he6690cf_4
- libcxx=10.0.1=h5f48129_0
- libedit=3.1.20191231=hed1e85f_1
- libev=4.33=haf1e3a3_0
- libffi=3.2.1=h4a8c4bd_1007
- libgfortran=4.0.0=2
- liblapack=3.8.0=17_openblas
- libllvm9=9.0.1=h7475705_1
- libnetcdf=4.7.4=nompi_hc5b2cf3_105
- libnghttp2=1.41.0=h8a08a2b_1
- libopenblas=0.3.10=openmp_h63d9170_4
- libpng=1.6.37=hbbe82c9_1
- libssh2=1.9.0=h39bdce6_5
- libtiff=4.1.0=h2ae36a8_6
- libwebp-base=1.1.0=h0b31af3_3
- llvm-openmp=10.0.1=h28b9765_0
- lz4-c=1.9.2=h4a8c4bd_1
- matplotlib=3.3.0=1
- matplotlib-base=3.3.0=py38haed9462_1
- ncurses=6.2=hb1e8313_1
- netcdf4=1.5.4=nompi_py38h74ad9c1_100
- numpy=1.19.1=py38h598c1e0_0
- olefile=0.46=py_0
- openssl=1.1.1g=h0b31af3_1
- packaging=20.4=pyh9f0ad1d_0
- pandas=1.1.0=py38h11c0d25_0
- patsy=0.5.1=py_0
- pillow=7.2.0=py38h83dc5e5_1
- pip=20.2.2=py_0
- pyparsing=2.4.7=pyh9f0ad1d_0
- pystan=2.19.1.1=py38h4f17bb1_1
- python=3.8.5=h85f3143_2_cpython
- python-dateutil=2.8.1=py_0
- python_abi=3.8=1_cp38
- pytz=2020.1=pyh9f0ad1d_0
- readline=8.0=h0678c8f_2
- scipy=1.5.2=py38h1402333_0
- seaborn=0.10.1=1
- seaborn-base=0.10.1=py_1
- setuptools=49.3.1=py38h32f6830_0
- six=1.15.0=pyh9f0ad1d_0
- sncosmo=2.1.0=py38h3b54f70_0
- sqlite=3.32.3=h93121df_1
- statsmodels=0.11.1=py38h64e0658_2
- tapi=1000.10.8=h879752b_4
- tk=8.6.10=hbbe82c9_0
- toml=0.10.1=pyh9f0ad1d_0
- tornado=6.0.4=py38h64e0658_1
- wheel=0.34.2=py_1
- xarray=0.16.0=py_0
- xz=5.2.5=h0b31af3_1
- zlib=1.2.11=1007
- zstd=1.4.5=h0384e3a_2
prefix: /Users/benrose/miniconda3/envs/unity

17 changes: 17 additions & 0 deletions unity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: unity
channels:
- conda-forge
- defaults
dependencies:
- click=7.1.2=pyh9f0ad1d_0
- corner=2.1.0=pyh9f0ad1d_0
- matplotlib=3.3.0=1
- numpy=1.19.1=py38h598c1e0_0
- pandas=1.1.0=py38h11c0d25_0
- pystan=2.19.1.1=py38h4f17bb1_1
- python=3.8.5=h85f3143_2_cpython
- scipy=1.5.2=py38h1402333_0
- seaborn=0.10.1=1
- sncosmo=2.1.0=py38h3b54f70_0
- toml=0.10.1=pyh9f0ad1d_0
- pip=20.2.2=py_0

0 comments on commit a22f322

Please sign in to comment.