Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint...
Transcript of Gina “foosel” HäußgeGina “foosel” Häußge Project lead & main developer of OctoPrint...
![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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/1.jpg)
![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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/2.jpg)
![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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/3.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/4.jpg)
![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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/5.jpg)
• 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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/6.jpg)
• 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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/7.jpg)
• 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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/8.jpg)
• 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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/9.jpg)
• 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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/10.jpg)
• 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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/11.jpg)
![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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/12.jpg)
• 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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/13.jpg)
• 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](https://reader033.fdocuments.in/reader033/viewer/2022060920/60ac5e4e8a2e4706261a6382/html5/thumbnails/14.jpg)
Page sourceOctoPrint/plugins.octoprint.org
Code?
Star proxyOctoPrint/github-star-proxy
Data exportsdata.octoprint.org/export/
Plugin repoplugins.octoprint.org