-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Refactoring test methods #8624
base: main
Are you sure you want to change the base?
Refactoring test methods #8624
Conversation
…b.com/FGA-GCES/rasa into clean-code-and-solid-guilherme-mendes
Thanks for submitting a pull request 🚀 @alopez will take a look at it as soon as possible ✨ |
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.
Hi @guilherme-mendes. Thanks for cleaning this up! I just have a few minor comments.
Thanks for the feedback @JEM-Mosig, changes made. |
Done! @JEM-Mosig @alopez |
Sorry, @guilherme-mendes I didn't see the message. I typically only see this when you click the re-review arrows and request another review. I'll have a look today :) |
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.
Almost there. One more thing to do.
Unfortunately I cannot merge main into your repo, so you'll have to do that before we can merge.
@@ -11,6 +11,14 @@ def write_file_config(file_config): | |||
return f | |||
|
|||
|
|||
# check if os sequences e sentences is loaded correctly | |||
def get_feature_vectors(sequence, sentence): |
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.
Please add type annotations for the arguments and return types. Also, our convention is to put descriptions into the function's doc string, i.e.
def get_feature_vectors(sequence: ???, sentence: ???) -> Tuple[Optional[???], Optional[???]]:
"""Retrieves feature vectors from the features.
Args:
sequence: Features of individual tokens.
sentence: Features of the entire string.
Returns:
Feature vectors (or None) for sequence and sentence features.
"""
...
You'll have to substitute the right thing for the question marks (just follow the return type of test_message1.get_sparse_features
). Sorry I didn't see this earlier.
|
@guilherme-mendes are you still intending to work on this? 🙂 if yes, please rebase onto |
Proposed changes: