Skip to main content

pywis-topics is a utility to work with the WIS2 Topic Hierarchy

Project description

flake8 main

pywis-topics

Overview

pywis-topics is a utility to work with the WIS2 Topic Hierarchy

Installation

The easiest way to install pywis-topics is via the Python pip utility:

pip3 install pywis-topics

Requirements

Dependencies

Dependencies are listed in requirements.txt. Dependencies are automatically installed during pywis-topics installation.

Installing pywis-topics

# setup virtualenv
python3 -m venv --system-site-packages pywis-topics
cd pywis-topics
source bin/activate

# clone codebase and install
git clone https://github.com/wmo-im/pywis-topics.git
cd pywis-topics
python3 setup.py install

Running

First check pywis-topics was correctly installed

pywis-topics --version

Listing and valiation

# validate a WIS2 topic hierarchy
pywis-topics validate origin/a/wis2/ca-eccc-msc

# list children of a given WIS2 topic hierarchy level
pywis-topics list wis2/a

Using the API

Python examples:

# subscriber example
from pywis_topics.topics import TopicHierarchy

th = TopicHierarchy()

th.validate('origin/a/wis2/ca-eccc-msc/data/core')
th.list_children('origin/a/wis2')

Development

Running Tests

# install dev requirements
pip3 install -r requirements-dev.txt

# run tests like this:
python3 tests/run_tests.py

# or this:
python3 setup.py test

Releasing

# create release (x.y.z is the release version)
vi pywis_topics/__init__.py  # update __version__
git commit -am 'update release version x.y.z'
git push origin main
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/pywis-topics/releases/new)

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

Code Conventions

Bugs and Issues

All bugs, enhancements and issues are managed on GitHub.

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

pywis-topics-0.2.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

pywis_topics-0.2.0-py2.py3-none-any.whl (14.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pywis-topics-0.2.0.tar.gz.

File metadata

  • Download URL: pywis-topics-0.2.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.4

File hashes

Hashes for pywis-topics-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6ee77a580648e0e0496e415b106ff7e10ead020f52e1fca88ed41f7f424a068e
MD5 ff8b4ea345cc32c3170fffee23681fb9
BLAKE2b-256 3f87f7dd605ecd40925a9dc1af6cf32416b852eb614df28eaf2ca93f2c2b4f04

See more details on using hashes here.

File details

Details for the file pywis_topics-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pywis_topics-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 571e39d6e4f697980581652f2bdeed1e5a619c7f72e7d004dfae71cb6995c54a
MD5 022f14c0f65f8639c52dca23de4d075f
BLAKE2b-256 c8ab7ee3d2f737f90944e33cb6758521b45e870251d2490e7402ef18e8502f07

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