kahaaga / UncertainData.jl

Working efficiently with datasets where observations have associated uncertainties.
https://kahaaga.github.io/UncertainData.jl/dev
MIT License
17 stars 5 forks source link

Tests sometimes fail? #143

Closed KristofferC closed 3 years ago

KristofferC commented 4 years ago

It seems the tests for this package sometimes fail with

Error During Test at /home/pkgeval/.julia/packages/UncertainData/mhQId/test/sampling_constraints/test_constrain_population.jl:228
  Test threw exception
  Expression: truncate(p, c_qs) isa T
  DomainError with Cannot create TruncateRange instance. Need min < max (got min = 2.0, max = 2.0):

  Stacktrace:
   [1] truncate(::UncertainScalarPopulation{AbstractUncertainValue,Weights{Float64,Float64,Array{Float64,1}}}, ::TruncateQuantiles{Float64,Float64}, ::Int64) at /home/pkgeval/.julia/packages/UncertainData/mhQId/src/sampling_constraints/constraint_definitions.jl:130
   [2] truncate(::UncertainScalarPopulation{AbstractUncertainValue,Weights{Float64,Float64,Array{Float64,1}}}, ::TruncateQuantiles{Float64,Float64}) at /home/pkgeval/.julia/packages/UncertainData/mhQId/src/sampling_constraints/truncation/truncate_population.jl:316
   [3] top-level scope at /home/pkgeval/.julia/packages/UncertainData/mhQId/test/sampling_constraints/test_constrain_population.jl:228
   [4] include at ./boot.jl:328 [inlined]
   [5] include_relative(::Module, ::String) at ./loading.jl:1105
   [6] include(::Module, ::String) at ./Base.jl:31
   [7] include(::String) at ./client.jl:424
   [8] top-level scope at /home/pkgeval/.julia/packages/UncertainData/mhQId/test/runtests.jl:145
   [9] include at ./boot.jl:328 [inlined]
   [10] include_relative(::Module, ::String) at ./loading.jl:1105
   [11] include(::Module, ::String) at ./Base.jl:31
   [12] include(::String) at ./client.jl:424
   [13] top-level scope at none:6
   [14] eval(::Module, ::Any) at ./boot.jl:330
   [15] exec_options(::Base.JLOptions) at ./client.jl:263
   [16] _start() at ./client.jl:460

ERROR: LoadError: LoadError: There was an error during testing
in expression starting at /home/pkgeval/.julia/packages/UncertainData/mhQId/test/sampling_constraints/test_constrain_population.jl:228
in expression starting at /home/pkgeval/.julia/packages/UncertainData/mhQId/test/runtests.jl:145

from https://github.com/maleadt/BasePkgEvalReports/blob/8e7a9e7d45897b8a4d0a8ee21757756e72b7eb81/pkgeval-8639e57_vs_46ce4d7/logs/UncertainData/1.3.1-pre-8639e5771d.log#L390-L415

It would be good to figure out (and fix) this since it adds a little bit of noise to the automatic tests we run for packages on different Julia versions.

kahaaga commented 3 years ago

Hopefully fixed in #167.