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

get five highest rated activities #60

Merged
merged 4 commits into from
Nov 16, 2022
Merged

Conversation

wbaccinelli
Copy link
Contributor

Changed the rasa_action to retrieve the first aid kit, in order to get only the 5 activities with the highest rating

@wbaccinelli wbaccinelli requested a review from raar1 November 9, 2022 14:53
Copy link
Contributor

@raar1 raar1 left a comment

Choose a reason for hiding this comment

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

Looks good

@@ -34,7 +34,10 @@ async def run(self, dispatcher, tracker, domain):

kit_exists = True

for activity_idx, activity in enumerate(selected):
# get up to the first 5 highest rated activities
sorted_activities = sorted(selected, key=lambda x: x.activity_rating)[:5]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this 5 just for test purposes, or will it always be the top 5? I still think there should be a NUM_TOP_ACTIVITIES var or something

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will always be the top 5, but it's way better to have this as a variable

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

25.0% 25.0% Coverage
0.0% 0.0% Duplication

@wbaccinelli wbaccinelli merged commit e1f1a76 into main Nov 16, 2022
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