Skip to main content

Generate CRIDs for RaBe

Project description

RaBe cridlib for Python

Generate RaBe CRIDs based on several data sources:

  • Songticker for current CRID
  • archiv.rabe.ch for past CRIDs
  • TBD: LibreTime for future CRIDs

Installation

poetry add rabe-cridlib

# or on old setup style projects
pip -m install rabe-cridlib

Usage

>>> import cridlib
>>>
>>> # parse an existing crid
>>> crid = cridlib.parse("crid://rabe.ch/v1/klangbecken#t=clock=19930301T131200.00Z")
>>> print(f"version: {crid.version}, show: {crid.show}, start: {crid.start}")
version: v1, show: klangbecken, start: 1993-03-01 13:12:00

>>> # get crid for current show
>>> crid = cridlib.get()
>>> print(f"version: {crid.version}, show: {crid.show}")  # doctest:+ELLIPSIS
version: v1, show: ...

Development

# setup a dev env
python -mvenv env
. env/bin/activate

# install a modern poetry version
python -mpip install poetry>=1.2.0

# install deps and dev version
poetry install

# make changes, run tests
pytest

Release Management

The CI/CD setup uses semantic commit messages following the conventional commits standard. There is a GitHub Action in .github/workflows/semantic-release.yaml that uses go-semantic-commit to create new releases.

The commit message should be structured as follows:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

The commit contains the following structural elements, to communicate intent to the consumers of your library:

  1. fix: a commit of the type fix patches gets released with a PATCH version bump
  2. feat: a commit of the type feat gets released as a MINOR version bump
  3. BREAKING CHANGE: a commit that has a footer BREAKING CHANGE: gets released as a MAJOR version bump
  4. types other than fix: and feat: are allowed and don't trigger a release

If a commit does not contain a conventional commit style message you can fix it during the squash and merge operation on the PR.

Once a commit has landed on the main branch a release will be created and automatically published to pypi using the GitHub Action in .github/workflows/release.yaml which uses poetry to publish the package to pypi.

License

This package is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.

Copyright

Copyright (c) 2022 Radio Bern RaBe

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

rabe_cridlib-0.1.7.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

rabe_cridlib-0.1.7-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file rabe_cridlib-0.1.7.tar.gz.

File metadata

  • Download URL: rabe_cridlib-0.1.7.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.15.0-1024-azure

File hashes

Hashes for rabe_cridlib-0.1.7.tar.gz
Algorithm Hash digest
SHA256 384d1e95bd1f9ead4f909ecb446d0d1f112548cc5cbe32607e6903da0659139f
MD5 60daa7e29835a15c6aff1ccc3978a073
BLAKE2b-256 d73f3f7d005be97b479d80077da72927f766a008441e7f0aa20bcb5307fa08e6

See more details on using hashes here.

File details

Details for the file rabe_cridlib-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: rabe_cridlib-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.15.0-1024-azure

File hashes

Hashes for rabe_cridlib-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 cdd0ce4b86b4b1c719663d30e91b8234a68224f9991ce3f30545c54739d98b21
MD5 8da05b1602368b874cd6e1eff906cf99
BLAKE2b-256 de23f13a1260bdf4f84c746e213387abd3184eac95eeede9cbd75c38d3bf86ae

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