世界气象组织WIS目录分析工具
项目描述
pywiscat
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
代码约定
问题
问题在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 查看哈希值)
关闭
pywiscat-0.2.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | ca819e90c929ca8a71a9e580e4f8edad81672372f9828491e8a600dd21ac8451 |
|
MD5 | aab9e19ecdae5c5648905706ab6c2469 |
|
BLAKE2b-256 | bd266c50411d2bab511cce59a2d5ec0e59e7380320bb97ce27bd030298dba5be |
关闭
pywiscat-0.2.0-py2.py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | df2ac03859ce926fc5f0e553a90047fb442ada33bcc9aafd54db168bdc2ef374 |
|
MD5 | 8e45918b201a92832c10e923bdbc59ee |
|
BLAKE2b-256 | 4be3a14f159f33eaa21fa2df6602b63483cad07a5819e3d7a68ceb3875925661 |