Skip to content

Conversation

@teubert
Copy link
Collaborator

@teubert teubert commented May 26, 2023

Some cleanup using results form linter.

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

  • functions should be in format def f(arg: type = default, arg: type, arg=default) -> type
  • Two spaces between code and comment (e.g., code # comment)
  • Removing unused imports
  • Dont use import *
  • Limiting line length
  • etc.

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

@github-actions
Copy link

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

  • Reviewer (someone other than author) should look for bugs, efficiency, readability, testing, and coverage in examples (if relevant).
  • Ensure that each PR adding a new feature should include a test verifying that feature.
  • All errors from static analysis must be resolved.
  • Review the test coverage reports (if there is a change) - will be added as comment on PR if there is a change
  • Review the software benchmarking results (if there is a change) - will be added as comment on PR
  • Any added dependencies are included in requirements.txt, setup.py, and dev_guide.rst (this document)
  • All warnings from static analysis must be reviewed and resolved - if deemed appropriate.

@teubert
Copy link
Collaborator Author

teubert commented May 26, 2023

Skipping review requirements since changes are all in comments/spacing

@github-actions
Copy link

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
Copy link

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

@teubert teubert merged commit e854cfb into dev May 26, 2023
@teubert teubert deleted the cleanup_formatting branch May 26, 2023 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants