Skip to content
Snippets Groups Projects
README.rst 2.89 KiB
Newer Older
Nicolas Piaget's avatar
Nicolas Piaget committed
|docs| |pipelines|

Mathias Hauser's avatar
Mathias Hauser committed
###############################################
Nicolas Piaget's avatar
Nicolas Piaget committed
Lagranto - A Library to work with trajectories.
Mathias Hauser's avatar
Mathias Hauser committed
###############################################
Nicolas Piaget's avatar
Nicolas Piaget committed

A recent build of the documentation is available at https://lagranto.readthedocs.io/en/latest/

Mathias Hauser's avatar
Mathias Hauser committed
Changelog
---------
Mathias Hauser's avatar
Mathias Hauser committed

Mathias Hauser's avatar
Mathias Hauser committed
The changelog of can be found under `CHANGELOG.md <CHANGELOG.md>`_.
Nicolas Piaget's avatar
Nicolas Piaget committed
Install the development environment
-----------------------------------

Copy locally the latest version from lagranto:

.. code-block:: bash

    git clone git@git.iac.ethz.ch:atmosdyn/Lagranto.git /path/to/local/lagranto
    cd path/to/local/lagranto
Nicolas Piaget's avatar
Nicolas Piaget committed

Nicolas Piaget's avatar
Nicolas Piaget committed
Prepare the conda environment:
Michael Sprenger's avatar
Michael Sprenger committed

Nicolas Piaget's avatar
Nicolas Piaget committed
.. code-block:: bash

    module load miniconda3
    conda create -y -q -n lagranto_dev python=3.5.4 pytest
    conda env update -q -f lagranto.yml -n lagranto_dev

Install lagranto in development mode in lagranto_dev:

.. code-block:: bash

    source activate lagranto_dev
    pip install -e .

Run the tests:

.. code-block:: bash

    python -m pytest

Mathias Hauser's avatar
Mathias Hauser committed
Make the modifications available
--------------------------------
Nicolas Piaget's avatar
Nicolas Piaget committed

.. code-block:: bash

    git clone URL       # Copy the server version locally
    git status          # Give the status of the file as seen from git
    git pull            # Get the latest version from the server
    git add FILES...    # Add modified files
    git commit          # Add the changes to the git system, only locally
    git push            # Push the local changes to the server
Nicolas Piaget's avatar
Nicolas Piaget committed

Documentation
-------------

Nicolas Piaget's avatar
Nicolas Piaget committed
To compile the documentation the `sphinx` package have to be installed:

.. code-block:: bash
Nicolas Piaget's avatar
Nicolas Piaget committed

    conda install sphinx

Nicolas Piaget's avatar
Nicolas Piaget committed
To compile the html documentation:

.. code-block:: bash
Nicolas Piaget's avatar
Nicolas Piaget committed

    cd docs
    make html
Nicolas Piaget's avatar
Nicolas Piaget committed



Update package on conda and PyPi
--------------------------------

Prerequisites
~~~~~~~~~~~~~

Conda
=====

- A github account
- Fork the repository https://github.com/conda-forge/lagranto-feedstock.
- Clone the fork locally.

PyPi
====

- A PyPi account
- A gpg key


General Steps
~~~~~~~~~~~~~

Nicolas Piaget's avatar
Nicolas Piaget committed
1. Change the version number in setup.py
2. Add a tag for this new version:
Nicolas Piaget's avatar
Nicolas Piaget committed

.. code-block:: bash

    git tag -s TAGNAME -u KEY

Nicolas Piaget's avatar
Nicolas Piaget committed
3. Push the tag:
Nicolas Piaget's avatar
Nicolas Piaget committed

.. code-block:: bash

    git push --tags

PyPi
~~~~

Simply run:

.. code-block:: bash

    ./pypi_upload.sh


Conda
~~~~~

Nicolas Piaget's avatar
Nicolas Piaget committed
Edit the version name and the sha256 sum of Lagranto in recipe/meta.yaml.
Nicolas Piaget's avatar
Nicolas Piaget committed
The sha256 can be determined as follow:

.. code-block:: bash

    wget "https://git.iac.ethz.ch/atmosdyn/Lagranto/repository/VERSION/archive.tar.gz"
    sha245sum archive.tar.gz

Nicolas Piaget's avatar
Nicolas Piaget committed
Commit and push the changes, and on github create a pull-request on conda-forge/lagranto-feedstock



.. |docs| image:: https://readthedocs.org/projects/lagranto/badge/?version=latest
    :target: http://lagranto.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status


.. |pipelines| image:: https://gitlab.com/atmosdyn/Lagranto/badges/master/pipeline.svg
    :target: https://gitlab.com/atmosdyn/Lagranto/commits/master