Difference between revisions of "Code"

From biophysics
Jump to navigation Jump to search
Line 1: Line 1:
 
The code for running experiments and analysing data is all stored on [//gitlab.science.ru.nl gitlab].
 
The code for running experiments and analysing data is all stored on [//gitlab.science.ru.nl gitlab].
 +
 +
==Introduction==
 +
 +
To run experiments in a lab, you will need particular Matlab files that are stored in a [https://gitlab.science.ru.nl/marcw/experiment.git Git repository]
 +
 +
For bachelor/master/PhD students:
 +
* Ask for an administrator (Marc van Wanrooij, [[Technical Support Group|Günter Windau]]) to create a new User Account without administrator rights
 +
* Login to [https://gitlab.science.ru.nl Gitlab]
 +
* Ask for a Git Master (Marc van Wanrooij, Günter Windau) to give you access to the [https://gitlab.science.ru.nl/marcw/experiment.git Git repository] to add you as a Developer (this will allow you to change things without affecting the main repository).
 +
* install Atlassian SourceTree by going to Windows/ProgramFiles/Atlassian and double clicking on sourcetree.exe (this will be your interface with the repository instead of the default terminal/command prompt).
 +
* Clone the [https://gitlab.science.ru.nl/marcw/experiment.git experiment-repository] by clicking on Clone in SourceTree to MATLAB/experiment in your User account Documents folder (all required m-files will now be copied to your folder, i.e. you will own your own local repository)
 +
* Create a new branch of this repository by clicking on Branch in SourceTree, and give it a meaningful name, such as your own first name (this will enable you to edit the m-files and upload/push it to the remote repository, without affecting the main repository).
 +
* Add the local repository to Matlab's path (via ...)
 +
* Start an experiment
 +
 +
At the end of a student's internship (or when relevant), request for a merge (to incorporate all the useful changes you made into the main repository)
 +
  
 
== How can I access Gitlab?==
 
== How can I access Gitlab?==

Revision as of 13:30, 15 June 2023

The code for running experiments and analysing data is all stored on gitlab.

Introduction

To run experiments in a lab, you will need particular Matlab files that are stored in a Git repository

For bachelor/master/PhD students:

  • Ask for an administrator (Marc van Wanrooij, Günter Windau) to create a new User Account without administrator rights
  • Login to Gitlab
  • Ask for a Git Master (Marc van Wanrooij, Günter Windau) to give you access to the Git repository to add you as a Developer (this will allow you to change things without affecting the main repository).
  • install Atlassian SourceTree by going to Windows/ProgramFiles/Atlassian and double clicking on sourcetree.exe (this will be your interface with the repository instead of the default terminal/command prompt).
  • Clone the experiment-repository by clicking on Clone in SourceTree to MATLAB/experiment in your User account Documents folder (all required m-files will now be copied to your folder, i.e. you will own your own local repository)
  • Create a new branch of this repository by clicking on Branch in SourceTree, and give it a meaningful name, such as your own first name (this will enable you to edit the m-files and upload/push it to the remote repository, without affecting the main repository).
  • Add the local repository to Matlab's path (via ...)
  • Start an experiment

At the end of a student's internship (or when relevant), request for a merge (to incorporate all the useful changes you made into the main repository)


How can I access Gitlab?

Login to gitlab with your Science Faculty account. Then ask Marc to gain access to biophysics and biophysics_labs

How can I get (clone) the code from the repository?

You can get the code from the repository in several ways, all with their own advantages.

Download zip-file

Click


How can I get the changes others have made (fetch/pull)?

  • In Github for Windows: the Sync button
  • In Atlassian Sourcetree: the Pull button

How can I put my changes of the code in the repository (commit/push)?

You should have Master rights to be able to upload your changes to the remote repository. If you do not have own, you should work in a branch.

  • In Github for Windows and in Atlassian Source Tree: push the Branch button, and give it a meaningful name (i.e. your first name)

Then you can upload

  • In Github for Windows: Sync
  • In Atlassian SourceTree: stage files - commit - push when commit

Which repositories exist, and what are they for?

Biophysics

For running experiments in the Sphere_lab, to analyse fast eye and head movements, to do bayesian data anaysis, and some other utilities