User Tools

Site Tools


analysis:nsb2019:week1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
analysis:nsb2019:week1 [2021/06/14 11:51]
mvdm
analysis:nsb2019:week1 [2021/06/14 15:30]
mvdm
Line 1: Line 1:
-~~DISCUSSION~~ 
- 
 ==== Module 1: Setting up ==== ==== Module 1: Setting up ====
  
Line 24: Line 22:
 At MBL, MATLAB should already be installed on lab computers. Verify it starts correctly; you should see its main window open up, including a panel called "​Command Window"​ greeting you with a prompt (''>>''​). At Dartmouth, follow [[https://​tech.dartmouth.edu/​itc/​services-support/​help-yourself/​knowledge-base/​matlab|these instructions]] to install MATLAB. Release 2018a seems to work. At MBL, MATLAB should already be installed on lab computers. Verify it starts correctly; you should see its main window open up, including a panel called "​Command Window"​ greeting you with a prompt (''>>''​). At Dartmouth, follow [[https://​tech.dartmouth.edu/​itc/​services-support/​help-yourself/​knowledge-base/​matlab|these instructions]] to install MATLAB. Release 2018a seems to work.
  
-=== Setting up GitHub ​===+=== Setting up Git ===
  
 Next, we need to obtain some existing MATLAB code that we will build on in this module. To do this, we will use [[http://​www.github.com|GitHub]]. Next, we need to obtain some existing MATLAB code that we will build on in this module. To do this, we will use [[http://​www.github.com|GitHub]].
Line 30: Line 28:
 %%GitHub%% is a system for "​distributed version control":​ it keeps track of changes to a set of files, such as pieces of MATLAB code, with one or more contributors. This system makes it easy to keep track of evolving code, and to share improvements between collaborators. Typical scenarios in which such version control is useful include, for instance, if you want to run the exact code that you used to generate some figure a while ago, but you've since made changes to the code; or the same analysis suddenly gives a different result and you want to track down what change caused it. If you are new to %%GitHub%%, you can watch the video under Resources above to get an overall idea of how it works and why it is useful. %%GitHub%% is a system for "​distributed version control":​ it keeps track of changes to a set of files, such as pieces of MATLAB code, with one or more contributors. This system makes it easy to keep track of evolving code, and to share improvements between collaborators. Typical scenarios in which such version control is useful include, for instance, if you want to run the exact code that you used to generate some figure a while ago, but you've since made changes to the code; or the same analysis suddenly gives a different result and you want to track down what change caused it. If you are new to %%GitHub%%, you can watch the video under Resources above to get an overall idea of how it works and why it is useful.
  
-Meanwhile, download and install the Git client of your choice if you don't already have one installed. This is a piece of software that will allow you to talk to %%GitHub%%, which is where the code is actually stored. For Windows, you can get git [[https://​git-scm.com/​download/​win | here]]. For more detailed info on different Git clients and setting up Git on other operating systems, see [[https://​help.github.com/​articles/​set-up-git|GitHub:​ Set Up Git]]. At some point in  +Meanwhile, download and install the Git client of your choice if you don't already have one installed. This is a piece of software that will allow you to talk to %%GitHub%%, which is where the code is actually stored. For Windows, you can get git [[https://​git-scm.com/​download/​win | here]]. For more detailed info on different Git clients and setting up Git on other operating systems, see [[https://​help.github.com/​articles/​set-up-git|GitHub:​ Set Up Git]].
-the installation process you will be asked for your account information;​ sign up for a [[http://​www.github.com|GitHub account]] if you don't already have one, and post your username in the module Slack channel.+
  
 === Cloning the module codebase === === Cloning the module codebase ===
  
-Now we are ready to use Git to create a local copy ("​clone"​) of the module codebase. On Windows, open a Git Shell, which you can do by typing ''​Git Shell''​ in the search box of the Start menu. Once open, note your working directory (displayed at the prompt of your now opened shell), and change it to a different location if you prefer, using the ``cd`` command. Once you are in an appropriate location, such as a new folder named ''​GitHub''​ on your local machine, type ''​git clone https://​github.com/​vandermeerlab/​nsb2021'',​ which will create a new folder ''​nsb2021''​ in your working directory.+Now we are ready to use Git to create a local copy ("​clone"​) of the module codebase. On Windows, open a PowerShell, which you can do by typing ''​PowerShell''​ in the search box of the Start menu. Once open, note your working directory (displayed at the prompt of your now opened shell), and change it to a different location if you prefer, using the ``cd`` command. Once you are in an appropriate location, such as a new folder named ''​GitHub''​ on your local machine, type ''​git clone https://​github.com/​vandermeerlab/​nsb2021'',​ which will create a new folder ''​nsb2021''​ in your working directory.
  
 Now, verify that the above steps have resulted in the creation of a ''​nsb2021''​ folder with various subfolders and files in it, indicating that you have a local copy of the codebase. Because Git is tracking the contents of this folder, it is now easy to "​pull"​ the latest version from %%GitHub%%: Now, verify that the above steps have resulted in the creation of a ''​nsb2021''​ folder with various subfolders and files in it, indicating that you have a local copy of the codebase. Because Git is tracking the contents of this folder, it is now easy to "​pull"​ the latest version from %%GitHub%%:
Line 46: Line 43:
  
 === A first commit and push ===  === A first commit and push === 
 +
 +To complete this part, sign up for a [[http://​www.github.com|GitHub account]] if you don't already have one, and post your username in the module Slack channel so I can give you permission to write to the code repository.
  
 First, if you haven'​t "done a pull" recently, do one now before starting the next step. First, if you haven'​t "done a pull" recently, do one now before starting the next step.
analysis/nsb2019/week1.txt · Last modified: 2022/06/27 17:02 by mvdm