graphix icon indicating copy to clipboard operation
graphix copied to clipboard

Tidy up imports

Open EarlMilktea opened this issue 1 year ago • 4 comments

Description of the change:

  • Use coherent import style
  • Add coverage ignore patterns
  • Prohibit relative import
  • Resolve deeply-nested import that will lead to mypy warning

EarlMilktea avatar Oct 04 '24 07:10 EarlMilktea

Codecov Report

Attention: Patch coverage is 91.56627% with 7 lines in your changes missing coverage. Please review.

Project coverage is 78.10%. Comparing base (b60ff8b) to head (1def5cb). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
graphix/gflow.py 84.84% 5 Missing :warning:
graphix/generator.py 50.00% 1 Missing :warning:
graphix/pattern.py 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #217      +/-   ##
==========================================
+ Coverage   77.42%   78.10%   +0.68%     
==========================================
  Files          38       38              
  Lines        6166     6007     -159     
==========================================
- Hits         4774     4692      -82     
+ Misses       1392     1315      -77     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 04 '24 07:10 codecov[bot]

could you also improve imports in examples or do you think we can leave them like they are?

We could safely leave them untouched after adding __all__ attributes.

EarlMilktea avatar Oct 04 '24 15:10 EarlMilktea

Or we may remove all the imports in __init__.py ?

Which do you prefer?

EarlMilktea avatar Oct 04 '24 15:10 EarlMilktea

Or we may remove all the imports in __init__.py ?

Which do you prefer?

thanks, adding __all__ would be good I think.

shinich1 avatar Oct 05 '24 00:10 shinich1

@thierry-martinez

Could you review this PR? I would like to work on refactoring pauli.py after this PR.

EarlMilktea avatar Oct 11 '24 07:10 EarlMilktea

@thierry-martinez Reminder

EarlMilktea avatar Oct 18 '24 11:10 EarlMilktea