Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 3.24 KB

File metadata and controls

51 lines (39 loc) · 3.24 KB

License: CC BY 4.0

Data Carpentry for Georpatial data - Notes

Usage Learners

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

  • Go to the file in which the instructor is now coding:
  • 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.
  • data folder will not be available in the repository due to its size.

Usage Instructors

Instructors can automatically update repository using gitautopush.

Prerequisites for the solution

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

Steps

  • pip install gitautopush
  • git clone this repository to your local directory
  • if you have cloned the repository a while ago, git pull to avoid conflicts
  • in terminal, start observing the folder by command: gitautopush /path/to/my/repo/folder
  • you can also setup a delay between live coding and the notes in the repository by adding --sleep <INT> argument, INT being the amount of time (in seconds) to wait in between attempts to synchronize.
  • in the folder of the repository, create a new R script/ Rmarkdown and save the changes
  • see if it automatically pushes to the repository
  • save changes often with Ctrl+S in order for the changes to be pushed o the repository
  • once you finish your lesson, make sure to close gitautopush with Ctrl+C

Troubleshooting

  • git requires SSH authentication
    • Add SSH agent: write eval $(ssh-agent) followed by ssh-add in your terminal
    • If you don't 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.

License: CC BY 4.0