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- LibreTime for future CRIDs (currently only data for the next 7 days and only available internally at RaBe)
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 semantic-release.yaml
in radiorabe/actions
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:
- fix: a commit of the type
fix
patches gets released with a PATCH version bump - feat: a commit of the type
feat
gets released as a MINOR version bump - BREAKING CHANGE: a commit that has a footer
BREAKING CHANGE:
gets released as a MAJOR version bump - types other than
fix:
andfeat:
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rabe_cridlib-0.12.1.tar.gz
.
File metadata
- Download URL: rabe_cridlib-0.12.1.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bb94ffbac64c96c112632005a94028176c4ff753aac0c690c81dd0fa61f1845 |
|
MD5 | bc48c3db53728fd4413ef9744d3b9e35 |
|
BLAKE2b-256 | 363ea62eee0103f9f249166d0754ff7bfdc391a812a87ce435f12be3d8e98e95 |
File details
Details for the file rabe_cridlib-0.12.1-py3-none-any.whl
.
File metadata
- Download URL: rabe_cridlib-0.12.1-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d618fc1b4f5982a72e6546491a6b6ab73df102a4da509d2357c9fdb8eea94e5 |
|
MD5 | cb4c4c42c51a7c9fb31c1302111aca83 |
|
BLAKE2b-256 | ab58bdc12641aecbfc4344859176330616f30763041bdb51e42d23a468144ce0 |