Add `file://` protocol to `self` links that currently don't have a protocol
xref https://github.com/radiantearth/stac-spec/pull/1281, but it seems likely that at some point in the future self links will be required to have a protocol (i.e. absolute filesystem paths won't be enough). We should update to pystac to write file:// absolute paths to future-proof ourselves and help ecosystem adoption.
Does this also imply that RELATIVE_PUBLISHED is no longer a valid catalog type?
🤔 I'm not sure why it would be invalid ... per best practices:
This is a self-contained catalog as described above, except it includes an absolute self link at the root to identify its online location.
I think a file:///path/to/something href would count as an absolute self link?
Oh ok so absolute in this context just means a url with a protocol. Not as in absolute vs relative path?
Oh ok so absolute in this context just means a url with a protocol. Not as in absolute vs relative path?
Yeah, I think that text from the best practices is now a bit confusing since a href with a protocol is probably always absolute ... I can't think of an example of a protocol://-style href that could be relative?
I was thinking about this more in the context of the migrate function. I think the next version of pystac should be able to read URIs that have the file:/// protocol, but I think it should not write them that way until version 2.0. It just feels like too big of a change to put in a minor release.
I'll open a new PR now taking just the reading bits from #1472