Skip to content

Analyser optimisations#781

Draft
tieneupin wants to merge 21 commits intomainfrom
analyser-fix
Draft

Analyser optimisations#781
tieneupin wants to merge 21 commits intomainfrom
analyser-fix

Conversation

@tieneupin
Copy link
Copy Markdown
Contributor

@tieneupin tieneupin commented Apr 10, 2026

The analyse function previously consisted of a large block of if-else clauses nested in a while loop, making testing the function challenging. Additionally, we found that files that do not pass the _find_extension function cannot be used to determine the context as part of the current logical workflow in _analyse.

This PR aims to resolve these issues by:

  1. Moving the main bulk of the _analyse function into a separate function out of the while loop to facilitate easier testing
  2. Adjusting the logic of _analyse such that the file that is used to determine the extension and/or context will also be considered for post_transfer
  3. Disentangling the workflows for the Tomography and SPA contexts, so that each Context's workflow exists in a separate logic block

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 72.61905% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.29%. Comparing base (3f56224) to head (f8ffd2c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #781      +/-   ##
==========================================
+ Coverage   49.62%   50.29%   +0.67%     
==========================================
  Files          96       96              
  Lines       10130    10070      -60     
  Branches     1331     1320      -11     
==========================================
+ Hits         5027     5065      +38     
+ Misses       4846     4751      -95     
+ Partials      257      254       -3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…n; '_analyse' is now run in the while loop from '_analyse_in_thread'; grouped SPA/tomo-specific Analyser attributes in a separate block
…ssing is done within the relevant Context blocks
* Disentangled the processing logic for the 4 SPA- and Tomography-related contexts
* Replaced matching Contexts using 'str(self._context)' with 'self._context.name'
* Replaced giant if-else blocks with match-case logic
* Use explicit returns
@tieneupin tieneupin self-assigned this Apr 14, 2026
@tieneupin tieneupin added enhancement New feature or request client Relates to the client component labels Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Relates to the client component enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant