Openquake Gem Taxonomy - Package to manage GEM Building Taxonomy strings
Project description
Python OpenQuake Gem Taxonomy
python package with GEM Building Taxonomy related class and shell commands.
Python Code
This package provide one class: GemTaxonomy
with public methods:
validate(tax_string): validate a taxonomy string and return it in a couple of useful structures
explain(tax_string, format): explain (or translate) to different formats a taxonomy string
Below a small usage example:
from openquake.gem_taxonomy import GemTaxonomy
gt = GemTaxonomy()
def validate_gem_taxonomy(value):
try:
gt.validate(value)
except ValueError as e:
print(f"Error: {e}")
return f'{value}: {e}'
def extract_attributes(value):
# Function to extract attributes
attr_dict = gt.split_by_attributes(value, '|', 0, 'others')
return attr_dict
scripts.py is another good entry-point to understand how to use GemTaxonomy class.
Console Commands
The package includes several command line tools using the python class to perform different tasks.
gem-taxonomy-validate: validate taxonomy string passed as parameter
gem-taxonomy-csv-validate: validate taxonomy strings from a csv file (or a list of them) with a lot options to replace values if needed, it is used extensively for CI pipelines
gem-taxonomy-explain: explain (or convert) taxonomy strings to different formats
gem-taxonomy-info: retrieves information about the taxonomy package and related packages
gem-taxonomy-specs2graph: create a .dot file that explains relations between atoms groups and attributes.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openquake_gem_taxonomy-1.11.3.tar.gz.
File metadata
- Download URL: openquake_gem_taxonomy-1.11.3.tar.gz
- Upload date:
- Size: 36.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c42782e0b93c0ffb1072c52957b8baad7c090dab6d5d51bd675b9b9421abfd9
|
|
| MD5 |
79b70298965ca83850a48c5f8af15fc3
|
|
| BLAKE2b-256 |
bcd1cdcabc6d6b64bf1fac42d1465bd9dd7219ab3c031aa9d34a652de7064bcd
|
Provenance
The following attestation bundles were made for openquake_gem_taxonomy-1.11.3.tar.gz:
Publisher:
release-to-pypi.yaml on gem/oq-gem-taxonomy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openquake_gem_taxonomy-1.11.3.tar.gz -
Subject digest:
6c42782e0b93c0ffb1072c52957b8baad7c090dab6d5d51bd675b9b9421abfd9 - Sigstore transparency entry: 777226076
- Sigstore integration time:
-
Permalink:
gem/oq-gem-taxonomy@702712dd03c267806eac17288bfd136f74b8bbcc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-to-pypi.yaml@702712dd03c267806eac17288bfd136f74b8bbcc -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file openquake_gem_taxonomy-1.11.3-py3-none-any.whl.
File metadata
- Download URL: openquake_gem_taxonomy-1.11.3-py3-none-any.whl
- Upload date:
- Size: 37.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd250490ef53499c8be232e71ec3124ff9e0ca3f0861cb6f50286293fed260e7
|
|
| MD5 |
68c634066817ff138305821b9e3790fb
|
|
| BLAKE2b-256 |
e80e9eb809bfa9d21f9f32e5f861edd4429ee67e4efa53dec6e097a7e69b66a3
|
Provenance
The following attestation bundles were made for openquake_gem_taxonomy-1.11.3-py3-none-any.whl:
Publisher:
release-to-pypi.yaml on gem/oq-gem-taxonomy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openquake_gem_taxonomy-1.11.3-py3-none-any.whl -
Subject digest:
fd250490ef53499c8be232e71ec3124ff9e0ca3f0861cb6f50286293fed260e7 - Sigstore transparency entry: 777226103
- Sigstore integration time:
-
Permalink:
gem/oq-gem-taxonomy@702712dd03c267806eac17288bfd136f74b8bbcc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-to-pypi.yaml@702712dd03c267806eac17288bfd136f74b8bbcc -
Trigger Event:
workflow_dispatch
-
Statement type: