Skip to content

Commit

Permalink
Update documentation about Docker images available from ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Sep 22, 2020
1 parent 624b56e commit c41e13a
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 18 deletions.
33 changes: 33 additions & 0 deletions docs/pages/development.rst
Expand Up @@ -27,6 +27,10 @@ Otherwise, if you have an idea of a problem or even better a solution just
let us know via an issue (you could also describe problem with words so we can figure
out how to solve it with a suitable programming solution).


***************
Getting started
***************
For working on the code base, please clone the repository and install development
dependencies.

Expand All @@ -53,3 +57,32 @@ In order to run the tests more **quickly**::
poetry install --extras=excel
poetry shell
pytest -vvvv -m "not (remote or slow)"


******
Docker
******
In order to build a development Docker image incorporating the current
working tree, you might want to use the toplevel ``Dockerfile`` within
this project.

If you want to use readymade images to just run Wetterdienst, please
head over to :ref:`run-in-docker`.

.. highlight:: bash

Build the image::

docker build -t "wetterdienst" .

To run the tests in the given environment, just call::

docker run -ti -v $(pwd):/app wetterdienst:latest poetry run pytest -vvvv tests

from the main directory. To work in an iPython shell, invoke::

docker run -ti -v $(pwd):/app wetterdienst:latest poetry run ipython

The ``wetterdienst`` command is also available::

docker run -ti -v $(pwd):/app wetterdienst:latest poetry run wetterdienst --help
44 changes: 26 additions & 18 deletions docs/pages/installation.rst
Expand Up @@ -9,7 +9,7 @@ your workstation or within a Docker container.
******
Native
******
The installation of ``wetterdienst`` can happen via PyPi or directly from GitHub. The GitHub
The installation of ``wetterdienst`` can happen via PyPI or directly from GitHub. The GitHub
version will always include most recent changes that may not have been released to PyPI.

PyPI
Expand All @@ -24,35 +24,43 @@ GitHub
pip install git+https://github.com/earthobservations/wetterdienst
In order to check the installation, invoke::

******
Docker
******
wetterdienst --help

We have a Docker image available that let's you run the library dockerized. To use
Wetterdienst in a Docker container, you just have to build the image from this project

.. code-block:: bash

docker build -t "wetterdienst" .
.. _run-in-docker:

To run the tests in the given environment, just call
******
Docker
******
Docker images for each stable release will get pushed to GitHub Container Registry.

.. code-block:: bash
There are images in two variants, ``wetterdienst-standard`` and ``wetterdienst-full``.

docker run -ti -v $(pwd):/app wetterdienst:latest poetry run pytest -vvvv tests
``wetterdienst-standard`` will contain a minimum set of 3rd-party packages,
while ``wetterdienst-full`` will try to serve a full environment by also
including packages like GDAL and wradlib.

from the main directory. To work in an iPython shell, invoke
Library
=======
Use the latest stable version of Wetterdienst::

.. code-block:: bash
$ docker run -ti ghcr.io/earthobservations/wetterdienst-standard
Python 3.8.5 (default, Sep 10 2020, 16:58:22)
[GCC 8.3.0] on linux

docker run -ti -v $(pwd):/app wetterdienst:latest poetry run ipython
>>> import wetterdienst
>>> wetterdienst.__version__
'0.7.0'

Command line script
===================
The ``wetterdienst`` command is also available::

The ``wetterdienst`` command is also available through Docker:

.. code-block:: bash
# Make an alias to use it conveniently from your shell.
alias wetterdienst='docker run -ti ghcr.io/earthobservations/wetterdienst-standard wetterdienst'

docker run -ti -v $(pwd):/app wetterdienst:latest poetry run wetterdienst --help
wetterdienst --version
wetterdienst --help

0 comments on commit c41e13a

Please sign in to comment.