RSH HackMD

Link to this document: https://hackmd.io/@researchsoftwarehour/questions

You can use this file to write questions and comments. To edit click edit button (either top left or top right)

  • Always write at the very bottom, this is easier for us to watch.

  • We will note here URLs that we mention during the session.

  • You may comment on, clean up, or answer other people's questions.

  • Be respectful and form a good community.

  • Jarno, you are a little quieter as the others ;)

  • better ;) thanks!

    • answer
  • what is git?

    • ou
    • we will see in a moment

Progression of use cases and topics

GitHub is used for:

  • things for yourself (central location, backup, sharing, organizing, easy moving to later levels)
  • things for small groups (organizations, shared repos with or without PRs, etc)
  • things for community (outside collaborators, discussion, PRs, etc)

Where are you? Where do you want to be?

  • questions

Quick survey

I have used git before:

  • yes: IoooooOooooIoooo
  • no: Ooooooo0oooo

In the past I have already opened an issue on GitHub:

  • yes: oIIoooIII
  • no: OoOoooooooooooooo0ooo

In the past I have already creaded a pull request on GitHub (or merge request on GitLab):

  • yes: ooooIooIo
  • no: oOooooooooooooooo

What is git?

  • Version control
    • Track changes
    • Inspect history
    • Work together
  • Basically a requirement for any kind of serious programming work
  • But also useful for others.
  • This talk is not about git: we assume you use it already
  • tracks code, manuscripts, theses, etc.

Example: https://github.com/bast/pr-exercise

  • Demo:

    • vim README.md
    • git diff
    • git add
    • git commit -m "Adding a line during the stream"
  • Is gitlab the same as github?

    • GitLab does the same things as GitHub, but it is a separate program.
    • The biggest difference is that you can run your own GitLab on a server
    • We'll get to this in a bit.

What is GitHub?

  • Commercial company
  • hosting a web repository, Github
  • Very good free services for open-source projects.
  • vs Gitlab
  • Interfaces: take your pick
    • Git command line
    • Github desktop and apps
    • Github web interface
  • Cost
  • Github ownership

Question: Are there command line interfaces for Github that work on Windows?

I don't know if it's changed, but last time I checked, the Github Desktop was pretty unstable in Windows.

Basic features: pushing and pulling

Let's demo the basics of Github.

  • You connect to other servers via git remotes, controlled with git remote.
  • Once a remote is set, you git push, git fetch, and git pull
  • It isn't our goal to go in detail about the technical implementation: you can read this later. (we'll talk about why instead)

Quick demo:

  • New repository
  • Create repository on Github
  • Add remote
  • Push to Github

demo commands:

  • git log
  • git remote -v
  • git push origin master

Git for small groups

  • The next level is using Github among a research group, or something similarly small.
  • To be a group, you need to work together. To work together, you need a place to do so.
  • Organizations
  • User management: share among a group
  • Issues: Track things to do
  • Pull requests: Code review

Question: I work with Jupyter Nitebooks. Is there an easy way to integrate those into github? thanks

  • great question! I use this locally (nice tool to visually diff and merge notebooks): https://nbdime.readthedocs.io/ but I don't know of a good way to see nice diffs directly on GitHub. I anticipate that GitHub is working on that. Anybody knows some solution?
  • Yeah, diffs not so good right now. I haven't heard of much beyond that, but many people do use git for notebooks, just realize that diffing and merging isn't so easy.
    • the nbdime is great locally for this but would be nice to see it directly in pull requests +1

Community projects: the next level

  • So you have your own group working well. What comes next? The community
  • There is little cost to accepting contributions from others.
  • Minimizing information overload in big community projects.

Important considerations

  • Importance of a license file
    • Don't accept contributions until you get this clarified
  • How to contribute
  • Issue templates, pull request templates, etc.
  • Code of conduct

Comment:

  • It's actually important that issues are not generally viewed as "problems" but more as improvement ideas, etc. cause otherwise some people tend to try to avoid having issues listed.

Long term: archiving and Zenodo

  • Github is the de-facto source for open research software (for better or for worse)
  • Can you cite it in a paper?
  • Can you expect Github to be around in 20 years?
    • More likely than your university's Gitlab or personal webpage. (But does your user still exist?)
  • For permanent storage, connect to Zenodo and publish releases.
    • Zenodo is a EU-funded repository of science.

Video demo of Zenodo link: https://www.youtube.com/watch?v=Atp-GmhS7gY

Actions

  • Github Actions are continuous integration: they can run tests on every commit.
  • Automatic testing on changes: great for making sure things work!
  • Automatic deployment, for example push to git and a website gets updated.

What's next?

Feedback

One good thing about today:

  • The demos were helpful! Thank you!
  • Great introduction! Thank you!
  • .
  • .
  • .

One thing to be improved:

  • .
  • .
  • .
  • .
Select a repo