Skip to content

Commit

Permalink
Updated installation instructions, bumped version in other places.
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgeb committed Apr 1, 2020
1 parent c2236ed commit d42549d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
31 changes: 29 additions & 2 deletions docs-source/source/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Installation
Installing the :code:`hmc_tomography` package is dead-simple. It requires you to have
Python 3.7 on your system. Virtual environments and :code:`Conda` are also fine.

Installing the package in a new Conda environment
*************************************************
Installing the package (in a new Conda environment)
***************************************************

Activate your environment of choice. To create e.g. a new :code:`Conda` environment with the
appropriate Python version, run the following from your terminal:
Expand All @@ -24,6 +24,11 @@ There's at the moment two options to install the package:

1. Install the code directly from GitHub;
2. Clone the GitHub repo and install from that directory.
3. Download the :code:`.zip` file of the repo, unzip, and install from that directory.


Option one
^^^^^^^^^^

Option one simply requires you to run the following command from your shell (with the
appropriate environment activated):
Expand All @@ -32,6 +37,17 @@ appropriate environment activated):
> $ pip install -e git+git@github.com:larsgeb/hmc-tomography.git@master#egg=hmc_tomography
This won't work as long as the GitHub repo is private. If you've set up SSH keys with
your GitHub account, and we've granted you access, you can run the following command
instead:

.. code-block:: bash
> $ pip install -e git+ssh://git@github.com/larsgeb/hmc-tomography.git#egg=hmc_tomography
Option two
^^^^^^^^^^

Option two requires you to run the following commands (with the appropriate environment
activated):

Expand All @@ -41,6 +57,17 @@ activated):
> $ cd hmc-tomography
> $ pip install -e .
Option three
^^^^^^^^^^^^

Option three requires you to decompress the :code:`.zip` file and go open a terminal in
the resulting folder (such that you see the files :code:`setup.py`, :code:`README.md`,
etc. Once you have activated the proper environment in your shell, run the following:

.. code-block:: bash
> $ pip install -e .
If the command succeeds, you now have access to the package from your Python 3.7
distribution by importing :code:`hmc_tomography`:

Expand Down
2 changes: 1 addition & 1 deletion hmc_tomography/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""HMC Tomography module.
Copyright 2019 Andrea Zunino, Andreas Fichtner, Lars Gebraad
Copyright 2019-2020 Andrea Zunino, Andreas Fichtner, Lars Gebraad
"""
from hmc_tomography import (
MassMatrices,
Expand Down
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="hmc-tomography",
version="0.1.0",
version="0.2.1",
author="Lars Gebraad, Andreas Fichtner, Andrea Zunino",
author_email="lars.gebraad@erdw.ethz.ch",
description="An example HMC tomography package",
Expand All @@ -15,11 +15,11 @@
packages=setuptools.find_packages(),
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
],
python_requires=">=3.6",
python_requires=">=3.7",
install_requires=[
"numpy",
"scipy",
Expand All @@ -29,6 +29,8 @@
"h5py",
"pyyaml",
],
extras_require={"dev": ["black", "pre-commit", "sphinx", "numpydoc", "codecov", "pytest"]},
extras_require={
"dev": ["black", "pre-commit", "sphinx", "numpydoc", "codecov", "pytest"]
},
entry_points={"console_scripts": ["hmc_tomography=hmc_tomography.__main__:cli"]},
)

0 comments on commit d42549d

Please sign in to comment.