Skip to content

Commit

Permalink
update installation docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MAfarrag committed Aug 16, 2024
1 parent 5e589b8 commit 12dd087
Showing 1 changed file with 39 additions and 27 deletions.
66 changes: 39 additions & 27 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,21 @@ Installation



Stable release
--------------
dependencies
************

Required dependencies
=====================

- Python (3.11 or later)
- `numpy <https://www.numpy.org/>`__ (2 or later)
- `pandas <https://pandas.pydata.org/>`__ (2 or later)
- `SciPy <https://scipy.org/>`__ (1.14 or later)
- `scikit-learn <https://scikit-learn.org/>`__ (1.5 or later)
- `matplotlib <https://matplotlib.org//>`__ (1.5 or later)

Stable release
**************
Please install ``statista`` in a Virtual environment so that its requirements don't tamper with your system's python.

conda
Expand All @@ -19,14 +31,14 @@ you can use the following command:

+ ``conda install -c conda-forge statista``

If this works it will install Hapi with all dependencies including Python and gdal,
If this works it will install `statista` with all dependencies including Python and numpy, scipy and scikit-learn
and you skip the rest of the installation instructions.


Installing Python and gdal dependencies
---------------------------------------

The main dependencies for statista are an installation of Python 3.9+, and gdal
The main dependencies for statista are an installation of Python 3.9+, and scipy

Installing Python
-----------------
Expand All @@ -43,13 +55,13 @@ makes installation of required dependencies easier using the conda package manag
Install as a conda environment
------------------------------

The easiest and most robust way to install Hapi is by installing it in a separate
The easiest and most robust way to install statista is by installing it in a separate
conda environment. In the root repository directory there is an ``environment.yml`` file.
This file lists all dependencies. Either use the ``environment.yml`` file from the master branch
(please note that the master branch can change rapidly and break functionality without warning),
This file lists all dependencies. Either use the ``environment.yml`` file from the main branch
(please note that the main branch can change rapidly and break functionality without warning),
or from one of the releases {release}.

Run this command to start installing all Hapi dependencies:
Run this command to start installing all statista dependencies:

+ ``conda env create -f environment.yml``

Expand All @@ -58,8 +70,8 @@ a session, run:

+ ``conda activate statista``

For the installation of Hapi there are two options (from the Python Package Index (PyPI)
or from Github). To install a release of Hapi from the PyPI (available from release 2018.1):
For the installation of statista there are two options (from the Python Package Index (PyPI)
or from Github). To install a release of statista from the PyPI (available from release 2018.1):

+ ``pip install statista=={release}``

Expand All @@ -68,38 +80,38 @@ From sources
------------


The sources for HapiSM can be downloaded from the `Github repo`_.
The sources for statista can be downloaded from the `Github repo`_.

You can either clone the public repository:

.. code-block:: console
$ git clone git://github.com/MAfarrag/statista
$ git clone git://github.com/Serapieum-of-alex/statista
Or download the `tarball`_:

.. code-block:: console
$ curl -OJL https://github.com/MAfarrag/statista/tarball/main
$ curl -OJL https://github.com/Serapieum-of-alex/statista/tarball/main
Once you have a copy of the source, you can install it with:

.. code-block:: console
$ python setup.py install
$ python -m pip install .
.. _Github repo: https://github.com/MAfarrag/statista
.. _tarball: https://github.com/MAfarrag/statista/tarball/master
.. _Github repo: https://github.com/Serapieum-of-alex/statista
.. _tarball: https://github.com/Serapieum-of-alex/statista/tarball/main


To install directly from GitHub (from the HEAD of the master branch):
To install directly from GitHub (from the HEAD of the main branch):

+ ``pip install git+https://github.com/MAfarrag/statista.git``
+ ``pip install git+https://github.com/Serapieum-of-alex/statista.git``

or from Github from a specific release:

+ ``pip install git+https://github.com/MAfarrag/statista.git@{release}``
+ ``pip install git+https://github.com/Serapieum-of-alex/statista.git@{release}``

Now you should be able to start this environment's Python with ``python``, try
``import statista`` to see if the package is installed.
Expand All @@ -109,33 +121,33 @@ More details on how to work with conda environments can be found here:
https://conda.io/docs/user-guide/tasks/manage-environments.html


If you are planning to make changes and contribute to the development of Hapi, it is
If you are planning to make changes and contribute to the development of statista, it is
best to make a git clone of the repository, and do a editable install in the location
of you clone. This will not move a copy to your Python installation directory, but
instead create a link in your Python installation pointing to the folder you installed
it from, such that any changes you make there are directly reflected in your install.

+ ``git clone https://github.com/MAfarrag/statista.git``
+ ``git clone https://github.com/Serapieum-of-alex/statista.git``
+ ``cd statista``
+ ``activate statista``
+ ``pip install -e .``

Alternatively, if you want to avoid using ``git`` and simply want to test the latest
version from the ``master`` branch, you can replace the first line with downloading
a zip archive from GitHub: https://github.com/MAfarrag/statista/archive/master.zip
`libraries.io <https://libraries.io/github/MAfarrag/statista>`_.
version from the ``main`` branch, you can replace the first line with downloading
a zip archive from GitHub: https://github.com/Serapieum-of-alex/statista/archive/main.zip
`libraries.io <https://libraries.io/github/Serapieum-of-alex/statista>`_.

Install using pip
-----------------

Besides the recommended conda environment setup described above, you can also install
Hapi with ``pip``. For the more difficult to install Python dependencies, it is best to
statista with ``pip``. For the more difficult to install Python dependencies, it is best to
use the conda package manager:

+ ``conda install numpy scipy gdal netcdf4 pyproj``
+ ``conda install numpy scipy scikit-learn matplotlib pandas loguru``


you can check `libraries.io <https://libraries.io/github/MAfarrag/statista>`_. to check versions of the libraries
you can check `libraries.io <https://libraries.io/github/Serapieum-of-alex/statista>`_. to check versions of the libraries


Then install a release {release} of statista (available from release 2018.1) with pip:
Expand Down

0 comments on commit 12dd087

Please sign in to comment.