Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Five ways to use GitHub to automate scholarly work

Five ways to use GitHub to automate scholarly work

In this presentation I explain how GitHub's API and GitHub Actions can be used to automate common scholarly tasks and improve the reliability of our work.

Arfon Smith

June 17, 2021
Tweet

More Decks by Arfon Smith

Other Decks in Research

Transcript

  1. Five ways to use GitHub to
    automate scholarly work
    GitHub
    Presented by @arfon

    View full-size slide

  2. Platform APIs
    REST (v3) GraphQL
    https://docs.github.com/en/rest https://docs.github.com/en/graphql

    View full-size slide

  3. GitHub Actions – Platform Automation

    View full-size slide

  4. Automated scholarly
    documents
    1

    View full-size slide

  5. Markdown paper in repository

    View full-size slide

  6. GitHub Action configured to compile paper

    View full-size slide

  7. Pull request triggers recompilation

    View full-size slide

  8. Paper compiled and available to download

    View full-size slide

  9. Notebook CI
    2

    View full-size slide

  10. Jupyter Notebooks for JWST data analysis

    View full-size slide

  11. Contributing a notebook

    View full-size slide

  12. Fixing the notebook ‘build’

    View full-size slide

  13. Jupyter Notebooks for JWST data analysis

    View full-size slide

  14. Archiving repositories with
    Zenodo
    3

    View full-size slide

  15. Powered by the GitHub API (webhooks)
    https://guides.github.com/activities/citable-code/

    View full-size slide

  16. Zenodo landing page
    https://guides.github.com/activities/citable-code/

    View full-size slide

  17. DOI per-release
    https://guides.github.com/activities/citable-code/

    View full-size slide

  18. DOI per-release
    https://guides.github.com/activities/citable-code/

    View full-size slide

  19. Reproducible compute
    environments
    4

    View full-size slide

  20. repo2docker
    https://github.com/jupyterhub/repo2docker

    View full-size slide

  21. Define dependencies, add binder badge

    View full-size slide

  22. Build Docker container image and launch

    View full-size slide

  23. Interactive versioned compute environment

    View full-size slide

  24. Automatically sync data with GitHub
    https://octo.github.com/projects/flat-data

    View full-size slide

  25. GitHub Action to sync data from sources
    https://github.com/marketplace/actions/flat-data

    View full-size slide

  26. Cron job periodically syncs data
    https://github.com/marketplace/actions/flat-data

    View full-size slide

  27. Live, always up to date COVID dashboard
    https://githubocto.github.io/flat-demo-covid-dashboard/state/new-york

    View full-size slide