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

Add a Software Heritage provider #1256

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

douardda
Copy link

Software Heritage¹ is a non-profit multi-stakeholder initiative which collects,
preserves and shares all software that is publicly available in source code
form.

It provides a public API allowing to retrieve any piece of source code
that has been ingested and is identified via its SWHID², including a
growing number of jupyter notbooks.

Thanks to the recent support for SWHID added in repo2docker, this now
bring support to SWHID to binderhub as a Provider.

¹ https://www.softwareheritage.org
² https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html#persistent-identifiers

Note: I am not sure I did everything fine in the PR, and I have tested it (I have no minikube or k3s setup on my machine for now), so comments/criticisms very welcome!

@welcome
Copy link

welcome bot commented Jan 27, 2021

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@douardda
Copy link
Author

douardda commented Feb 3, 2021

Pushed an updated version:

  • rebased on current master
  • attempt to fix tests (kind of blindly; cannot execute them locally)

@douardda
Copy link
Author

douardda commented Mar 4, 2021

ping

@douardda
Copy link
Author

Hi, is there a problem with this PR? what can I do to help it being merged?
Thanks
David

(cc @betatim @manics )

@manics
Copy link
Member

manics commented Mar 15, 2021

Sorry @douardda , it's the usual problem of a lack of time 😞

@douardda
Copy link
Author

No pb, at least it's not some code related problem :-)

@douardda
Copy link
Author

I've updated the PR to fix the conflicts, if the tests are OK I would greatly appreciate someone to merge it.
Thank you

@douardda
Copy link
Author

humm no idea why the doc building job is failing here, is it related to my changes or is there a (transient) problem with the job?

@manics
Copy link
Member

manics commented Jun 16, 2021

It's due to #1308. Although it's fixed in master RTD builds off your branch (as opposed to merging your branch into upstream which is how GitHub workflows handle PRs)

Software Heritage¹ is a non-profit multi-stakeholder initiative which collects,
preserves and shares all software that is publicly available in source code
form.

It provides a public API allowing to retrieve any piece of source code
that has been ingested and is identified via its SWHID², including a
growing number of jupyter notbooks.

Thanks to the recent support for SWHID added in repo2docker, this now
bring support to SWHID to binderhub as a Provider.

¹ https://www.softwareheritage.org
² https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html#persistent-identifiers
@douardda
Copy link
Author

thanks @manics, I've rebased my PR on current master, let's see how it goes

@douardda
Copy link
Author

There is a failure, but it's a dataverse related one:

FAILED binderhub/tests/test_repoproviders.py::test_dataverse[10.7910/DVN/TJCLKP-10.7910/DVN/TJCLKP-3035124.v3.0-https://doi.org/10.7910/DVN/TJCLKP-dataverse-dvn-2ftjclkp]

probably a transient network failure of doi.org.

Do I need to spawn the job again?

@manics
Copy link
Member

manics commented Jun 17, 2021

I've rerun the CI jobs and it's green 💚
Given that this is in repo2docker it should be fine to add this. I haven't had time to go through the code or test this though, hopefully someone else can review if I don't get round to it (@betatim reviewed the origin R2D PR jupyterhub/repo2docker#988)?

@manics manics requested a review from betatim June 17, 2021 23:19
@douardda
Copy link
Author

Thanks @manics

@douardda
Copy link
Author

douardda commented Sep 3, 2021

@betatim (gentle) ping?

@manics
Copy link
Member

manics commented Sep 3, 2021

I've just tried with using a UI only config and hit this error:

[E 210903 18:29:47 web:1789] Uncaught exception GET /_config (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8585', method='GET', uri='/_config', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/work/miniforge3/envs/jupyter-dev/lib/python3.9/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/work/binderhub/config.py", line 13, in get
        self.write(self.generate_config())
      File "/work/binderhub/config.py", line 9, in generate_config
        config[repo_provider_class_alias] = repo_provider_class.labels
    AttributeError: type object 'SWHIDProvider' has no attribute 'labels'

@manics
Copy link
Member

manics commented Sep 3, 2021

This is also missing a display_name for the UI dropdown.

@consideRatio consideRatio added code:python Python changes. code:html/js/css html/js/css changes. new labels Oct 10, 2021
@SidharajYadav

This comment was marked as off-topic.

@manics
Copy link
Member

manics commented Feb 17, 2022

@douardda We're planning to merge an auto-formatting PR in two weeks #1381

Since the auto-formatting will affect most files we'll give you some help with rebasing this PR if it's not ready to merge in time.

@douardda
Copy link
Author

@manics ok, I will try to rebase it ASAP so maybe it can be merged before (?) that. Thanks

@manics
Copy link
Member

manics commented Feb 17, 2022

If you can add fixes for my comments I'll review and merge if possible.

FYI there's a (still in development) way to run BinderHub locally with just Docker, this might help you check the BinderHub UI
https://github.com/jupyterhub/binderhub/tree/master/testing/local-binder-local-hub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code:html/js/css html/js/css changes. code:python Python changes. new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants