StyleFrame icon indicating copy to clipboard operation
StyleFrame copied to clipboard

Beginning refactor `to_excel()`

Open buhtz opened this issue 3 years ago • 3 comments

As discussed in #135

  • The index now is an explicit argument in to_excel() with default False (differing from pandas default). This is to make it clear to the user that there is a difference between StyleFrame- and Pandas-default for that argument.
  • Setting the default's for header, startcol, startrow and na_rep now moved to an own method (_to_excel_pandas_defaults()). This makes it easier to test this piece of code and make the code of to_excel() more clear.

Sidenode: There are nearly no docstrings in the unittests I am not sure how the structure of the test cases is and what are the intentions behind all that classes and cases. Because of that I decided just to create a new test class focusing on to_excel() only.

buhtz avatar Jul 23 '22 07:07 buhtz

Codecov Report

Base: 90.74% // Head: 90.71% // Decreases project coverage by -0.03% :warning:

Coverage data is based on head (f760b40) compared to base (c70243d). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #139      +/-   ##
==========================================
- Coverage   90.74%   90.71%   -0.04%     
==========================================
  Files          18       18              
  Lines        1534     1561      +27     
==========================================
+ Hits         1392     1416      +24     
- Misses        142      145       +3     
Impacted Files Coverage Δ
styleframe/style_frame.py 86.65% <100.00%> (+0.08%) :arrow_up:
styleframe/tests/style_frame_tests.py 99.42% <100.00%> (+0.02%) :arrow_up:
styleframe/styler.py 78.62% <0.00%> (-1.24%) :arrow_down:
styleframe/utils.py 99.14% <0.00%> (+0.03%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jul 23 '22 07:07 codecov[bot]

btw: It is still not clear for me how long your code lines are. Where do you break your lines?

I need this value to modify my environment which use the default value of 80.

buhtz avatar Jul 24 '22 06:07 buhtz

Did I missed something in the GitHub webfrontend here? Do I have to do something else? Or can we merge it?

For me this PR was just a warm up for refactoring the to_excel(). So I would like to start.

buhtz avatar Jul 29 '22 12:07 buhtz

Can you help me here? I changed what you requested. But GitHub still mark this PR as "changes requested".

Can you deal with it?

buhtz avatar Sep 23 '22 19:09 buhtz

Please not that you only resolved my suggestions, but didn't apply them. I did that for you and will merge this PR.

Thanks for contributing! :)

DeepSpace2 avatar Sep 30 '22 12:09 DeepSpace2

Please not that you only resolved my suggestions, but didn't apply them.

What means apply?

buhtz avatar Sep 30 '22 20:09 buhtz

Please see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request

DeepSpace2 avatar Oct 02 '22 08:10 DeepSpace2