Skip to content
forked from wmo-im/pywiscat

pywiscat provides a Pythonic API atop the WMO WIS Catalogue in support of reporting and analysis of the WIS Catalogue and Metadata.

License

Notifications You must be signed in to change notification settings

josusky/pywiscat

 
 

Repository files navigation

pywiscat

Build Status

Pythonic API to WMO WIS Catalogue

pywiscat provides a Pythonic API atop the WMO WIS Catalogue in support of reporting and analysis of the WIS Catalogue and 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

About

pywiscat provides a Pythonic API atop the WMO WIS Catalogue in support of reporting and analysis of the WIS Catalogue and Metadata.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%