跳转到主要内容

世界气象组织WIS目录分析工具

项目描述

pywiscat

Build Status

Pythonic API到WMO WIS目录

pywiscat为WMO WIS2目录及其关联的发现元数据提供了支持报告和分析的Pythonic API。

安装

pip

PyPI安装最新稳定版本。

pip3 install pywiscat

从源代码

安装最新开发版本。

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

运行

全球数据中心的规范URL为https://api.weather.gc.ca

要使用不同的目录,请在运行pywiscat之前设置PYWISCAT_GDC_URL环境变量。

从命令行

# 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

使用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')

开发

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

运行测试

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

发布

# 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

代码约定

PEP8

问题

问题在https://github.com/wmo-im/pywiscat/issues管理

联系方式

项目详细信息


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

pywiscat-0.2.0.tar.gz (8.4 kB 查看哈希值)

上传时间

构建分布

pywiscat-0.2.0-py2.py3-none-any.whl (10.2 kB 查看哈希值)

上传时间 Python 2 Python 3

由以下支持

AWSAWS云计算和安全赞助商DatadogDatadog监控FastlyFastlyCDNGoogleGoogle下载分析MicrosoftMicrosoftPSF赞助商PingdomPingdom监控SentrySentry错误日志StatusPageStatusPage状态页面