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

Refactor testing and arbitrary extension handling #149

Merged
merged 8 commits into from
Sep 17, 2023

Conversation

jspaezp
Copy link
Contributor

@jspaezp jspaezp commented Sep 17, 2023

The main purpose of this PR is to increase the test cases in the repo and make it easier to maintain.

In addition,

  1. it fixes an issue where failing tests would never be reported as failed (since it checked for strings whose case didnt match, Error != ERROR).
  2. Documents better what each file attempts to test.
  3. Removes a false positive where failed runs generated incomplete/empty openms.tsv or experimental designs.
  4. Documents a deprecation warning and fixes another one.
  5. Updates pre-commit versions.

EDIT:

  1. Now it also extends the handling of file extension variants to allow things like .gz -> .d or .d.zip -> .d, while at the same time handling graciously cases where the passed conversions are not used (ie, raw:mzml does not error out if there are both .raw and .mzml files)

@jspaezp
Copy link
Contributor Author

jspaezp commented Sep 17, 2023

@ypriverol LMK what you think

@ypriverol ypriverol self-requested a review September 17, 2023 09:29
@jspaezp
Copy link
Contributor Author

jspaezp commented Sep 17, 2023

@ypriverol as we talked about, I added the extended handling of extensions

Copy link
Member

@ypriverol ypriverol left a comment

Choose a reason for hiding this comment

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

Can you increase the version of the package in the same PR

__version__ = "0.0.23"

@@ -37,6 +36,17 @@ def get_openms_file_name(raw, extension_convert: str = None):
:param extension_convert: convert extension to specified format
:return: converted file name
"""

def _removesuffix(x: str, suffix: str, /) -> str:
Copy link
Member

Choose a reason for hiding this comment

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

Beautiful implementation @jspaezp

@ypriverol ypriverol merged commit fa4d254 into bigbio:master Sep 17, 2023
@jspaezp jspaezp changed the title Refactor testing Refactor testing and arbitrary extension handling Sep 21, 2023
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