From 7a287713c9d9d5ae7fbb1c2bf4a130be39a657cd Mon Sep 17 00:00:00 2001 From: Chris Holdgraf Date: Sun, 1 Dec 2019 18:05:10 -0800 Subject: [PATCH] note about content providers --- doc/developer/repoproviders.rst | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/developer/repoproviders.rst b/doc/developer/repoproviders.rst index 4945efb57..21439dc28 100644 --- a/doc/developer/repoproviders.rst +++ b/doc/developer/repoproviders.rst @@ -38,23 +38,26 @@ It is possible to add new repository providers to BinderHub, allowing a BinderHub deployment to fetch repositories from new locations on the web. Doing so involves defining your own RepoProvider sub-class and modifying a set of methods/attributes to interface with the online -provider to which you are providing access. +provider to which you are providing access. It also often involves +`building a new repo2docker content provider `_. In order to extend the supported repository providers, follow these instructions. We'll provide example links for each step to a recent `BinderHub pull-request `_ that implements the ``DataverseProvider`` class. -1. Review the `repoprovider module `_. +#. Review the `repoprovider module `_. This shows a number of example repository providers. -2. Create a new class that sub-classes the ``RepoProvider`` class. +#. Check whether repo2docker has a `ContentProvider class `_ + that will work with your repository provider. If not, then you'll need to create one first. +#. Create a new class that sub-classes the ``RepoProvider`` class. Define your own methods for actions that are repository provider-specific. For example, `here is the DataverseProvider class `_. -3. Add this class to the `list of default RepoProviders in BinderHub `_. -4. Add the new provider prefix `to the BinderHub UI `_ +#. Add this class to the `list of default RepoProviders in BinderHub `_. +#. Add the new provider prefix `to the BinderHub UI `_ and `the index javascript `_ and make the appropriate changes to the index page based on the URL specification for this repository provider. -5. Add `a test for your repoprovider `_ +#. Add `a test for your repoprovider `_ to ensure that it properly resolves and fetches a repository URL. -6. Document your new repository provider on the :ref:`providers-section` page. +#. Document your new repository provider on the :ref:`providers-section` page.