Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • vilem.ded/howto-cards
  • yjarosz/labCards
  • sarah.diehl/howto-cards
  • jacek.lebioda/howto-cards
  • pinar.alper/howto-cards
  • maharshi.vyas/howto-cards
  • manuel.maidorn/howto-cards
  • roland.krause/howto-cards
  • miriam.fougeras/howto-cards
  • soraya.hezzaz/howto-cards
  • fasavanh.sanichanh/howto-cards
  • marie.fossepre/howto-cards
  • jennifer.behm/howto-cards
  • annegrat.daujeumont/howto-cards
  • jon.gales/howto-cards-jpg
  • sandy.thill/howto-cards
  • jenny.tran/howto-cards
17 results
Show changes
Showing
with 254 additions and 0 deletions
external/contribute/markdown/img/r3_logo.png

3.23 KiB

external/contribute/markdown/img/visual-code_img_10.png

6.69 KiB

external/contribute/markdown/img/visual-code_img_18.png

106 KiB

external/contribute/markdown/img/visual-code_img_19.png

741 KiB

external/contribute/markdown/img/visual-code_img_20.png

80 KiB

external/contribute/markdown/img/visual-code_img_9.png

566 B

---
layout: page
permalink: /external/contribute/markdown/
shortcut: contribute:markdown
redirect_from:
- /cards/contribute:markdown
- /external/cards/contribute:markdown
- /contribute/markdown
- /external/external/contribute/markdown/
---
# Markdown
[Markdown](https://daringfireball.net/projects/markdown/) is a lightweight markup language with plain text formatting syntax which became very popular in past decade and which nowadays serves as a standard in various digital communication channels.
## Main features of Markdown
* It has very simple syntax easy to learn.
* It is already widely used in scientific community.
* It separates content from visual presentation so it allows you to focus on writing, not formatting.
* It is a non-proprietary file format.
* It is powerful - allows to format text with very little effort.
* It is portable - since it is actually plain text, it can be opened by literally all text editors.
* It is machine readable - as simple text, markdown documents can be tracked and version using a versioning system (Git, SVN)
* It has small file size.
* It is easy to convert to other formats - existing editors and command line tools (e.g. [Pandoc](https://pandoc.org/) allows for easy conversion between Markdown and other widely used formats like HTML, PDF, docx, LaTeX, etc.
## Quick reference
* The following symbol <img src="img/visual-code_img_9.png" height="20"> behind the file name means that your changes/writing is not saved. Press CTRL+S to save your procedure
* To preview your writing click on:
<img src="img/visual-code_img_10.png">
## Tips to write in Markdown:
| Markdown | Rendered Output |
|:-----------------------------------|---------------------------|
|: <pre># Header 1</pre> | # Header 1
|: <pre>## Header 2</pre> | ## Header 2
|: <pre>### Header 3</pre> | ### Header 3
|: <pre>#### Header 4</pre> | #### Header 4
|:-----------------------------------|---------------------------|
|: <pre>To make a text **bold**: use **double asterisk** or __underscores__</pre> | To make a text **bold**, use **double asterisk** or __underscores__ before and after a word or phrase. |
|:-----------------------------------|---------------------------|
|: <pre>To make a text *italic*: use *one asterisk* or _underscore_.</pre> | To make a text **italic**, use *one asterisk* or _underscore_.|
|:-----------------------------------|---------------------------|
|: Use numbers for ordered lists |
|: ^^<pre>1. First item | ^^ 1. First item
|: ^^1. Second item | ^^ 1. Second item
|: ^^1. Third item | ^^ 1. Third item
|: ^^ 1. Indented item | ^^ 1. Indented item
|: ^^ 1. Indented item | ^^ 1. Indented item
|: ^^1. Fourth item </pre> | ^^1. Fourth item
|:-----------------------------------|---------------------------|
|: For unordered lists use asterisk, minus or plus |
|: ^^<pre>- First item | ^^ - First item
|: ^^- Second item | ^^ - Second item
|: ^^* Third item | ^^ * Third item
|: ^^ * Indented item | ^^ * Indented item
|: ^^ + Indented item | ^^ + Indented item
|: ^^* Fourth item</pre> | ^^ * Fourth item
|:-----------------------------------|---------------------------|
|: Include links referring to a web `[page](https://www.markdownguide.org/)`. Avoid links in format `<link>` as it is not always parsed correctly. | Include links referring to a web [page](https://www.markdownguide.org/). Avoid links in format <link> as it is not always parsed correctly (like in this case).
|:-----------------------------------|---------------------------|
|: Include local pictures using Markdown |
|: ^^<pre>![My awesome picture](img/r3_logo.png)</pre> | ^^ ![My awesome picture](img/r3_logo.png)
|: Or use HTML tag allowing you to alter the image properties (e.g. size) |
|: ^^<pre>&lt; img src="img/r3_logo.png" width="40" &gt;</pre> | ^^<img src="img/r3_logo.png" width="40">
|:-----------------------------------|---------------------------|
|: Include code blocks! |
|: ^^ <pre>\`\`\` | ^^
|: ^^def function(x): | ^^<pre>def function(x):
|: ^^ x+1 | ^^ x+1
|: ^^function(2) | ^^function(2)
|: ^^\`\`\`</pre> | ^^</pre>
|:-----------------------------------|---------------------------|
For creating tables, follow the [Jekyll Spaceship documentation](https://github.com/jeffreytse/jekyll-spaceship).
This is an overview of basic Markdown features. For more in-build features, please see various online [documentation](https://www.markdownguide.org/basic-syntax/).
### Advanced formatting
Plain syntax is usually enough. But special requirements lead to development of many of so called ["flavored" markdown syntaxes](https://github.com/commonmark/commonmark-spec/wiki/markdown-flavors) implementing more formatting functionality such as linking different sections, highlighting blocks of code, table extensions, strikethroughs, ...
Another big advantage of Markdown is that it can contain HTML tags, which makes formatting very flexible.
## When to use Markdown?
* **Documentation** - Markdown is a perfect solution for description of a data package, project folder, workflow or code repository. Using Markdown ensures that the description will be accessible to everyone even after decades while still nicely structured. Guide for writing a good README is not covered by this HowTo page but you can find plenty of resources online, e.g.:
* [Guide](https://data.research.cornell.edu/content/readme) from Cornell University, UK
* [GitHub page](https://github.com/mhucka/readmine) for READMEs in a software repository
* **Blogging and tutorials** - structured document with chunks of code, pictures and results of the analyses can be easily converted to HTML format and posted on personal/team websites.
* **Notes and meeting minutes** - you can use following template for simple and nicely structured meeting notes:
| Markdown | Rendered Output |
|:-----------------------------------|---------------------------|
|: <pre># DocTitle | # DocTitle
|: ^^### Attendees: |: ^^ <h3>Attendees:</h3>
|: ^^### Location: |: ^^ <h3>Location:</h3>
|: ^^## Objective / Agenda |: ^^ <h2>Objective / Agenda</h2>
|: ^^## Meeting Notes |: ^^ <h2>Meeting Notes</h2>
|: ^^ * first note |: ^^ * first note
|: ^^ * second note |: ^^ * second note
|: ^^ * ... |: ^^ * ...
|: ^^## Actions |: ^^ <h2>Actions</h2>
|: ^^- [ ] Josh, Alice and Cindy will do this. |: ^^ - [ ] Josh, Alice and Cindy will do this.
|: ^^- [x] Bob stops doing that. |: ^^ - [x] Bob stops doing that.
|: ^^- [ ] Will and Tom will take care of those </pre> |: ^^ - [ ] Will and Tom will take care of those
* **Analyses, reports and papers** - embedding [R markdown](https://rmarkdown.rstudio.com/) in an R project allows you to include executable code and related text in the very same document. This brings unprecedented level of consistency, shareability and reproducibility into the workflows.
* **Online discussion forums** - many scientific and non-scientific discussion forums and social networks support Markdown for formatting the content of messages (e.g. [StackOverflow](https://stackoverflow.com/editing-help), [GitHub](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax), Reddit or even Facebook)
* **Presentations** - variety of tools support Markdown-powered slide generation, e.g. [reveal.js](https://revealjs.com/#/), [HackerSlides](https://github.com/jacksingleton/hacker-slides) or [landslide](https://github.com/adamzap/landslide)
## Cases when Markdown is not easily applicable
* **Official documents** like legal agreements and project proposals could be in theory written in Markdown but it is not yet accepted by administrative processes.
* **Big structured tables** with multilevel headers or special formatting can be written in HTML editors and then pasted into your Markdown document.
* **Thesis writing** requires support of citation managers and additional formatting. This can be achieved but usually is conditioned by embedding Latex into your workflow.
## Editors
Markdown file can be written in any text editor. There are many editors supporting rendering and live preview, here are some of them:
* Freeware
* Atom
* Dillinger
* Visual Studio Code
* ghostwriter
* Typora
* HackMD
* ...
* Payware:
* iA Writer
* SublimeText
* ByWord
* Online
* [GitHub pages](https://pages.github.com/)
* [stackedit.io](https://stackedit.io)
external/contribute/mirror-fork/img/copy-ssh-key.png

11.8 KiB

external/contribute/mirror-fork/img/img1.png

56.2 KiB

---
layout: page
permalink: /external/contribute/mirror-fork/
shortcut: contribute:mirror-fork
redirect_from:
- /cards/contribute:mirror-fork
- /external/cards/contribute:mirror-fork
- /contribute/mirror-fork
- /external/external/contribute/mirror-fork/
---
# Mirror fork automatically
In order to keep your fork up-to-date automatically with the main (also called `upstream`) repository,
you should follow the follow simple steps.
1. Go to `Settings > Repository` (bottom left of the screen)
2. Expand the section on `Mirroring repositories`
3. In the field `Git repository URL`, enter the SSH clone address from the main repository.
<img src="img/img1.png">
4. Select `Mirror Direction` as `Pull`
5. Click on `Detect Host Keys`
6. `Authentication method` should be selected as `SSH public key`
7. Then, click on the blue button `Mirror repository`
You will see an entry in the table below the blue button. Often, there is an error appearing. Now, in order to be able to perform the mirror, you need to set the SSH key.
1. Copy the SSH public key by clicking on the copy button (next to the sync button) located next to the red paper bin.
<img src="img/copy-ssh-key.png" height="80">
2. Then, browse to your profile picture (top left corner) and click on `Preferences`
3. On the left of the page, click on `SSH Keys`
4. Click on the 'Add new key' button on the SSH keys table
5. Paste the key (using CTRL+V on Windows or CMD+V on macOS) into the SSH key field
6. Click on `Add key`
Now, the synchronization of the fork should perform successfully. You can click on the sync button or wait a few minutes. :white_check_mark:
external/contribute/review/img/img1.png

80.7 KiB

external/contribute/review/img/img2.png

88.6 KiB

external/contribute/review/img/img3.png

9.6 KiB

external/contribute/review/img/img4.png

17.5 KiB

external/contribute/review/img/img5.png

47 KiB

external/contribute/review/img/img6.png

16 KiB

external/contribute/review/img/img7.png

15.6 KiB

external/contribute/review/img/img8.png

1.36 KiB

external/contribute/review/img/img9.png

26.8 KiB

---
layout: page
permalink: /external/contribute/review/
shortcut: contribute:review
redirect_from:
- /cards/contribute:review
- /external/cards/contribute:review
- /contribute/review
- /external/external/contribute/review/
---
# Reviewing in Git
Before a branch can be merged to the *develop* branch, a review is often requested. If you have been desginated as the reviewer of a merge request, it means that your approval is needed to be able to proceed with the merge of the branch.
To do the review, click on the link sent by GitLab. You will be redirected to GitLab and directly on the merge request.
You can see the name of the merge request (*LCSB-SOP-ADM-001*), and the history of the merge request in *Overview*.
- Click on **Changes**
<div align="center">
<img src="img/img1.png">
</div>
- On the left side is the list of the files impacted by this merge request.
A red square next to a file means that the file has been removed.
An orange one means that the file has been modified.
A green one means that the file has been added.
<div align="center">
<img src="img/img2.png">
</div>
- Click on the **.md file**
- *Red sections* have been deleted or modified
- *Green sections* are the modified version of the red sections or are newly added
<div align="center">
<img src="img/img3.png">
</div>
- If there was no change compared to the previously approved the section will not be highlited. If several lines have not been impacted, they might be collapsed. To uncollapse the lines, click on the arrows.
<div align="center">
<img src="img/img4.png">
</div>
To have a more readable view, with the pictures integrated, click on the 3 dots on the right side and click on *View files @ xxxxx*.
<div align="center">
<img src="img/img5.png">
</div>
- To make a comment on a line, place your mouse on the line number and click on the bubble that appears on the left side.
<div align="center">
<img src="img/img6.png">
</div>
- Make your comment on the comment section and click on **Start a review** or on **Add comment now**. Clicking on *"Start a review"* will allow you to compile several comments before an email is sent to the assignee when you will click on **Finish review**. Clicking on *"Add comment now"* will send an email to the assignee for every comment.
Clicking on the first icon will allows you to directly suggest a change that the assignee will be able to accept or not.
<div align="center">
<img src="img/img9.png">
</div>
<div align="center">
<img src="img/img8.png">
</div>
When all the threads are resolved, you will be able to **Approve** the merge request and the repository maintainer will be able to proceed with the merge.
\ No newline at end of file