← Back to team overview

oship-dev team mailing list archive

[Bug 611387] Re: some issues in class DvProportion

 

** Project changed: oship => oshippy

** Changed in: oshippy
    Milestone: 1.5 => None

-- 
You received this bug notification because you are a member of OSHIP
Development Team, which is subscribed to Open Source Health Information
Platform.
https://bugs.launchpad.net/bugs/611387

Title:
  some issues in class DvProportion

Status in Open Source Health Information Platform - Python:
  New

Bug description:
  It seems that it is not necessary to test for the types of arguments in the initializer. On the other hand, the invarians below are not enforced. In implementing these invariants, the values in ProportionKind should be used:
  Type_validity: valid_proportion_kind(type)
  Precision_validity: precision = 0 implies is_integral
  Is_integral_validity: is_integral implies (numerator.floor = numerator and denominator.floor = denominator)
  Fraction_validity: (type = pk_fraction or type = pk_integer_fraction) implies is_integral
  Unitary_validity: type = pk_unitary implies denominator = 1
  Percent_validity: type = pk_percent implies denominator = 100

  The initializer lacks the magnitudeStatus argument and so does the
  superclass initializer. Magnitude is not an attribute in this class,
  it is a method. It seems that it would be better to implement
  attribute as a method in DvQuantified.

  The methods compare ("<")  and isStrictlyComparableTo are not
  implemented.

  The methods add, subtract and negate in DvAmount are not implemented.

  It would be interesting to define a representation value for this
  class, wouldn't it?





References