parse_source

parse_source(source: str)

Parse the source of a Data Package into a formal Address.

Parameters

source : str

The string representation for the location of a Data Package’s metadata, either as a path, https, or gh/github repository.

Returns

Address

A formal Address class.

Raises

ValueError

If the source contains something other than what Seedcase can accept.

Examples

from seedcase_soil import parse_source

parse_source("./datapackage.json")
parse_source("gh:seedcase-project/example-seed-beetle@0.2.0")
Address(value='file:///home/runner/work/seedcase-soil/seedcase-soil/datapackage.json', local=True)
Address(value='https://raw.githubusercontent.com/seedcase-project/example-seed-beetle/0.2.0/datapackage.json', local=False)