Skip to content

Commit

Permalink
Merge pull request #5 from TUW-GEO/first_release
Browse files Browse the repository at this point in the history
First release
  • Loading branch information
cnavacch authored Dec 21, 2020
2 parents fda5c71 + c01819b commit 477292d
Show file tree
Hide file tree
Showing 12 changed files with 256 additions and 64 deletions.
12 changes: 12 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

sphinx:
configuration: docs/conf.py

python:
install:
- method: pip
path: .

conda:
environment: conda_environment.yml
45 changes: 45 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
dist: xenial
os:
- linux
services:
- xvfb
language: python
sudo: false
addons:
apt:
packages:
- gfortran
- gcc
- libgrib-api-dev
notifications:
email: false
python:
# We don't actually use the Travis Python, but this keeps it organized.
- "3.6"
install:
# You may want to periodically update this, although the conda update
# conda line below will keep everything up-to-date. We do this
# conditionally because it saves us some downloading if the version is
# the same.
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda env create -f conda_environment.yml
- source activate veranda
- python setup.py install
- pip list
- conda list
- which pip
- which python

script:
- python setup.py test
after_success:
# report coverage results to coveralls.io
- pip install coveralls
- coveralls
5 changes: 4 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
Contributors
============

* cnavacch <[email protected]>
* Claudio Navacchi (cnavacch) <[email protected]>
* Sebastian Hahn (sebhahn) <[email protected]>
* Bernhard Bauer-Marschallinger <[email protected]>

11 changes: 5 additions & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
Changelog
=========

Version 0.1
===========

