Python package to manage units for physical quantities
Project description
======
Barril
======
.. image:: https://img.shields.io/pypi/v/barril.svg
:target: https://pypi-hypernode.com/pypi/barril
.. image:: https://img.shields.io/pypi/pyversions/barril.svg
:target: https://pypi-hypernode.com/project/barril
.. image:: https://img.shields.io/travis/ESSS/barril.svg
:target: https://travis-ci.org/ESSS/barril
.. image:: https://ci.appveyor.com/api/projects/status/2y9spccc6pk9gh96/branch/master?svg=true
:target: https://ci.appveyor.com/project/ESSS/barril/?branch=master&svg=true
.. image:: https://codecov.io/gh/ESSS/barril/branch/master/graph/badge.svg
:target: https://codecov.io/gh/ESSS/barril
.. image:: https://img.shields.io/readthedocs/pip.svg
:target: https://barril.readthedocs.io/en/latest/
What is Barril?
===============
Python package to manage units for physical quantities.
Quick example:
.. code-block:: python
from barril.units import Scalar
s1 = Scalar(10, 'm')
s2 = Scalar(500, 'cm')
assert s1 + s2 == Scalar(15, 'm')
Features
--------
* Pre-defined unit database containing several physical quantities for the Oil & Gas industry.
* Data types with an associated unit: ``Scalar``, ``Array``, ``Quantity``, ``FixedArray``.
* Automatic conversion during arithmetic operations.
Development
-----------
For complete description of what type of contributions are possible,
see the full `CONTRIBUTING <CONTRIBUTING.rst>`_ guide.
Here is a quick summary of the steps necessary to setup your environment to contribute to ``barril``.
#. Create a virtual environment and activate it::
$ python -m virtualenv .env
$ .env\Scripts\activate # windows
$ source .env/bin/activate # linux
.. note::
If you use ``conda``, you can install ``virtualenv`` in the root environment::
$ conda install -n root virtualenv
Don't worry as this is safe to do.
#. Update ``pip``::
$ python -m pip install -U pip
#. Install development dependencies::
$ pip install -e .[testing]
#. Install pre-commit::
$ pre-commit install
#. Run tests::
$ pytest --pyargs barril
#. Generate docs locally::
$ tox -e docs
The documentation files will be generated in ``docs/_build``.
Credits
-------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _`GitHub page` : https://github.com/ESSS/barril
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _pytest: https://github.com/pytest-dev/pytest
.. _tox: https://github.com/tox-dev/tox
=========
CHANGELOG
=========
Unreleased
--------------------
1.2.0 (2018-09-26)
--------------------
* Add units for defining Spring-Dashpot movements.
1.1.0 (2018-09-24)
--------------------
* Add ``number`` and ``fraction`` properties to ``FractionValue``.
* Add ``unit`` read-only property to ``Quantity``.
1.0.0 (2018-09-21)
--------------------
* First feature release.
0.1.0 (2018-09-03)
------------------
* First release on PyPI.
Barril
======
.. image:: https://img.shields.io/pypi/v/barril.svg
:target: https://pypi-hypernode.com/pypi/barril
.. image:: https://img.shields.io/pypi/pyversions/barril.svg
:target: https://pypi-hypernode.com/project/barril
.. image:: https://img.shields.io/travis/ESSS/barril.svg
:target: https://travis-ci.org/ESSS/barril
.. image:: https://ci.appveyor.com/api/projects/status/2y9spccc6pk9gh96/branch/master?svg=true
:target: https://ci.appveyor.com/project/ESSS/barril/?branch=master&svg=true
.. image:: https://codecov.io/gh/ESSS/barril/branch/master/graph/badge.svg
:target: https://codecov.io/gh/ESSS/barril
.. image:: https://img.shields.io/readthedocs/pip.svg
:target: https://barril.readthedocs.io/en/latest/
What is Barril?
===============
Python package to manage units for physical quantities.
Quick example:
.. code-block:: python
from barril.units import Scalar
s1 = Scalar(10, 'm')
s2 = Scalar(500, 'cm')
assert s1 + s2 == Scalar(15, 'm')
Features
--------
* Pre-defined unit database containing several physical quantities for the Oil & Gas industry.
* Data types with an associated unit: ``Scalar``, ``Array``, ``Quantity``, ``FixedArray``.
* Automatic conversion during arithmetic operations.
Development
-----------
For complete description of what type of contributions are possible,
see the full `CONTRIBUTING <CONTRIBUTING.rst>`_ guide.
Here is a quick summary of the steps necessary to setup your environment to contribute to ``barril``.
#. Create a virtual environment and activate it::
$ python -m virtualenv .env
$ .env\Scripts\activate # windows
$ source .env/bin/activate # linux
.. note::
If you use ``conda``, you can install ``virtualenv`` in the root environment::
$ conda install -n root virtualenv
Don't worry as this is safe to do.
#. Update ``pip``::
$ python -m pip install -U pip
#. Install development dependencies::
$ pip install -e .[testing]
#. Install pre-commit::
$ pre-commit install
#. Run tests::
$ pytest --pyargs barril
#. Generate docs locally::
$ tox -e docs
The documentation files will be generated in ``docs/_build``.
Credits
-------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _`GitHub page` : https://github.com/ESSS/barril
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _pytest: https://github.com/pytest-dev/pytest
.. _tox: https://github.com/tox-dev/tox
=========
CHANGELOG
=========
Unreleased
--------------------
1.2.0 (2018-09-26)
--------------------
* Add units for defining Spring-Dashpot movements.
1.1.0 (2018-09-24)
--------------------
* Add ``number`` and ``fraction`` properties to ``FractionValue``.
* Add ``unit`` read-only property to ``Quantity``.
1.0.0 (2018-09-21)
--------------------
* First feature release.
0.1.0 (2018-09-03)
------------------
* First release on PyPI.
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
barril-1.2.0.tar.gz
(166.1 kB
view hashes)
Built Distribution
barril-1.2.0-py2.py3-none-any.whl
(150.8 kB
view hashes)
Close
Hashes for barril-1.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6971735174fad43365a443632fc26f83af1ecd661f6dea7e1fd0e485001b86fe |
|
MD5 | 0b3a1ea2773f93acd83c98956cee1aaf |
|
BLAKE2b-256 | 586c2427d6b14581d160c48ceaf187bf2aa03002f290a86c61e3a5ec8deb0666 |