Git Product home page Git Product logo

20230925-sc-code's Introduction

License: CC BY 4.0

Software Carpentry Workshop Autopush R Code

This repository is used to share code that our instructors explain in the Software Carpentry workshop on 25.- 28.09.2023 by University of Amsterdam & Vrije Universiteit Amsterdam.

Usage for Learners

The repository should mimic the project structure of the R project that has been created by the instructors during the Data Carpentry.

  • In the files list above, find a folder icon with the name of the project that the instructor has created. This folder will likely be called software-carpentry.
  • Go to the file in which the instructor is now coding:
    • Day 1:
      • link to file
    • Day 2:

  • You don't see the most recent lines of code? Refresh the page and see the new commands coming in!

Note: you will only see non-empty folders. You still need to create folders to follow the workshop smoothly.

Usage for Instructors

Instructors can automatically update this repository using gitautopush.

Prerequisites for the setup

To work with the solution Instructors need to have the following setup ready:

  • Python and pip installed
  • Git installed
  • GitHub account added to the repository as a Contributor

Installation and usage

In your local computer:

  • in a first terminal window git clone this repository to create a tracked working directory
  • organize your lesson so that the files you want to share are in this working directory
  • if you already cloned this repository a while ago, git pull to avoid conflicts
  • in a second terminal window, install gitautopush with pip install gitautopush
  • in this second terminal window, start observing the folder with the command: gitautopush --sleep <INT> /path/to/my/repo/folder. <INT> is the amount of time (in seconds) between attempts to synchronise the coding in the local repository and the copy in the remote; a delay of 2-5 seconds is a reasonable estimate to follow the lesson closely
  • save the files in the working directory often and regularly (even automatically). The manual way is with Ctrl+S
  • double check in the second terminal window if gitautopush automatically pushes your changes to the repository: in case of failure, the errors git throws should be inside the message of gitautopush
  • once you finish your lesson, close gitautopush in the second terminal window with Ctrl+C or close the terminal window altogether

Troubleshooting

  • git requires SSH authentication
    • Add SSH agent: write eval $(ssh-agent) followed by ssh-add in your terminal
    • If you don't have SSH key set up yet, set it up without a passphrase (just hit enter when prompted for it)
    • You can try with git clone using https (worked for me but normally not recommended)
  • ValueError: A git status command didn't work, are you sure this is a git repository?
    • It might be occuring when there are already some changes to be staged once you launch gitautopush. First, run gitautopush, then start creating files or making changes to the existing ones.
    • Another thing to try is to first commit and push one file manually to the repository, once you have done that and no changes are staged run gitautopush

This work is licensed under a Creative Commons Attribution 4.0 International License.

20230925-sc-code's People

Contributors

wmotion avatar tijsbliek avatar vansteph avatar

Watchers

Maurice Vanderfeesten avatar Michiel Cock avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.