Skip to main content

WMO WIS Catalogue analysis tool

Project description

pywiscat

Build Status

Pythonic API to WMO WIS Catalogue

pywiscat provides a Pythonic API atop the WMO WIS2 Catalogue in support of reporting and analysis of the WIS2 Catalogue and its associated discovery metadata.

Installation

pip

Install latest stable version from PyPI.

pip3 install pywiscat

From source

Install latest development version.

python3 -m venv pywiscat
cd pywiscat
. bin/activate
git clone https://github.com/wmo-im/pywiscat.git
cd pywiscat
pip3 install -r requirements.txt
python3 setup.py build
python3 setup.py install

Running

The canonical URL for the GDC is https://wis2-gdc.weather.gc.ca.

To use a different catalogue, set the PYWISCAT_GDC_URL environmnent variable before running pywiscat.

From command line:

# fetch version
pywiscat --version

## WIS2 workflows

# search the WIS2 Global Discovery Catalogue (GDC)
pywiscat search

# search the WIS2 Global Discovery Catalogue (GDC) with a full text query
pywiscat search --query radar

# search the WIS2 Global Discovery Catalogue (GDC) for only recommended data
pywiscat search --data-policy recommended

# search the WIS2 Global Discovery Catalogue (GDC) with a bounding box query
pywiscat search --bbox -142,42,-52,84

# get more information about a WIS2 GDC record
pywiscat get urn:x-wmo:md:can:eccc-msc:c7c9d726-c48a-49e3-98ab-78a1ab87cda8

Using the API

## WIS2 workflows

from pywiscat.wis2.catalogue import search, get

# search catalogue
results = search(q='radar', bbox=[-142, 42, -52, 84]))

# get a single catalogue record
results = get('urn:x-wmo:md:can:eccc-msc:c7c9d726-c48a-49e3-98ab-78a1ab87cda8')

Development

python3 -m venv pywiscat
cd pywiscat
source bin/activate
git clone https://github.com/wmo-im/pywiscat.git
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
python3 setup.py install

Running tests

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

Releasing

# create release (x.y.z is the release version)
vi pywiscat/__init__.py  # update __version__
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/wmo-im/pywiscat/releases/new)

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

Code Conventions

PEP8

Issues

Issues are managed at https://github.com/wmo-im/pywiscat/issues

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywiscat-0.2.2.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

pywiscat-0.2.2-py2.py3-none-any.whl (10.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pywiscat-0.2.2.tar.gz.

File metadata

  • Download URL: pywiscat-0.2.2.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/1.1.3 pkginfo/1.9.6 requests/2.28.2 requests-toolbelt/0.8.0 tqdm/4.64.1 CPython/3.7.12

File hashes

Hashes for pywiscat-0.2.2.tar.gz
Algorithm Hash digest
SHA256 542315e552796a689922d922f0c1ddd7e80718fd219cf8458870378f91ac171d
MD5 daf053071e8a6defe398aca19dc976f4
BLAKE2b-256 fc5d4f17af6afd9333efe801c1977525f06b555f2b7b0e2b40e1851580e22439

See more details on using hashes here.

File details

Details for the file pywiscat-0.2.2-py2.py3-none-any.whl.

File metadata

  • Download URL: pywiscat-0.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/1.1.3 pkginfo/1.9.6 requests/2.28.2 requests-toolbelt/0.8.0 tqdm/4.64.1 CPython/3.7.12

File hashes

Hashes for pywiscat-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3cad1b7910c3f0756dad369e62fe7ea3f5e69889eb479dfef17002ff204c5558
MD5 9e9a8608e368add4a8adcf7dce2175af
BLAKE2b-256 0ba6a7ef294bc8853e9fa0bc783c587eed3dad944e91ea56618f4977f58a1a9d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page