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

refactor: make backend helpers pep8 compliant #871

Merged
merged 6 commits into from May 13, 2024

Conversation

gaurarpit
Copy link
Collaborator

@gaurarpit gaurarpit commented May 10, 2024

Purpose

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Run the tests:
poetry run pytest -m "not azure and not functional"    
poetry run pytest -m "functional"  

SCR-20240510-oqhg-2

What to Check

  • Verify that the answers are from the new content

Copy link

github-actions bot commented May 10, 2024

Coverage

Coverage Report •
FileStmtsMissCoverMissing
code
   create_app.py130397%190, 195, 313
code/backend/batch
   AddURLEmbeddings.py470100% 
   BatchPushResults.py250100% 
   BatchStartProcessing.py180100% 
   GetConversationResponse.py320100% 
code/backend/batch/utilities/common
   SourceDocument.py60591%44, 47, 51, 55, 128
code/backend/batch/utilities/document_loading
   layout.py12558%9, 12–13, 16, 25
   read.py12558%9, 12–13, 16, 25
code/backend/batch/utilities/helpers
   azure_blob_storage_client.py803062%22–24, 32, 52, 55–56, 61, 65, 90–91, 93, 97, 153, 156, 175, 178, 180, 188–192, 215, 219–223, 225
   azure_form_recognizer_helper.py817013%11, 13, 16–17, 25, 27, 44–45, 52–55, 60–68, 73–75, 77–78, 81, 84–86, 88–90, 93, 97–98, 105–109, 111–114, 117–131, 133, 135–137, 139–140, 143, 145–147
   azure_search_helper.py470100% 
   document_chunking_helper.py13192%19
   document_loading_helper.py12191%14
   env_helper.py1241091%201, 206–207, 210–212, 221, 225–227
   llm_helper.py421173%40–41, 50, 61–62, 73, 86–87, 94, 113, 121
   orchestrator_helper.py13469%22–24, 27
code/backend/batch/utilities/helpers/config
   config_helper.py1230100% 
   embedding_config.py12191%27
code/backend/batch/utilities/helpers/embedders
   embedder_base.py5180%7
   embedder_factory.py10370%12–13, 15
   integrated_vectorization_embedder.py31487%20, 39–41
   push_embedder.py460100% 
code/backend/batch/utilities/integrated_vectorization
   AzureSearchDatasource.py190100% 
   AzureSearchIndex.py350100% 
   AzureSearchIndexer.py20290%47–48
   AzureSearchSkillset.py220100% 
code/backend/batch/utilities/loggers
   ConversationLogger.py362822%8, 11–12, 15–24, 27–30, 33–42, 46
code/backend/batch/utilities/orchestrator
   LangChainAgent.py601968%21–24, 26, 61–62, 82–85, 102–103, 106–109, 116–117
   OpenAIFunctions.py543633%62, 64, 70–73, 75, 78, 85–89, 93–94, 96, 102–106, 110–112, 115, 118–119, 122, 127–129, 132–134, 137, 142
   OrchestratorBase.py50884%33, 72–74, 81–83, 93
   SemanticKernel.py540100% 
code/backend/batch/utilities/search
   AzureSearchHandler.py58296%24, 30
   Search.py13192%15
   SearchHandlerBase.py361363%13–15, 18–20, 24, 28, 32, 36, 40, 44, 48
code/backend/batch/utilities/tools
   ContentSafetyChecker.py412539%16, 18–19, 24, 30–32, 35–36, 42–43, 49–54, 57–59, 61, 65–67, 69
   PostPromptTool.py221340%11, 14–15, 17–18, 22, 29, 36–37, 45, 51–52, 60
   QuestionAnswerTool.py610100% 
   TextProcessingTool.py16943%9, 12–15, 21, 23, 30, 37
code/backend/pages
   01_Ingest_Data.py70700%1–10, 12–14, 16, 22, 29, 32–33, 36–39, 41–44, 48–50, 53–55, 58–65, 68–70, 72, 75–78, 81, 86–88, 90–91, 93–94, 97–98, 102–104, 109–112, 119–120, 125, 131–132
   02_Explore_Data.py26260%1–7, 9–10, 12, 18, 25, 28, 36, 38–39, 41–44, 46–49, 52–53
   03_Delete_Data.py36360%1–7, 9–11, 13, 19, 26, 29, 37, 39–40, 42–45, 47, 49–50, 54, 58–62, 64, 67–68, 70–72
   04_Configuration.py1351350%1–9, 11–12, 14, 21, 28, 30, 35–44, 47–48, 51–62, 64–65, 67–69, 73–74, 86–90, 93–94, 98–100, 103–104, 107–108, 111–112, 135, 137–138, 140–144, 146–149, 152–156, 163–164, 174–176, 178, 198–199, 201, 203, 209, 217, 225, 232–233, 240, 242–243, 247, 255, 261, 268, 286–290, 296–297, 316–317, 321, 323–324, 347, 381–382, 384–385, 388–389, 392–395, 397–398, 400–402, 404–407, 409–410
TOTAL229767670% 

Tests Skipped Failures Errors Time
178 0 💤 0 ❌ 0 🔥 10.303s ⏱️

@gaurarpit gaurarpit marked this pull request as ready for review May 10, 2024 12:06
@gaurarpit gaurarpit self-assigned this May 10, 2024
# Conflicts:
#	code/backend/batch/utilities/document_loading/layout.py
#	code/backend/batch/utilities/document_loading/read.py
@gaurarpit gaurarpit marked this pull request as draft May 10, 2024 15:34
@gaurarpit gaurarpit marked this pull request as ready for review May 10, 2024 15:36
Copy link
Collaborator

@adamdougal adamdougal left a comment

Choose a reason for hiding this comment

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

lgtm

@gaurarpit gaurarpit added this pull request to the merge queue May 13, 2024
Merged via the queue into main with commit cdc0fe8 May 13, 2024
14 checks passed
@gaurarpit gaurarpit deleted the arpit/refactor/make-backend-helpers-pep8 branch May 13, 2024 08:05
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.

Make backend helpers PEP8 compliant
3 participants