From d811003844ac648dcb633aabce297eeaec0222e2 Mon Sep 17 00:00:00 2001
From: GATEAU Thibault <thibault.gateau@isae.fr>
Date: Mon, 13 Feb 2023 09:49:34 +0000
Subject: [PATCH] Update readme.md

---
 readme.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 71 insertions(+), 3 deletions(-)

diff --git a/readme.md b/readme.md
index be25571..eb3cfee 100644
--- a/readme.md
+++ b/readme.md
@@ -17,9 +17,9 @@ This set of steps and tools are highly recommended for working with a consistent
 
 5 - tutorials : 
  *  git tutorial
-             - different sort [here](https://gitlab.isae-supaero.fr/hy7one/gitlabadmin/tutos/-/tree/master/tuto-git)
+             - different sort [here](https://gitlab.isae-supaero.fr/saclab/pedagogic_tools/tutorials/-/tree/master/git)
              - (e.g [this one](https://www.youtube.com/watch?v=USjZcfj8yxE))
-             - Windows tutorial [there](https://gitlab.isae-supaero.fr/hy7one/gitlabadmin/tutos/-/blob/master/tuto-git/20221005_gitlab_tutorial_for_students.pdf)
+             - Windows tutorial [there](https://gitlab.isae-supaero.fr/saclab/pedagogic_tools/tutorials/-/raw/master/git/gitlab_tutorial_for_students.pdf?inline=false)
  * markdown (the readme.md of gitlab/github...) [here](https://www.markdownguide.org/cheat-sheet)          
  
 
@@ -39,7 +39,7 @@ This set of steps and tools are highly recommended for working with a consistent
         * use english
         * at least 1 commit + push a day. But as many as you want. Use explicit messages with a "tag" in brackets for your commit messages (e.g: "[dev] implementing awesome feature showing that P = NP ")
         * use latex for your reports (you can use overleaf, but be shure to push src + pdf on your gitlab too)
-        * put large binaries files on the gitlab package. Tutorial [here](https://gitlab.isae-supaero.fr/hy7one/gitlabadmin/process)
+        * put large binaries files on the gitlab package. Tutorial at the end of this readme.
 
 6 - if you are using python, use conda envrionment
 e.g. : 
@@ -71,3 +71,71 @@ use vectorial imaging (pdf) and provide sources (dot, svg, odt, ppt...)
 overleaf.com/learn/latex/Bibliography_management_with_bibtex 
 
 
+# package registry, putting heavy files on gitlab: 
+
+## EN
+
+Traditionally, we avoid putting too big files on the git, especially when it's bianire (not ASCII)
+
+exception for .doc / .ppt / odt / pdf... because it's still practical to manipulate in the git and it evolves a lot...
+
+
+To add a file in package, we'll use curl. First, a token is needed.
+
+ - gitlab -> the project -> settings -> access token
+
+ - choose all scopes
+
+- get a token (as a key) and keep it safe somewhere.
+
+- to add a binary file: 
+
+curl --header "PRIVATE-TOKEN: myToken" --upload-file openmpmpibench_C.tar.gz "https://gitlab.isae-supaero.fr/api/v4/projects/myid/packages/generic/my_package/0.0.1/myname?status=default"
+
+by replacing: myToken => replace with :
+
+your string 'myid' = the id of your project, you can get it when you connect to gitlab click on your project below the project name you'll see "project id" it's a number
+
+'my_package' = the name of the package you want to create (it can be the same as the file name or different it's up to you) 0.0.1 => the version of your package to change if you want
+
+'myname' => the name of the file you want
+
+exemple (just for the  syntaxe): curl --header "PRIVATE-TOKEN: SW-x164HKBkUHyDyFshC" --upload-file JSatOrb_StandAlone_v01.tar.bz2 "https://gitlab.isae-supaero.fr/api/v4/projects/163/packages/generic/JSatOrb_StandAlone/1.0.0/JSatOrb_StandAlone?status=default"
+
+it gives things like that (video of Gérald) :
+
+https://gitlab.isae-supaero.fr/hy7one/presentations/hycube/-/packages/24
+
+## FR 
+
+Traditionally, we avoid putting too big files on the git, especially when it's bianire (not ASCII)
+
+exception for .doc / .ppt / odt / pdf... because it's still practical to manipulate in the git and it evolves a lot...
+
+Guillaume Garrouste nous a fait un tuto pour les placer dans le registry :
+
+Pour ajouter un fichier a un package il faut utiliser curl
+Mais d'abord il faut créer un token
+Donc : settings -> access token
+
+Tu donnes un nom tu coches tout et tu crées
+En retour il va te donner un jeton (a ne pas perdre) sous la forme d'une clé
+Ensuite pour ajouter par exemple un fichier binaire tu feras :
+
+curl --header "PRIVATE-TOKEN: myToken" --upload-file openmpmpibench_C.tar.gz "https://gitlab.isae-supaero.fr/api/v4/projects/myid/packages/generic/my_package/0.0.1/myname?status=default"
+
+en remplacant:
+myToken => remplacer par votre chaine de caractère
+myid = l'id de son projet, on peut la récupérer lorsque on se connecte à gitlab cliquer sur votre projet en dessous du nom du projet vous verrez "identifiant du projet" c'est un numéro
+my_package = le nom du package qu'on veut créer (ça peut être le même que le nom du fichier ou différent c'est à vous de voir)
+0.0.1 => La version de son package à changer si vous voulez
+myname => le nom du fichier qu'on veut
+
+exemple (un exemple bidon vite fait pas cohérent, c'est juste pour la syntaxe):
+curl --header "PRIVATE-TOKEN: SW-x164HKBkUHyDyFshC" --upload-file JSatOrb_StandAlone_v01.tar.bz2 "https://gitlab.isae-supaero.fr/api/v4/projects/163/packages/generic/JSatOrb_StandAlone/1.0.0/JSatOrb_StandAlone?status=default"
+
+it gives things like that (video of Gérald) :
+
+https://gitlab.isae-supaero.fr/hy7one/presentations/hycube/-/packages/24
+
+
-- 
GitLab