Skip to main content

Unit converter for Whyis

Project description

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.converter as converter
    • Add the following line to the inferencers item in the Config dictionary constructor: "UnitConverter": converter.UnitConverter()
  • 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:

    #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 unitconvertertest from a pip enabled endpoint.

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

whyis-unit-converter-0.0.1rc0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whyis_unit_converter-0.0.1rc0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file whyis-unit-converter-0.0.1rc0.tar.gz.

File metadata

  • Download URL: whyis-unit-converter-0.0.1rc0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

File hashes

Hashes for whyis-unit-converter-0.0.1rc0.tar.gz
Algorithm Hash digest
SHA256 b7df7c9e8d2fe0291a8be71407de4dce48c2a03f6a4d606cbf992b186c707c48
MD5 4b106184da2d8c21d2dca73603585e76
BLAKE2b-256 793250a16c97572110a3b1eab62b2e334d4632eef7e55c3c5fd7ba1a0a50db2e

See more details on using hashes here.

File details

Details for the file whyis_unit_converter-0.0.1rc0-py3-none-any.whl.

File metadata

  • Download URL: whyis_unit_converter-0.0.1rc0-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

File hashes

Hashes for whyis_unit_converter-0.0.1rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ff8b655a69ab11c69d28370d3ec06599decb481ef7df601c94b82a22b8f3a56
MD5 f6e4b21c1d5b636a205378ea34bab401
BLAKE2b-256 4ab61d9c493e3e1de2178ccd8923a2bb42b22af07248bfa0b029064d2a805921

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page