Skip to content

Conversation

@tieneupin
Copy link
Contributor

@tieneupin tieneupin commented Jan 12, 2026

The current logic for find_upstream_visits looks only in the folder specified. This is a problem as it means that, in the event the data is saved by year, the machine config will have to be updated with the new year, and access to the old year's data will be lost.

To circumvent this, we implement recursive searching logic, such that Murfey will recursively search through the a specified number of layers in the stated data directory to find matches for the current visit. This solution allows for the current upstream_data_directories key format to be kept as-is, while future-proofing the code as the years go by, allowing past visits to continue to be exposed until they are deleted from the system.

@tieneupin tieneupin self-assigned this Jan 12, 2026
@tieneupin tieneupin added the enhancement New feature or request label Jan 12, 2026
@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

❌ Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.03%. Comparing base (6f96b62) to head (b545268).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #725      +/-   ##
==========================================
+ Coverage   46.01%   46.03%   +0.01%     
==========================================
  Files          91       91              
  Lines        9625     9634       +9     
  Branches     1256     1260       +4     
==========================================
+ Hits         4429     4435       +6     
- Misses       4977     4978       +1     
- Partials      219      221       +2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

if partial_match
else search_string == entry.name
):
current_upstream_visits[entry.name] = Path(entry.path)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not keen on this as it is modifying something from outside the scope of the function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's fair. I've re-written it so that it creates a dictionary within the scope of the function, updates it recursively, before returning it to the outer function.

partial_match=partial_match,
max_depth=max_depth - 1,
)
continue
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the continue needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it's not needed. I think I had it there as a visual reminder that the if-block logic ended here. Will remove it.

…t recursively, and return it instead of using a variable from outside the function scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants