Metadata-Version: 2.1
Name: pywoudc
Version: 0.3.0
Summary: High level package providing Pythonic access to WMO WOUDC data services
Home-page: https://github.com/woudc/pywoudc
Author: Tom Kralidis
Author-email: tomkralidis@gmail.com
Maintainer: Tom Kralidis
Maintainer-email: tomkraldis@gmail.com
License: MIT
Keywords: woudc ozone uv ultra-violet atmosphere atmospheric composition WMO
Platform: all
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Classifier: Topic :: Scientific/Engineering :: GIS
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click
Requires-Dist: OWSLib
Requires-Dist: prettytable

[![Build Status](https://github.com/woudc/pywoudc/workflows/build%20%E2%9A%99%EF%B8%8F/badge.svg)](https://github.com/woudc/pywoudc/actions)
[![Downloads this month on PyPI](https://img.shields.io/pypi/dm/pywoudc.svg)](http://pypi.python.org/pypi/pywoudc)
[![Latest release](https://img.shields.io/pypi/v/pywoudc.svg)](http://pypi.python.org/pypi/pywoudc)

# pywoudc

High level package providing Pythonic access to [WOUDC](https://woudc.org/en/data/data-access)
data services.

## Overview

The World Ozone and Ultraviolet Radiation Data Centre (WOUDC) is one of six
World Data Centres which are part of the
[Global Atmosphere Watch](http://www.wmo.int/gaw) programme of the World
Meteorological Organization.

The WOUDC archive is made available via
[OGC APIs](https://api.woudc.org).  These APIs are publically
available and can be used with any environment and / or software supporting
the OGC API standards.  pywoudc provides a high level library using Python idioms
(API, data structures) which provides Python implementations a simple,
straightforward bridge without requiring intimate knowledge of the OGC
standards.

## Installation

### Requirements
- [Python](https://www.python.org) 3 and above
- [virtualenv](https://virtualenv.pypa.io)

### Dependencies
Dependencies are listed in [requirements.txt](requirements.txt). Dependencies
are automatically installed during pywoudc installation.

### Installing pywoudc

```bash
# setup virtualenv
python3 -m venv --system-site-packages pywoudc
cd pywoudc
source bin/activate

# clone codebase and install
git clone https://github.com/woudc/pywoudc.git
cd pywoudc
pip3 install .
```

## Running

From the command line:

```bash
pywoudc --version

# get all stations
pywoudc stations

# get station report
pywoudc station <woudc_id>

# get instruments
pywoudc instruments

# get instrument report
pywoudc instrument <instrument_id>
```

## Using the API

```python
from pywoudc import WoudcClient
client = WoudcClient()

# get a GeoJSON dict of all contributors
client.get_metadata('contributors')

# get a GeoJSON dict of all stations
client.get_metadata('stations')

# get a GeoJSON dict of all instruments
client.get_metadata('instruments')
```

## Development

```bash
virtualenv pywoudc
cd pywoudc
source bin/activate
git clone https://github.com/woudc/pywoudc.git
cd pywoudc
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
```

### Running tests

```bash
# via setuptools
python3 setup.py test
# manually
python3 tests/run_tests.py
```

### Releasing

```bash
# create release (x.y.z is the release version)
vi pywoudc/__init__.py  # update __version__
vi debian/changelog  # add changelog entry
git commit -am 'update release version x.y.z'
git push origin master
git tag -a x.y.z -m 'tagging release version x.y.z'
git push --tags

# upload to PyPI
rm -fr build dist *.egg-info
python3 setup.py sdist bdist_wheel --universal
twine upload dist/*

# publish release on GitHub (https://github.com/woudc/pywoudc/releases/new)

# bump version back to dev
vi pywoudc/__init__.py  # update __version__
git commit -am 'back to dev'
git push origin master
```

### Code Conventions

pywoudc code conventions are as per
[PEP8](https://www.python.org/dev/peps/pep-0008)

## Issues

Issues are managed at https://github.com/woudc/pywoudc/issues
