-
Notifications
You must be signed in to change notification settings - Fork 5
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
Enhance input validation, CLI functionality, and testing for directLFQ #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
directlfq/utils.py
Outdated
@@ -310,6 +310,17 @@ def index_and_log_transform_input_df(data_df): | |||
def remove_allnan_rows_input_df(data_df): | |||
return data_df.dropna(axis = 0, how = 'all') | |||
|
|||
def remove_potential_quant_id_duplicates(data_df): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type hints & docstring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
directlfq/utils.py
Outdated
after_drop = len(data_df) | ||
if before_drop != after_drop: | ||
entries_removed = before_drop - after_drop | ||
LOGGER.info(f"Duplicate quant_ids detected. {entries_removed} rows removed from input df.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
after_drop = len(data_df) | ||
if before_drop != after_drop: | ||
entries_removed = before_drop - after_drop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) could be simplified
if (entries_removed:= before_drop - after_drop):
thanks Magnus! |
This PR adds duplicate row handling, fixes a non-functional CLI option, expands quicktests with a CLI run, updates GitHub Actions workflows, and bumps the version to 0.2.20.