diff --git a/CONDUCT.md b/CONDUCT.md old mode 100644 new mode 100755 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/DESCRIPTION b/DESCRIPTION old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/docs/acknowledgement.md b/docs/acknowledgement.md old mode 100644 new mode 100755 diff --git a/docs/contact.md b/docs/contact.md old mode 100644 new mode 100755 diff --git a/docs/examples/dropbox.md b/docs/examples/dropbox.md old mode 100644 new mode 100755 diff --git a/docs/index.md b/docs/index.md old mode 100644 new mode 100755 diff --git a/docs/setup/clonedesk.png b/docs/setup/clonedesk.png new file mode 100755 index 0000000..eef5c76 Binary files /dev/null and b/docs/setup/clonedesk.png differ diff --git a/docs/setup/commandLine.md b/docs/setup/commandLine.md old mode 100644 new mode 100755 diff --git a/docs/setup/git-cycle.png b/docs/setup/git-cycle.png new file mode 100755 index 0000000..c82321c Binary files /dev/null and b/docs/setup/git-cycle.png differ diff --git a/docs/setup/git.png b/docs/setup/git.png deleted file mode 100644 index cb1a000..0000000 Binary files a/docs/setup/git.png and /dev/null differ diff --git a/docs/setup/gitInstall.md b/docs/setup/gitInstall.md old mode 100644 new mode 100755 index 3e0bb99..8a8a470 --- a/docs/setup/gitInstall.md +++ b/docs/setup/gitInstall.md @@ -83,101 +83,88 @@ Ensure that you have a version greater than `2.15.0` installed. ## A short instruction for Git -1. Configure +### Before we start - In order to use Github locally, you can configure your user name and email of your Github account in local PC. In your terminal, you can type the following command to configure. +- Configure - ```bash - # set the author name for your commits - git config --global user.name "[name]" - - # set the author email for your commits - git config --global user.email "[email address]" - - # enables colorization for command line output - git config --global color.ui auto - ``` +In order to use Github locally, you can configure your user name and email of your Github account in local PC. In your terminal, you can type the following command to configure. + +```bash +# set the author name for your commits +git config --global user.name "[name]" + +# set the author email for your commits +git config --global user.email "[email address]" +``` + +When you finish the configuration, you can type `git config --list` to check the user information. -2. Create repositories +### A typical workflow - To start, you need to create a new repository once.You can create a local repository and then push to Github, or clone an existing repository from Github to your local PC. +![git-cycle](git-cycle.png) + +1. Create a repository on Github + + To start, you need to create a repository once. You can create a repository on Github and then clone to your local PC. Or you can fork other's repository and then clone to your local PC. + + `New repository` or `fork other's repository` -> copy `git@github.com:username/newrepository.git` -> go to the folder that you want to put the repository locally `cd localfolder` -> ```bash - # create a git repository from a locally existing directory - git init - # clone an existing repository from Github to local PC - git clone "[url]" + git clone git@github.com:username/newrepository.git ``` -3. Branches - - Branches are key tools for version control. Everyone can make changes to his own working branch, and merge their changes to a master branch. You can use `git status` to check your working branch. - - ``` bash - # create a branch [branch-name] - git branch [branch-name] - - # switch to s specific branch [branch-name] - git checkout [branch-name] - - # merge a specific branch [branch] to the working branch - git merge [branch] - - # delete a specific branch [branch-name] - git branch -d [branch-name] - ``` - -4. Make changes +2. Commit local change - Everytime when you make changes to your project, you can use the following command to browse and inspect changes. + Each time when you change you programs, you can record snapshots permanently in version history, so that you can check every version in the future in case. **Commit Frequently!** - ``` bash - # list all version histories of current branch - git log - - # present content differences between two branches [first-branch] vs [second-branch] - git diff [first-branch]...[second-branch] - - # snapshot the file in preparation for versioning - git add [file] - + ```bash # record file snapshots permanently in version history git commit -m "[descriptive message]" ``` -5. Sync + - You can use `git add filename` to store your changed file to the stage first, so that git can save every change for further management. + - You can use `git status` to check the status of all your changes before `git commit`. - Everyone can sync their local changes with the remote repository on Github(usually the online master branch). You can also get changes to your local repository from the remote repository. +3. Push to Github - ``` bash - # download all history from the remote tracking branches - git fetch - - # combine remote tracking branch into current local branch - git merge - + Since you are cooperating with coauthors, you can share your changes by uploading all local branch commits to GitHub. **Push Frequently!** But less frequent than `Commit`. + + ```bash # upload all local branch commits to GitHub git push - - # update your local working branch with all new commits from the remote branch on GitHub - # `git pull` is a combination of `git fetch` and `git merge` - git pull ``` - ![Git](git.png) +### If you prefer graphical UI -6. Reset +The typicla workflow can be realized by graphical *Github Desktop*. [Download GIthub Desktop](https://desktop.github.com). - You may want to reset your changes and replace them with historical version. +- Log in your Github account + +- `file`->`clone repository`->choose `repository` and `local path`, then `clone` + + ![](clonedesk.png) + +- `commit` with a description message on the down left, then `push` on the up right. + + ![](pushdesk.png) - ``` bash - # undo all commits after [commit], preserving changes locally - git reset [commit] - - # drop all history and changes back to the specified commit - git reset --hard [commit] - ``` - +### Branches for Cooperation + +Branches are key tools for version control. Every cooperator can make changes to his own working branch, and merge their changes to a master branch. You can use `git status` to check your working branch. + +``` bash + # create a branch [branch-name] + git branch [branch-name] + + # switch to s specific branch [branch-name] + git checkout [branch-name] + + # merge a specific branch [branch] to the working branch + git merge [branch] + + # delete a specific branch [branch-name] + git branch -d [branch-name] +``` diff --git a/docs/setup/index.md b/docs/setup/index.md old mode 100644 new mode 100755 diff --git a/docs/setup/lyx.md b/docs/setup/lyx.md new file mode 100755 index 0000000..6f41935 --- /dev/null +++ b/docs/setup/lyx.md @@ -0,0 +1,61 @@ +# Installing Lyx + +Lyx is an open source document processor based on the LaTeX. [Download Lyx](https://www.lyx.org/Download). + +## Making Lyx Available on the Command Prompt + +You have just installed Lyx and may need to access Lyx from the command line. + +### Windows users +For you to be able to use Lyx from the command prompt, follow the steps below. + +!!! danger "Making Lyx available via the PATH settings on Windows" + We need to update our PATH settings; these settings are a set of directories that Windows uses to "look up" software to startup. + + - Right-click on Computer. + - Go to "Properties" and select the tab "Advanced System settings". + - Choose "Environment Variables" and select `Path` from the list of system variables. + - Choose `Edit`. + - Environment variable name: LYX_BIN + - **Windows 7 and 8 machines:** + If you chose the default installation directory, copy and paste the following string without spaces at the start or end: + + `c:\Program Files (x86)\Lyx` + + - **Windows 10 machines:** + - Click `New` and paste the following string: + + `c:\Program Files (x86)\Lyx` + + - Click on `OK` as often as needed. + +### Mac users + +For you to be able to use Lyx from the command line, you have to add Lyx to your environmental variables. A tutorial follows. + +!!! danger "Making Lyx available via the PATH settings on Mac" + + - open Terminal + - type `vi ~/.bash_profile` + - add Lyx to the environmental varibles + - type `i` to input mode of vim + - add `export LYX_BIN=/Applications/LyX.app/Contents/MacOS/lyx`. + - press `esc` and type `:w` to save the change + - close the ternimal and reopen one terminal. Then type `source ~/.bash_profile` to bring the new .bash_profile into effect. + - type `$LYX_BIN` to check availability. Remember to type the `$` before `LYX_BIN`. + + + + + +## Verifying that the installation was successful + +To verify that Lyx has been correctly installed and configured via your PATH settings, +open a **new** terminal interface and enter: + +```bash +$LYX_BIN +``` + +followed by hitting the `Return` key. diff --git a/docs/setup/make-intro.md b/docs/setup/make-intro.md old mode 100644 new mode 100755 diff --git a/docs/setup/make.md b/docs/setup/make.md old mode 100644 new mode 100755 diff --git a/docs/setup/matlab.md b/docs/setup/matlab.md old mode 100644 new mode 100755 diff --git a/docs/setup/pandoc.md b/docs/setup/pandoc.md old mode 100644 new mode 100755 diff --git a/docs/setup/path-setting.md b/docs/setup/path-setting.md old mode 100644 new mode 100755 diff --git a/docs/setup/perl.md b/docs/setup/perl.md new file mode 100755 index 0000000..828029f --- /dev/null +++ b/docs/setup/perl.md @@ -0,0 +1,45 @@ +# Installing Perl + +Perl is an open programming language frequently used by engineers. We use Perl for text processing, such as processing tables generated by other statistical softwares. + + + +## Making Stata Available on the Command Prompt + +Perl is already installed on Mac and Linux OS. [Download Perl](https://www.perl.org/get.html) for Windows OS. + +### Windows users + +For you to be able to use Perl from the command prompt, follow the steps below. + +!!! danger "Making Perl available via the PATH settings on Windows" + We need to update our PATH settings; these settings are a set of directories that Windows uses to "look up" software to startup. + + - Right-click on Computer. + - Go to "Properties" and select the tab "Advanced System settings". + - Choose "Environment Variables" and select `Path` from the list of system variables. + - Choose `Edit`. + - **Windows 7 and 8 machines:** + If you chose the default installation directory, copy and paste the following string without spaces at the start or end: + + `;c:\Program Files (x86)\Perl` + + - **Windows 10 machines:** + - Click `New` and paste the following string: + + `c:\Program Files (x86)\Perl` + + - Click on `OK` as often as needed. + +### + +## Verifying that the installation was successful + +To verify that Perl has been correctly installed and configured via your PATH settings, +open a **new** terminal interface and enter: + +```bash +perl -v +``` + +followed by hitting the `Return` key. Perl is successfully installed if you can see the version of Perl in the command line. \ No newline at end of file diff --git a/docs/setup/pushdesk.png b/docs/setup/pushdesk.png new file mode 100755 index 0000000..3d06360 Binary files /dev/null and b/docs/setup/pushdesk.png differ diff --git a/docs/setup/python-more.md b/docs/setup/python-more.md old mode 100644 new mode 100755 diff --git a/docs/setup/python.md b/docs/setup/python.md old mode 100644 new mode 100755 index d4e3f00..a5d82f9 --- a/docs/setup/python.md +++ b/docs/setup/python.md @@ -35,13 +35,13 @@ You should see the following information returned: ### Windows users: ```bash -Python 3.6.5 :: Anaconda, Inc. +Python 3.x.x :: Anaconda, Inc. ``` ### Mac & Linux/Ubuntu users: ```bash -Python 3.6.2 :: Anaconda custom (64-bit) +Python 3.x.x :: Anaconda custom (64-bit) ``` !!! tip "Python 2 versus Python 3" @@ -50,5 +50,5 @@ Python 3.6.2 :: Anaconda custom (64-bit) you might have seen `Python 2.x.x` above. In that case try typing ```python3 --version``` - + instead. Now you should see a message like the one above and are good to go for the course. diff --git a/docs/setup/r.md b/docs/setup/r.md old mode 100644 new mode 100755 diff --git a/docs/setup/r.png b/docs/setup/r.png old mode 100644 new mode 100755 diff --git a/docs/setup/snakemake.md b/docs/setup/snakemake.md old mode 100644 new mode 100755 diff --git a/docs/setup/stata.md b/docs/setup/stata.md old mode 100644 new mode 100755 index 5a45c7d..73baa2a --- a/docs/setup/stata.md +++ b/docs/setup/stata.md @@ -23,10 +23,11 @@ For you to be able to use Stata from the command prompt, follow the steps below. - Go to "Properties" and select the tab "Advanced System settings". - Choose "Environment Variables" and select `Path` from the list of system variables. - Choose `Edit`. + - Environment variable name: STATA_BIN - **Windows 7 and 8 machines:** If you chose the default installation directory, copy and paste the following string without spaces at the start or end: - `;c:\Program Files (x86)\Stata15` + `c:\Program Files (x86)\Stata15` Using a different Stata version? Change the version number then in the path above. @@ -39,20 +40,18 @@ For you to be able to use Stata from the command prompt, follow the steps below. ### Mac users -For you to be able to use Stata from the command line, you have to add Stata to your bash file. A tutorial follows. - -!!! danger "Making Stata available via the PATH settings on Mac" +For you to be able to use Stata from the command line, you have to add Stata to your environmental variables. A tutorial follows. -``` -Step 1: add Stata to bash file -- Open `Terminal`. -- Type `echo "export PATH=$PATH: Your Stata Path" >> ~/.bash_profile`. For example, - `export PATH=$PATH: /Applications/Stata/StataMP.app/Contents/MacOS/ >> ~/.bash_profile` - -Step 2: Evaluate bash changes -- Type `echo $PATH` to check whether Stata is added to your path. -``` +!!! danger "Making Stata available via the PATH settings on Mac" + - open Terminal + - type `vi ~/.bash_profile` + - add Stata to the environmental varibles + - type `i` to input mode of vim + - add `export STATA_BIN=/Applications/Stata/StataMP.app/Contents/MacOS/stataMP`. You may need to replace stataMP to stataSE or so, which depends on which Stata you install on Mac. + - press `esc` and type `:w` to save the change + - close the ternimal and reopen one terminal. Then type `source ~/.bash_profile` to bring the new .bash_profile into effect. + - type `$STATA_BIN -v` to check availability. Remember to type the `$` before `STATA_BIN`.