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

Fix fasta in cli #448

Merged
merged 6 commits into from
Jan 24, 2025
Merged

Fix fasta in cli #448

merged 6 commits into from
Jan 24, 2025

Conversation

mschwoer
Copy link
Collaborator

#prfromhell

@mschwoer mschwoer requested a review from GeorgWa January 23, 2025 15:37
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.

Did you forget to check in the CLI testing code? 😄 🤔

@mschwoer mschwoer requested a review from GeorgWa January 23, 2025 16:15
# TODO add tests for _get_raw_path_list_from_args_and_config


def test_get_config_from_args():
Copy link
Collaborator

Choose a reason for hiding this comment

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

why don't we get the error, that we can only update existing keys?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because this is another dictionary update method 🙈
I'll add a TODO

Copy link
Collaborator

Choose a reason for hiding this comment

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

aah okay :D

{},
{
# TODO raw_paths missing here
"library_path": mock_args.library,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe I don't understand the mocking yet. why can we check for moch_args.library altough we never initialized it?

Copy link
Collaborator Author

@mschwoer mschwoer Jan 24, 2025

Choose a reason for hiding this comment

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

yes, by default a mock will return another mock for any attribute, method, ... you try to access.

This test does not care what is passed, it just checks that the data is propagated as expected.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maybe this sheds some light on mocking https://www.ines-panker.com/2020/06/01/python-mock.html

config=None,
version=None,
output="/output",
fasta=None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as before. we initialize it but now we don't check for it anymore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we initialize it as None otherwise it will return a mock (cf. above)

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

# TODO add tests for _get_raw_path_list_from_args_and_config


def test_get_config_from_args():
Copy link
Collaborator

Choose a reason for hiding this comment

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

aah okay :D

@GeorgWa GeorgWa merged commit 21a2e11 into main Jan 24, 2025
5 checks passed
@GeorgWa GeorgWa deleted the fix_fasta_in_cli branch January 24, 2025 12:41
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