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

Searching through Vector{IndexEntry} #46

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Searching through Vector{IndexEntry} #46

wants to merge 3 commits into from

Conversation

rofinn
Copy link
Member

@rofinn rofinn commented Jul 18, 2022

Based off #45, we may want to support storing deprecated checkpoint information in the index and add some minimal search functionality to make working with collections of IndexEntry types easier.

@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

Merging #46 (e8b6484) into main (8c25fea) will decrease coverage by 0.91%.
The diff coverage is 93.47%.

@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
- Coverage   96.20%   95.28%   -0.92%     
==========================================
  Files           5        5              
  Lines         158      191      +33     
==========================================
+ Hits          152      182      +30     
- Misses          6        9       +3     
Impacted Files Coverage Δ
src/indexing.jl 92.64% <90.62%> (-2.48%) ⬇️
src/Checkpoints.jl 94.11% <100.00%> (+1.09%) ⬆️
src/handler.jl 96.87% <0.00%> (-0.10%) ⬇️
src/session.jl 100.00% <0.00%> (ø)

TestPkg.qux(a, b)

index = index_checkpoint_files(path)
entry= only(index)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
entry= only(index)
entry = only(index)



# Utility function for generating a checkpoint name lookup table from the current registry
function _depnames_lookup()
Copy link
Member

Choose a reason for hiding this comment

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

The amount of added complexity here makes me wonder if we're accounting for deprecations in the correct way. I'm not sure we should allow a deprecation to point to another deprecation.

end

function IndexEntry(filepath::AbstractPath, base_dir)
function IndexEntry(filepath::AbstractPath, base_dir, depnames_lookup=_depnames_lookup())
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason we're passing this in rather than calling it in the function?

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.

2 participants