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

Linter Cleanup #535

Closed teubert closed 1 year ago

teubert commented 1 year ago

Some cleanup using results form linter.

Cleanup is to ensure compliance with Python Style Guide. Small things like:

Shouldn't change function of code, just make it more readable.

github-actions[bot] commented 1 year ago

Thank you for opening this PR. Each PR into dev requires a code review. For the code review, look at the following:

teubert commented 1 year ago

Skipping review requirements since changes are all in comments/spacing

github-actions[bot] commented 1 year ago
Benchmarking Results From: Test Time (s)
import main 0.172153
import thrown object 0.6650827000000001
model initialization 0.15250740000000018
set noise 0.8525228999999999
simulate 0.3878992000000001
simulate with saving 1.1887435999999996
simulate with saving, dt 1.3654335
simulate with printing results, dt 1.6082618999999996
Plot results 20.0868739
Metrics 0.046499900000000594
Surrogate Model Generation 4.129583399999998
surrogate sim 1.4266841999999968
surrogate sim, dt 4.086670099999999
To: Test Time (s)
import main 0.1818506000000002
import thrown object 0.6588070000000001
model initialization 0.1488075000000002
set noise 0.8504927000000002
simulate 0.39209840000000007
simulate with saving 1.2016787
simulate with saving, dt 1.3605672000000002
simulate with printing results, dt 1.5825062999999995
Plot results 20.2719722
Metrics 0.047222099999999045
Surrogate Model Generation 4.363923200000002
surrogate sim 1.364617299999999
surrogate sim, dt 3.7713936000000032
codecov-commenter commented 1 year ago

Codecov Report

Merging #535 (98210a0) into dev (2dd4ff8) will decrease coverage by 2.36%. The diff coverage is 93.10%.

@@            Coverage Diff             @@
##              dev     #535      +/-   ##
==========================================
- Coverage   82.34%   79.99%   -2.36%     
==========================================
  Files          54       30      -24     
  Lines        6564     2409    -4155     
==========================================
- Hits         5405     1927    -3478     
+ Misses       1159      482     -677     
Impacted Files Coverage Δ
prog_model_template.py 71.42% <ø> (ø)
src/prog_models/models/dcmotor.py 98.14% <ø> (ø)
src/prog_models/models/dcmotor_singlephase.py 47.05% <ø> (ø)
src/prog_models/models/esc.py 95.65% <ø> (ø)
src/prog_models/models/pneumatic_valve.py 92.12% <ø> (ø)
src/prog_models/models/powertrain.py 96.87% <ø> (ø)
src/prog_models/utils/containers.py 86.07% <ø> (ø)
src/prog_models/utils/size.py 100.00% <ø> (ø)
src/prog_models/utils/calc_error.py 23.41% <50.00%> (ø)
src/prog_models/prognostics_model.py 82.15% <85.71%> (ø)
... and 9 more

... and 24 files with indirect coverage changes