Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyOpenSci REVIEW - extract static classes and transfer to own modules #45

Merged
merged 30 commits into from
Jan 25, 2023

Conversation

Robaina
Copy link
Owner

@Robaina Robaina commented Jan 25, 2023

This PR addresses one of the comments of reviewer @Batalex in PyOpenSci:

pynteny/parser.py

  • The two classes in this file only use static methods and do not hold any attribute. Is there a reason for not replacing all those methods with simple functions?
    Edit: even preprocessing.py does isLegitSequence = RecordSequence.isLegitPeptideSequence

pynteny/app

  • The embedded streamlit app is really cool fire
  • There again, it seems a bit odd to have classes with only static methods

I guess I got caught up with the idea of using static classes to group functions. Makes more sense to write a module for each class since that is the pythonic way.

@Robaina Robaina linked an issue Jan 25, 2023 that may be closed by this pull request
@Robaina Robaina self-assigned this Jan 25, 2023
@Robaina Robaina added refactor refactor code code review labels Jan 25, 2023
@codecov
Copy link

codecov bot commented Jan 25, 2023

Codecov Report

Base: 86.70% // Head: 86.47% // Decreases project coverage by -0.24% ⚠️

Coverage data is based on head (e3dda80) compared to base (7eba519).
Patch coverage: 89.23% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
- Coverage   86.70%   86.47%   -0.24%     
==========================================
  Files          11       12       +1     
  Lines         820      806      -14     
==========================================
- Hits          711      697      -14     
  Misses        109      109              
Impacted Files Coverage Δ
pynteny/parsers/syntenyparser.py 86.41% <86.41%> (ø)
pynteny/parsers/labelparser.py 91.66% <91.66%> (ø)
pynteny/preprocessing.py 90.24% <92.30%> (-0.19%) ⬇️
pynteny/filter.py 77.45% <100.00%> (ø)
tests/test_parser.py 96.77% <100.00%> (+0.10%) ⬆️
tests/test_preprocessing.py 98.00% <100.00%> (ø)
pynteny/parser.py

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

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

@Robaina Robaina changed the title extract static classes from parse.py PyOpenSci REVIEW - extract static classes from parse.py Jan 25, 2023
@Robaina Robaina closed this Jan 25, 2023
@Robaina Robaina reopened this Jan 25, 2023
@Robaina Robaina closed this Jan 25, 2023
@Robaina Robaina reopened this Jan 25, 2023
@Robaina Robaina marked this pull request as ready for review January 25, 2023 19:37
@Robaina Robaina closed this Jan 25, 2023
@Robaina Robaina reopened this Jan 25, 2023
@Robaina Robaina closed this Jan 25, 2023
@Robaina Robaina reopened this Jan 25, 2023
@Robaina Robaina merged commit 629732f into main Jan 25, 2023
@Robaina Robaina deleted the 44-pyopensci-review-static-classes branch January 25, 2023 21:08
@Robaina Robaina changed the title PyOpenSci REVIEW - extract static classes from parse.py PyOpenSci REVIEW - extract static classes and transfer to own modules Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PyOpenSci REVIEW - Static classes
1 participant