frictionlessdata / datapackage-py

A Python library for working with Data Packages.
https://frictionlessdata.io
MIT License
191 stars 43 forks source link

Load packages and resources with a custom registry #278

Closed joemirizio closed 3 years ago

joemirizio commented 4 years ago

Overview

Creating a Registry with a custom URL is supported, but AFAIK there is no way to load a Package or Resource with that registry because the Profile they create uses the default Registry.

I tried extending the Profile class and overrode _load_registry, but extending the Package and Resource classes became very difficult because most methods were name mangled.

I'm not sure the best approach, but one solution would be to allow a registry to be passed to the Package and Resource constructors.


Please preserve this line to notify @roll (lead of this repository)

roll commented 3 years ago

Hi @joemirizio,

We discontinued active support of JSONSchema registries in favour of descriptor.profile = <URL> property to simplify things.

You just need to re-shape your code to provide an URL instead of <name, registry>.

Please re-open if needed or just ask here if other help is needed