- Feature A added
- FIX: nasty bug #1729 fixed
- add your changes here!
Version 0.1.0
=============
- TU Wiens internal package `pyraster` was recreated as `veranda`
- Support for GeoTIFF and NetCDF reading and writing
- Added auto-decoding for both GeoTIFF and NetCDF
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 cnavacch
Copyright (c) 2020 TU Wien - Department of Geodesy and Geoinformation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
88 changes: 88 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# veranda
[![Build Status](https://travis-ci.com/TUW-GEO/veranda.svg?branch=master)](https://travis-ci.org/TUW-GEO/veranda)
[![Coverage Status](https://coveralls.io/repos/github/TUW-GEO/veranda/badge.svg?branch=master)](https://coveralls.io/github/TUW-GEO/veranda?branch=master)
[![PyPi Package](https://badge.fury.io/py/veranda.svg)](https://badge.fury.io/py/veranda)
[![RTD](https://readthedocs.org/projects/veranda/badge/?version=latest)](https://veranda.readthedocs.io/en/latest/?badge=latest)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Description
*veranda* stands for *"vector and raster data access"* and is a place for IO related classes and operations dealing
with vector and raster data. Currently, there is only one module `io`, which adds support for GeoTIFF (`geotiff`) and
NetCDF (`netcdf`) files and their image stack representations (`timestack`).

## Limitations and Outlook
Support for vector data is still missing, which could for instance include reading and writing Shape-Files or well-known
data formats like CSV for storing point-based *in-situ* data.

Performant data access is a key-feature for data cubes storing Earth Observation (EO) data.
The core-interface between higher-level data cubes (cf. *yeoda*) and the data stored on disk will be also
implemented in *veranda*, allowing efficient and unambiguous writing and reading of EO data.

## Installation
The package can be either installed via pip or if you want to work solely with *veranda* or contribute, we recommend to
install it as a conda environment. If you work already with your own environment, please have look at ``requirements.txt``.

### pip
To install *veranda* via pip in your own environment, use:
```
pip install veranda
```
**ATTENTION**: GDAL needs more OS support and has more dependencies then other packages and can therefore not be installed solely via pip.
Please have a look at https://pypi.org/project/GDAL/ what requirements are needed. Thus, for a fresh setup, an existing environment
with a Python and GDAL installation are expected.

### conda
The packages also comes along with one conda environment ``conda_environment.yml``.
This is especially recommended if you want to contribute to the project.
The following script will install miniconda and setup the environment on a UNIX
like system. Miniconda will be installed into ``$HOME/miniconda``.
```
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda env create -f conda_environment.yml
source activate veranda
```
This script adds ``$HOME/miniconda/bin`` temporarily to the ``PATH`` to do this
permanently add ``export PATH="$HOME/miniconda/bin:$PATH"`` to your ``.bashrc``
or ``.zshrc``.

For Windows, use the following setup:
* Download the latest [miniconda 3 installer](https://docs.conda.io/en/latest/miniconda.html) for Windows
* Click on ``.exe`` file and complete the installation.
* Add the folder ``condabin`` folder to your environment variable ``PATH``.
You can find the ``condabin`` folder usually under: ``C:\Users\username\AppData\Local\Continuum\miniconda3\condabin``
* Finally, you can set up the conda environment via:
```
conda env create -f conda_environment.yml
source activate veranda
```
After that you should be able to run
```
python setup.py test
```
to run the test suite.
## Contribution
We are happy if you want to contribute. Please raise an issue explaining what
is missing or if you find a bug. We will also gladly accept pull requests
against our master branch for new features or bug fixes.
If you want to contribute please follow these steps:
* Fork the *veranda* repository to your account
* Clone the *veranda* repository
* Make a new feature branch from the *veranda* master branch
* Add your feature
* Please include tests for your contributions in one of the test directories.
We use *py.test* so a simple function called ``test_my_feature`` is enough
* Submit a pull request to our master branch
## Citation
If you use this software in a publication then please cite it using the Zenodo DOI.
## Note
This project has been set up using PyScaffold 3.2.2. For details and usage
information on PyScaffold see https://pyscaffold.org/.
19 changes: 0 additions & 19 deletions README.rst

This file was deleted.

4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

# General information about the project.
project = u'veranda'
copyright = u'2019, cnavacch'
copyright = u'2020, TU Wien'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -236,7 +236,7 @@
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'user_guide.tex', u'veranda Documentation',
u'cnavacch', 'manual'),
u'TU Wien', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down
28 changes: 7 additions & 21 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,9 @@
veranda
=======

This is the documentation of **veranda**.

.. note::

This is the main page of your project's `Sphinx`_ documentation.
It is formatted in `reStructuredText`_. Add additional pages
by creating rst-files in ``docs`` and adding them to the `toctree`_ below.
Use then `references`_ in order to link them from this page, e.g.
:ref:`authors` and :ref:`changes`.

It is also possible to refer to the documentation of other Python packages
with the `Python domain syntax`_. By default you can reference the
documentation of `Sphinx`_, `Python`_, `NumPy`_, `SciPy`_, `matplotlib`_,
`Pandas`_, `Scikit-Learn`_. You can add more by extending the
``intersphinx_mapping`` in your Sphinx's ``conf.py``.

The pretty useful extension `autodoc`_ is activated by default and lets
you include documentation from docstrings. Docstrings can be written in
`Google style`_ (recommended!), `NumPy style`_ and `classical style`_.
*veranda* stands for *"vector and raster data access"* and is a place for IO related classes and operations dealing
with vector and raster data. Currently, there is only one module `io`, which adds support for GeoTIFF (`geotiff`) and
NetCDF (`netcdf`) files and their image stack representations (`timestack`).


Contents
Expand All @@ -29,10 +13,12 @@ Contents
.. toctree::
:maxdepth: 2

Installation <install>
Module Reference <api/modules>
License <license>
Authors <authors>
Changelog <changelog>
Module Reference <api/modules>



Indices and tables
Expand All @@ -56,4 +42,4 @@ Indices and tables
.. _autodoc: http://www.sphinx-doc.org/en/stable/ext/autodoc.html
.. _Google style: https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings
.. _NumPy style: https://numpydoc.readthedocs.io/en/latest/format.html
.. _classical style: http://www.sphinx-doc.org/en/stable/domains.html#info-field-lists
.. _classical style: http://www.sphinx-doc.org/en/stable/domains.html#info-field-lists
58 changes: 58 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
============
Installation
============

The package can be either installed via pip or if you solely want to work with *veranda* or contribute, we recommend to
install it as a conda environment. If you work already with your own environment, please have look at ``requirements.txt``.

pip
===

To install *veranda* via pip in your own environment, use:

.. code-block:: console
pip install veranda
conda
=====
The packages also comes along a conda environments: ``conda_environment.yml``.
This is especially recommended if you want to contribute to the project.
The following script will install miniconda and setup the environment on a UNIX
like system. Miniconda will be installed into ``$HOME/miniconda``.

.. code-block:: console
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda env create -f conda_environment.yml
source activate veranda
This script adds ``$HOME/miniconda/bin`` temporarily to the ``PATH`` to do this
permanently add ``export PATH="$HOME/miniconda/bin:$PATH"`` to your ``.bashrc``
or ``.zshrc``.

For Windows, use the following setup:

- Download the latest `miniconda 3 installer <https://docs.conda.io/en/latest/miniconda.html>`_ for Windows

- Click on ``.exe`` file and complete the installation.

- Add the folder ``condabin`` folder to your environment variable ``PATH``. You can find the ``condabin`` folder usually under: ``C:\Users\username\AppData\Local\Continuum\miniconda3\condabin``

- Finally, you can set up the conda environment via:

.. code-block:: console
conda env create -f conda_environment.yml
source activate veranda
After that you should be able to run

.. code-block:: console
python setup.py test
to run the test suite.
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
gdal<=3.0.0
numpy
cftime<1.1
pandas
pyproj
netCDF4
xarray
toolz
dask
Loading

0 comments on commit 477292d

Please sign in to comment.