diff --git a/README.rst b/README.rst index 949ef09..0ecb1a9 100644 --- a/README.rst +++ b/README.rst @@ -28,9 +28,7 @@ Come without numpy, pint (units), matplotlib or other "big" library support. As pint is not supported, the SI units are used. -# Sources : - -MetPy : https://unidata.github.io/MetPy/latest/index.html +Original project : `MetPy `_ Dependencies ============= @@ -46,8 +44,14 @@ This is easily achieved by downloading Usage Example ============= -.. todo:: Add a quick, simple example. It and other examples should live in the -examples folder and be included in docs/examples.rst. +.. code-block:: python3 + + import umetpy.constants + + print("List of all constants:\n") + for cst in dir(umetpy.constants): + if cst[0] != "_": + print("{:25s} = {:f}".format(cst, eval("{}.{}".format("umetpy.constants", cst)))) Contributing ============ diff --git a/examples/umetpy_simpletest.py b/examples/umetpy_simpletest.py index 6d8b750..6d08e55 100644 --- a/examples/umetpy_simpletest.py +++ b/examples/umetpy_simpletest.py @@ -1,4 +1,14 @@ # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries # SPDX-FileCopyrightText: Copyright (c) 2021 Arofarn # -# SPDX-License-Identifier: Unlicense +# SPDX-License-Identifier: BSD-3-Clause + +import umetpy.constants + +# pylint: disable=eval-used +print("List of all constants:\n") +for cst in dir(umetpy.constants): + if cst[0] != "_": + print( + "{:25s} = {:f}".format(cst, eval("{}.{}".format("umetpy.constants", cst))) + )