INCF / nineml-python

A Python library for reading, parsing, validating and writing the 9ML (http://nineml.net) object model
Other
6 stars 10 forks source link

Dimensions validation in AL #7

Closed tclose closed 9 years ago

tclose commented 9 years ago

This PR adds support for dimensionality checking of abstraction layer expressions (i.e. whether dimensions of derived quantities match declared quantities).

It also adds overrides of *, / and ** operators for Unit and Dimension so that compound units/dimensions can be derived from common ones e.g.

from nineml import units as un
p = Parameter('a_parameter', un.voltage / un.time)

NB: the location of the units module has been moved from nineml.abstraction_layer.units to nineml.units to match the location in the spec and this PR should be merged after #6

coveralls commented 9 years ago

Coverage Status

Changes Unknown when pulling ed58133f47fa4a8615f92802176c8065ddd0c457 on tclose:dimension_checking into \ on INCF:master**.

coveralls commented 9 years ago

Coverage Status

Changes Unknown when pulling 24550bf2094d75cd074df620a121de93898c754c on tclose:dimension_checking into \ on INCF:master**.

apdavison commented 9 years ago

"We can't automatically merge this pull request" - I guess there are some conflicts since I merged #6 ?

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.2%) to 78.13% when pulling 815d6bd7c79bb4f56fe3a5516ec5d8bf51ae35af on tclose:dimension_checking into 1f57e4c5c3cd095a5e864f93b22baa5f93846bd4 on INCF:master.

tclose commented 9 years ago

Should be good to go now

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.2%) to 78.13% when pulling bc68a8fb3c34060c26b90ed4f4d0869863b6e7f9 on tclose:dimension_checking into 1f57e4c5c3cd095a5e864f93b22baa5f93846bd4 on INCF:master.