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

Linting iii #235

Open
wants to merge 17 commits into
base: development
Choose a base branch
from
Open

Linting iii #235

wants to merge 17 commits into from

Conversation

mschwoer
Copy link
Contributor

@mschwoer mschwoer commented Nov 15, 2024

manual fixes for a first bunch of linting rules ..
see individual commits

edit: made all start imports in notebooks explicit as tests started to fail due to removal of os from some readers

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Collaborator

@GeorgWa GeorgWa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
I think the Path() / Path() syntax is quite ugly and missuses python magic methods :D but if the community thinks this is the way to go I'm happy to do so.
I'm also not a big fan of ther new read only .to_numpy() buit I guess I have to live with this.

alphabase/psm_reader/alphapept_reader.py Show resolved Hide resolved
alphabase/psm_reader/maxquant_reader.py Show resolved Hide resolved
@@ -292,7 +292,7 @@ def _lookup_modification(
The name of the matched modification in alphabase format.

"""
mass_distance = mod_annotated_df["mass"].values - mass_observed
mass_distance = mod_annotated_df["mass"].to_numpy() - mass_observed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit of a tricky change. It might have some performance implications as it performas a copy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you wish, we can disable the rule and revert? however, pandas docs recommend using to_numpy()
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.values.html

alphabase/spectral_library/reader.py Show resolved Hide resolved
Base automatically changed from linting_II to development November 22, 2024 09:51
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.

2 participants