gina “foosel” häußgegina “foosel” häußge project lead & main developer of octoprint...

14

Upload: others

Post on 22-Jan-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180
Page 2: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180
Page 3: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180

Gina “foosel” HäußgeProject lead & main developer of OctoPrint

Page 4: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180
Page 5: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180

• Plugin repository for OctoPrint at plugins.octoprint.org

• Over 260 plugins by 180 authors, most of them hosted on

GitHub

• Static page: Jekyll (w/ collections) on GitHub Pages

• Problem: Which plugins are popular, hot, well maintained, …

• Problem: Outdated compatibility information (Python 2 vs 3)

Starting point

Page 6: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180

• Page build workflow

• Caching

• Data enrichment

Enter: GH Actions

Page 7: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180

• JSON export from

ElasticSearch

• Python build step

populates Jekyll collection

prior to page build

• frontmatter, requests

Usage data

Page 8: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180

• Detect GitHub hosted plugins (source URL)

• Fetch latest release, number of releases, number of

open/closed issues, number of stars, last push

• Fetch main plugin file, parse into AST & extract compatibility

information

• Long runtime: Parallelization & not on pull requests

GitHub Metadata & raw files

Page 9: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180

• API calls with personal access token

• Use GraphQL where possible, all in one query

- Problem: releases (no prerelease filter)

- Fetch via GraphQL, if prerelease fetch via API

• Refresh page only twice per day

Challenge: API rate limiting

Page 10: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180

• OAuth starring proxy

• Python + flask + flask-dance

• Docker

• Some JS magic allows starring right from the repository

• Challenge: OAuth Scope needed for starring unclear

Star gazing ⭐

Page 11: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180
Page 12: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180

• Users can easily find plugins that are popular, trending, …

• Users get an indicator of the development activity on a plugin

• Users get more accurate compatibility information

• Users can show appreciation by starring plugins

Repository…

Page 13: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180

• Added to export to

OctoPrint

• Availability in built-in

repository browser

• Sorting, filtering, …

• No starring (yet?)

… & OctoPrint

Page 14: Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint •Plugin repository for OctoPrint at plugins.octoprint.org •Over 260 plugins by 180

Page sourceOctoPrint/plugins.octoprint.org

Code?

Star proxyOctoPrint/github-star-proxy

Data exportsdata.octoprint.org/export/

Plugin repoplugins.octoprint.org