You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(this is currently being added in #1392 but that's a bit experimental still so I wanted to document in an issue also.)
there are a few different places where we are talking about adding a location property to Index classes.
location could serve a few different purposes -
In #1406, locations are returned from MultIndex.signatures_with_location() mainly for UX purposes, to alert people to where signature are being loaded from in case of error. This code also useful in command_summarize.py:load_singletons_and_count(...) where it is used to get the right source filename for reporting. This resolved #810 (comment). Here, however, location is only used in MultiIndex because this Index subclass is the only one where we load from many different files that should be visible to the user.
In #1392, where a general location property for Index is introduced, it is used to make Index.find and consuming methods more generic. This is still mostly for reporting, in that there is no explicit suggestion that location be resolvable for others.
Eventually, we should probably change location to be something that can be resolvable to the container for signatures, so that we can do something like
# pull location and a signature md5sum from somewhere
loc = ...
sig_md5 = ...
# load location
db = _load_datatabase(loc)
# find signature by md5sum
sigs = db.select(md5sum=sig_md5)
sig = list(sig)[0]
This would be useful for lazy loading and manifests and other stuff, per #1097.
The text was updated successfully, but these errors were encountered:
(this is currently being added in #1392 but that's a bit experimental still so I wanted to document in an issue also.)
there are a few different places where we are talking about adding a
location
property toIndex
classes.location
could serve a few different purposes -In #1406, locations are returned from
MultIndex.signatures_with_location()
mainly for UX purposes, to alert people to where signature are being loaded from in case of error. This code also useful incommand_summarize.py:load_singletons_and_count(...)
where it is used to get the right source filename for reporting. This resolved #810 (comment). Here, however,location
is only used inMultiIndex
because thisIndex
subclass is the only one where we load from many different files that should be visible to the user.In #1392, where a general
location
property forIndex
is introduced, it is used to makeIndex.find
and consuming methods more generic. This is still mostly for reporting, in that there is no explicit suggestion thatlocation
be resolvable for others.Eventually, we should probably change
location
to be something that can be resolvable to the container for signatures, so that we can do something likeThis would be useful for lazy loading and manifests and other stuff, per #1097.
The text was updated successfully, but these errors were encountered: