nasa / prog_models

The NASA Prognostic Model Package is a Python framework focused on defining and building models for prognostics (computation of remaining useful life) of engineering systems, and provides a set of prognostics models for select components developed within this framework, suitable for use in prognostics applications for these components.
123 stars 50 forks source link

Bug/fix import mock patch #548

Closed kjjarvis closed 1 year ago

kjjarvis commented 1 year ago

This PR addresses a bug in using the 'mock' attribute of unittest by explicitly importing mock in each test that uses this

github-actions[bot] commented 1 year ago
Benchmarking Results From: Test Time (s)
import main 0.15395879999999984
import thrown object 0.5765688
model initialization 0.1903750999999998
set noise 1.3731103999999998
simulate 0.4358586
simulate with saving 1.3562927999999999
simulate with saving, dt 1.5135249000000002
simulate with printing results, dt 1.9313893000000002
Plot results 22.357836400000004
Metrics 0.043075099999995814
Surrogate Model Generation 4.677731899999998
surrogate sim 1.7780711999999994
surrogate sim, dt 3.8875934
To: Test Time (s)
import main 0.18311920000000015
import thrown object 0.6195328999999998
model initialization 0.16205330000000018
set noise 0.8104785999999997
simulate 0.436963
simulate with saving 1.2819909000000003
simulate with saving, dt 1.3773982
simulate with printing results, dt 1.781249299999999
Plot results 22.436731799999997
Metrics 0.04160460000000299
Surrogate Model Generation 2.427390899999999
surrogate sim 1.7250812999999994
surrogate sim, dt 4.151942699999999