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

DM-25965: Add ButlerURI.abspath() method #489

Merged
merged 5 commits into from Mar 18, 2021
Merged

DM-25965: Add ButlerURI.abspath() method #489

merged 5 commits into from Mar 18, 2021

Conversation

timj
Copy link
Member

@timj timj commented Mar 15, 2021

This is now very lightweight since URIs are immutable.
Forces scheme-less URIs to file URIs.

python/lsst/daf/butler/_butler.py Outdated Show resolved Hide resolved
@TallJimbo
Copy link
Member

After starting to look at obs_base, it occurred to me that daf.butler.FileDataset and should probably be changed to take ButlerURI as well, and I see that it hasn't been; I assume that means that right now we're taking ButlerURI objects in obs_base, stringifying them to pass to Butler.ingest, and then making them back into ButlerURI objects inside Datastore?

@timj
Copy link
Member Author

timj commented Mar 17, 2021

I fixed the FileDataset declaration to allow ButlerURI. I don't think we do stringify them as part of ingest so I don't think it's a problem. There are a couple of places where we call ButlerURI but that's lightweight now since it's immutable.

@timj timj force-pushed the tickets/DM-25965 branch 3 times, most recently from 341b62e to 1bd46d5 Compare March 17, 2021 17:33
This is now very lightweight since URIs are immutable.
Forces scheme-less URIs to file URIs.
This should never happen but is the last line of defence
against a confusing error message later on when the insert
into the table recording the dataset fails.
This can happen if by some chance someone asks the same file
to be ingested from two different locations.
@timj timj merged commit da1469a into master Mar 18, 2021
@timj timj deleted the tickets/DM-25965 branch March 18, 2021 01:13
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.

None yet

2 participants