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 of the WMO WIS Catalogue in support of reporting and analysis of WIS Catalogue 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

From command line:

# fetch version
pywiscat --version

## WIS 1.0 workflows

# catalogue management

# download bundle of WIS metadata to disk
pywiscat wis1 catalogue cache --directory /path/to/metadata/files

# search for terms (case-insensitive) and group by organization

# search for 'nwp'
pywiscat wis1 report terms-by-org --directory=/path/to/metadata/files --term nwp

# search for 'nwp' and 'model' (exclusive)
pywiscat wis1 report terms-by-org --directory=/path/to/metadata/files --term nwp --term model

# search for 'nwp' in verbose mode (Python logging levels)
pywiscat wis1 report terms-by-org --directory=/path/to/metadata/files --term nwp --verbosity DEBUG

Using the API

## WIS 1.0 workflows

from pywiscat.wis1.catalogue import cache_catalogue
from pywiscat.wis1.report import group_search_results_by_organization

# catalogue management
status = cache_catalogue('/path/to/directory')

# search for terms (case-insensitive) and group by organization
results_dict = group_search_results_by_organization('path/to/directory', terms=['nwp', 'model'])

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

python3 setup.py sdist bdist_wheel --universal
twine upload dist/*

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.1.dev0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distributions

pywiscat-0.1.dev0-py3.7.egg (13.5 kB view details)

Uploaded Source

pywiscat-0.1.dev0-py2.py3-none-any.whl (9.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pywiscat-0.1.dev0.tar.gz.

File metadata

  • Download URL: pywiscat-0.1.dev0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.6

File hashes

Hashes for pywiscat-0.1.dev0.tar.gz
Algorithm Hash digest
SHA256 c14f60b51ae19991ad3621875ad307553e00b08f011dc28fbf2de13dd298ecbd
MD5 fa5719764887969fc2a0bb8837188d52
BLAKE2b-256 fdb6e28741268b3e5724b16fe3b64f5fa68a7385856f5267511b117ce8d65931

See more details on using hashes here.

File details

Details for the file pywiscat-0.1.dev0-py3.7.egg.

File metadata

  • Download URL: pywiscat-0.1.dev0-py3.7.egg
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.6

File hashes

Hashes for pywiscat-0.1.dev0-py3.7.egg
Algorithm Hash digest
SHA256 a8c2cd4212f4930f7346bbfe7f92663f605625756633a5d0547d1a7bfb78010c
MD5 da42b1775057999e6ed7f35216d8474c
BLAKE2b-256 500d13e393d497838bee13d1c43b520b55a96bf4bc8a96fe31f7c1682624f3be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywiscat-0.1.dev0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.6

File hashes

Hashes for pywiscat-0.1.dev0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3f3aad72199cd26cb09e090f1c7050479544aa16e1af3d7dbf48a4169666cdc7
MD5 5964b00e326fe640fb9262b2012f935f
BLAKE2b-256 9e118f0263ac66058ff9e1190eea3851f9a57818d0a650715129394ddf11bb62

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