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

229 make all analyses available for reports #244

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

m-milek
Copy link
Member

@m-milek m-milek commented Dec 9, 2024

This pull request includes significant changes to the backend and nlp modules to improve the NLP analysis capabilities and refactor the code for better maintainability. The main changes involve updating the NlpClient to support parallel analysis requests and refactoring the input processing functions in the nlp module.

Backend Module Changes:

NLP Module Changes:

  • nlp/src/main.py: Refactored multiple analysis functions (get_sentiment, get_language, get_sarcasm, get_keywords, get_spam, get_politics, get_hate_speech, and get_clickbait) to use a new process_inputs helper function for better code reuse and maintainability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

@m-milek m-milek added backend Related to the backend nlp Related to NLP labels Dec 9, 2024
@m-milek m-milek requested a review from Smixie December 9, 2024 19:53
@m-milek m-milek self-assigned this Dec 9, 2024
@m-milek m-milek linked an issue Dec 9, 2024 that may be closed by this pull request
Copy link

deepsource-io bot commented Dec 9, 2024

Here's the code health analysis summary for commits 53101a1..601f2dd. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Secrets LogoSecrets✅ SuccessView Check ↗
DeepSource Docker LogoDocker✅ SuccessView Check ↗
DeepSource Rust LogoRust✅ Success
❗ 4 occurences introduced
🎯 3 occurences resolved
View Check ↗
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗
DeepSource Python LogoPython✅ Success
❗ 60 occurences introduced
🎯 12 occurences resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@m-milek m-milek marked this pull request as ready for review December 9, 2024 20:03
Copy link
Collaborator

@Smixie Smixie left a comment

Choose a reason for hiding this comment

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

For me everything looks fine. The one thing I can think of is change generated_in to camel case. I remember it is a format required for frontend.

@m-milek
Copy link
Member Author

m-milek commented Dec 9, 2024

For me everything looks fine. The one thing I can think of is change generated_in to camel case. I remember it is a format required for frontend.

It's better if it stays in snake case. Before reaching the frontend, it gets parsed to a backend struct and saved to our database. I'll handle the conversion on my side

@Smixie Smixie merged commit a03a347 into dev Dec 9, 2024
15 checks passed
@Smixie Smixie deleted the 229-make-all-analyses-available-for-reports branch December 9, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to the backend nlp Related to NLP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make all analyses available for reports
2 participants