-
Notifications
You must be signed in to change notification settings - Fork 10
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
92 fix backend linting errors #111
base: main
Are you sure you want to change the base?
Conversation
@suprajamannava17 - Great work! I started reviewing the code. Meanwhile, could you please update the PR description with proper details? |
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.
@suprajamannava17 - Great work! The code looks much cleaner now. Thanks for improving it. I have reviewed the code and left some comments. Can you please look into them.
server/responses.py
Outdated
@@ -1,3 +1,5 @@ | |||
# pylint: disable=too-few-public-methods |
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 remove the in-file Pylint rule disabling and add a .pylintrc file
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.
- Can you please look into the code once? With the current changes, the search term is not being displayed as a Header in the output file.
- Please add the logic related to the use_total_lines and total_lines parameters. If required, we might have to use them in the future.
- Update the method names to be more meaningful and, if possible, add proper error messages as well.
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.
This looks great! Can you also update the following:
- Update the variable names to be more descriptive like document_content instead of docx_content and document_response instead of docx_response in both /preview and /find-sections
- Define the values inside the content-type ('application/vnd.openxmlformats-officedocument.wordprocessingml.document'), mimetype and output filename as constants and update the parameters accordingly
- If possible, refactor the response handling in the /preview and /find-sections. Create methods for handling responses and call the methods respectively
server/usecases/search_orca_data.py
Outdated
# Use ORCALogExtractor for extraction | ||
extractor = ORCALogExtractor(file_path) | ||
document_content = extractor.extract_sections( | ||
search_terms=search_terms, sections=sections, specify_lines=specify_lines |
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 the use_total_lines and total_lines, but make them optional parameters with default values.
requirements.txt
Outdated
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 move the requirements.txt file into the server folder.
@suprajamannava17 - Could you please let me know once the PR is ready for review? |
Fixes #92
What was changed?
I worked on resolving linting errors across the project by modifying multiple files and ensuring that the pylint GitHub Action workflow runs successfully. The changes affected the following files:
Why was it changed?
The primary issue was that linting errors were detected during the execution of pylint in GitHub Actions, preventing the workflow from passing successfully. Fixing these errors was necessary to maintain code quality, enforce coding standards, and ensure a successful CI/CD pipeline.
How was it changed?
Configuration Updates:
Code Modifications:
Testing Adjustments:
Final Validation:
Screenshots that show the changes (if applicable):