Whyis-unit-converter
Installation
-
install whyis using this command
WHYIS_BRANCH=master bash < <(curl -skL https://raw.githubusercontent.com/tetherless-world/whyis/master/install.sh) -
whyis will be installed in /apps/whyis
-
In your knowledge graph directory, add the unit converter agent to the list of inferencers in your config.py file:
- Add the following import line:
import whyis_unit_converter.unit_converter_agent as converter - Add the following line to the
inferencersitem in theConfigdictionary constructor:"UnitConverter": converter.UnitConverter()
- Add the following import line:
-
Reload your knowledge graph to run the inferencer over it
Loading unit definition and translation files
-
To load your own unit definition and translation files, run
importconverterdict FILES -
Your translation files can be in one of the following forms:
- URI to unit mapping file. Used to map measurement types to their preferred units, if http://nanomine.org/ns/hasPreferredUnit is not used in your knowledge graph.
#mapping_file http://nanomine.org/ns/CharpyImpactEnergy=http://www.ontology-of-units-of-measure.org/resource/om-2/joulePerSquareMetre http://nanomine.org/ns/CrystalizationTemperature=http://www.ontology-of-units-of-measure.org/resource/om-2/kelvin- Translation file. Used to translate URIs into understandable units. Translations to understandable units are written as below. See defining pint units for more specific information about formatting.
#translation_file http://www.ontology-of-units-of-measure.org/resource/om-2/degreeFahrenheit=5 / 9 * kelvin; offset: 233.15 + 200 / 9 http://www.ontology-of-units-of-measure.org/resource/om-2/amperePerSquareMetre=ampere / meter ** 2 http://nanomine.org/ns/unit/kpa=kilopascal
Testing
- To test the unit converter, run
unitconvertertestfrom a pip enabled endpoint.
Metadata
Release files for whyis-unit-converter 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| whyis-unit-converter-0.0.2.tar.gz | 9.7 kB | Without provenance | Details for whyis-unit-converter-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| whyis_unit_converter-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for whyis_unit_converter-0.0.2-py3-none-any.whl |
Total release size: 27.1 kB
Release files / whyis-unit-converter-0.0.2.tar.gz
| Download URL | whyis-unit-converter-0.0.2.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7114bd143943240f5c85a00d662d55e246a7b2e6a4dce7d52568226dc34f3f59
|
|
BLAKE2b-256 checksum How to use checksums |
c3f809a009651827f964d4a3e704cfdf12dbe4c99846a88485ee7ad853a8ec21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.3 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0
|
Release files / whyis_unit_converter-0.0.2-py3-none-any.whl
| Download URL | whyis_unit_converter-0.0.2-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be75ce40c5ca14b1409a13a626a2f926995fdbdf258e25bdbe45d73f4a2f13a0
|
|
BLAKE2b-256 checksum How to use checksums |
aac62b8f089009dc7422dbdd7de3b318ebe6604bdabdbb19170787bdc3fa488d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.3 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0
|
Security for whyis-unit-converter 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.