diff --git a/documents/tuto_emacs_windows/.gitkeep b/documents/tuto_emacs_windows/.gitkeep new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/documents/tuto_emacs_windows/images/.gitkeep b/documents/tuto_emacs_windows/images/.gitkeep new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/documents/tuto_emacs_windows/images/commandeR1.png b/documents/tuto_emacs_windows/images/commandeR1.png new file mode 100755 index 0000000000000000000000000000000000000000..4cf2b5ff05a2aba5d8d54628766298114e8355c6 Binary files /dev/null and b/documents/tuto_emacs_windows/images/commandeR1.png differ diff --git a/documents/tuto_emacs_windows/images/commandeR2.png b/documents/tuto_emacs_windows/images/commandeR2.png new file mode 100755 index 0000000000000000000000000000000000000000..4ed015d5321b05ae187d88bc7df726f2ada4aad8 Binary files /dev/null and b/documents/tuto_emacs_windows/images/commandeR2.png differ diff --git a/documents/tuto_emacs_windows/images/commande_python.png b/documents/tuto_emacs_windows/images/commande_python.png new file mode 100755 index 0000000000000000000000000000000000000000..e7ccc55e56c433fea4063fd607c0d3ef70430a52 Binary files /dev/null and b/documents/tuto_emacs_windows/images/commande_python.png differ diff --git a/documents/tuto_emacs_windows/images/completion.png b/documents/tuto_emacs_windows/images/completion.png new file mode 100755 index 0000000000000000000000000000000000000000..90d4782532cb4ef231d8aee89ef52ed46d9c3a54 Binary files /dev/null and b/documents/tuto_emacs_windows/images/completion.png differ diff --git a/documents/tuto_emacs_windows/images/ctrl_c_c.png b/documents/tuto_emacs_windows/images/ctrl_c_c.png new file mode 100755 index 0000000000000000000000000000000000000000..f19f65b757dbf7b4e4b1a05ac090f272c8433bf6 Binary files /dev/null and b/documents/tuto_emacs_windows/images/ctrl_c_c.png differ diff --git a/documents/tuto_emacs_windows/images/emacs.png b/documents/tuto_emacs_windows/images/emacs.png new file mode 100755 index 0000000000000000000000000000000000000000..8c5057d446f9b567bffe0693e36734c0d4e8ebf0 Binary files /dev/null and b/documents/tuto_emacs_windows/images/emacs.png differ diff --git a/documents/tuto_emacs_windows/images/graphiqueR.png b/documents/tuto_emacs_windows/images/graphiqueR.png new file mode 100755 index 0000000000000000000000000000000000000000..d947e5c16d1f064b60efaa2f60338048a7a088c2 Binary files /dev/null and b/documents/tuto_emacs_windows/images/graphiqueR.png differ diff --git a/documents/tuto_emacs_windows/images/install_matplotlib.png b/documents/tuto_emacs_windows/images/install_matplotlib.png new file mode 100755 index 0000000000000000000000000000000000000000..2a699f6b2c443dd6d82572844c2f04a65669fbe6 Binary files /dev/null and b/documents/tuto_emacs_windows/images/install_matplotlib.png differ diff --git a/documents/tuto_emacs_windows/images/matplotlib.png b/documents/tuto_emacs_windows/images/matplotlib.png new file mode 100755 index 0000000000000000000000000000000000000000..25c8c417019af25b8c9d84845844d23939762f8b Binary files /dev/null and b/documents/tuto_emacs_windows/images/matplotlib.png differ diff --git a/documents/tuto_emacs_windows/images/org_mode.png b/documents/tuto_emacs_windows/images/org_mode.png new file mode 100755 index 0000000000000000000000000000000000000000..ad5e1ef3b67a417a6fa38ff56beddbf4d1d2b154 Binary files /dev/null and b/documents/tuto_emacs_windows/images/org_mode.png differ diff --git a/documents/tuto_emacs_windows/images/python1.png b/documents/tuto_emacs_windows/images/python1.png new file mode 100755 index 0000000000000000000000000000000000000000..dd8c83746bee2e96c9b73b07701b754246dea1ce Binary files /dev/null and b/documents/tuto_emacs_windows/images/python1.png differ diff --git a/documents/tuto_emacs_windows/images/python2.png b/documents/tuto_emacs_windows/images/python2.png new file mode 100755 index 0000000000000000000000000000000000000000..2eabd836c29e11ecd6f83c2a80908fbb0e483bc9 Binary files /dev/null and b/documents/tuto_emacs_windows/images/python2.png differ diff --git a/documents/tuto_emacs_windows/images/python3.png b/documents/tuto_emacs_windows/images/python3.png new file mode 100755 index 0000000000000000000000000000000000000000..8b508bf3a0e8eed0c57d05aa56edc6ab1cc64ec5 Binary files /dev/null and b/documents/tuto_emacs_windows/images/python3.png differ diff --git a/documents/tuto_emacs_windows/images/python4.png b/documents/tuto_emacs_windows/images/python4.png new file mode 100755 index 0000000000000000000000000000000000000000..97c3226cf22cbd9eaaab1e670d9998e0723b0e61 Binary files /dev/null and b/documents/tuto_emacs_windows/images/python4.png differ diff --git a/documents/tuto_emacs_windows/images/scratch.png b/documents/tuto_emacs_windows/images/scratch.png new file mode 100755 index 0000000000000000000000000000000000000000..14e13a41dddcebab6c6767e07648a959994cb87c Binary files /dev/null and b/documents/tuto_emacs_windows/images/scratch.png differ diff --git a/documents/tuto_emacs_windows/images/shell.png b/documents/tuto_emacs_windows/images/shell.png new file mode 100755 index 0000000000000000000000000000000000000000..db6a2829e9577b52c9127cd3b9776329f757b554 Binary files /dev/null and b/documents/tuto_emacs_windows/images/shell.png differ diff --git a/documents/tuto_emacs_windows/tuto_emacs_windows.md b/documents/tuto_emacs_windows/tuto_emacs_windows.md new file mode 100755 index 0000000000000000000000000000000000000000..cae741fca88be88472f90148b7fbca14f39fa248 --- /dev/null +++ b/documents/tuto_emacs_windows/tuto_emacs_windows.md @@ -0,0 +1,165 @@ +1. [Installation et configuration des différents outils](https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_emacs_windows/tuto_emacs_windows.md#1-installation-et-configuration-des-diff%C3%A9rents-outils) + 1. [Installer et configurer Emacs](https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_emacs_windows/tuto_emacs_windows.md#11-installer-et-configurer-emacs) + 2. [Ajouter les chemins de R et Python dans dans la variable PATH de Windows](https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_emacs_windows/tuto_emacs_windows.md#12-ajouter-les-chemins-de-r-et-python-dans-dans-la-variable-path-de-windows) + 3. [Installer et configurer matplotlib (librairie graphique Python)](https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_emacs_windows/tuto_emacs_windows.md#13-installer-et-configurer-matplotlib-librairie-graphique-python) +2. [Utilisation d'Emacs](https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_emacs_windows/tuto_emacs_windows.md#2-utilisation-demacs) + 1. [Exécuter des commandes dos](https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_emacs_windows/tuto_emacs_windows.md#21-ex%C3%A9cuter-des-commandes-dos) + 2. [Exécuter du code R](https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_emacs_windows/tuto_emacs_windows.md#22-ex%C3%A9cuter-du-code-r) + 3. [Exécuter du code Python](https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_emacs_windows/tuto_emacs_windows.md#23-ex%C3%A9cuter-du-code-python) + 4. [Écrire dans le journal](https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_emacs_windows/tuto_emacs_windows.md#24-%C3%89crire-dans-le-journal) + +# **1 Installation et configuration des différents outils** + +## 1.1 Installer et configurer Emacs + +- Installer [Emacs modifié pour Windows](https://vigou3.github.io/emacs-modified-windows/) + - version 26.1 pour Windows 64 bits + - version 25.2 pour Windows 32 bits + +- Télécharger le fichier [rr_org_archive.tgz](https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/raw/master/module2/ressources/rr_org_archive.tgz) + +*NB : Avec 7z il faut décompresser l'archive deux fois : une première fois crée une archive `rr_org_archive.tar` et une deuxième fois crée un dossier `rr_org` contenant les fichiers `init.el` et `journal.org`.* + +- Lancer Emacs + +![emacs](documents/tuto_emacs_windows/images/emacs.png) + +- Emacs crée le répertoire `C:\Users\***\.emacs.d` + +*NB : Le répertoire est créé au premier lancement d'Emacs.* + +- Placer le fichier `init.el` dedans + +- Lancer Emacs + +![scratch](documents/tuto_emacs_windows/images/scratch.png) + +- Exécuter la commande suivante pour installer `htmlize` + +``` +M-x package-install RET htmlize RET +``` + +- Créer un dossier `C:\Users\***\org` dans l'explorateur Windows + +- Placer le fichier `journal.org` dedans + +--- + +## 1.2 Ajouter les chemins de R et Python dans dans la variable PATH de Windows + +La façon de procéder est très bien expliquée [ici](http://sametmax.com/ajouter-un-chemin-a-la-variable-denvironnement-path-sous-windows/). + +--- + +## 1.3 Installer et configurer matplotlib (librairie graphique Python) + +- Installer la librairie `matplotlib` + + - Ouvrir une invite de commande dos + - Exécuter la commande suivante + +``` +python -m pip install -U matplotlib +``` + +![install_matplotlib](documents/tuto_emacs_windows/images/install_matplotlib.png) + +- Désactiver les plots interactifs dans matplotlib + +Pour ce faire, il faut d'abord savoir où se trouve le fichier de configuration de matplotlib sous Windows. + +Exécuter le code suivant sous Python + +``` +import matplotlib +matplotlib.matplotlib_fname() +``` + +![matplotlib](documents/tuto_emacs_windows/images/matplotlib.png) + +Ouvrir le fichier `matplotlibrc` et ajouter un `#` devant la ligne qui commence par `backend`, ce qui correspond à utiliser la valeur par défaut `Agg` + +--- + +## 1.4 Installer MiKTeX + +Télécharger et installer [MiKTeX](https://miktex.org/download) en choisissant le bon système d'exploitation. +Vous serez amené à installer différents packages lors du premier export pdf. + +--- +--- + +# **2 Utilisation d'Emacs** + +## 2.1 Exécuter des commandes dos + +- Lancer Emacs + +- Créer un fichier toto.org dans l'explorateur Windows + +- Ouvrir le fichier toto.org dans Emacs et saisir ``, `RET` à la touche `` + +# 2 Lancer Magit + +- Ouvrir un fichier et exécuter le racourci `C-x g` + +- Magit demande le chemin du répertoire Git + +- Indiquer le chemin du répertoire mooc-rr + +![git1](documents/tuto_magit/images/git1.png) \ No newline at end of file diff --git a/documents/tuto_rstudio_gitlab/.gitkeep b/documents/tuto_rstudio_gitlab/.gitkeep new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/documents/tuto_rstudio_gitlab/images/.gitkeep b/documents/tuto_rstudio_gitlab/images/.gitkeep new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/documents/tuto_rstudio_gitlab/images/adresse_depot.png b/documents/tuto_rstudio_gitlab/images/adresse_depot.png new file mode 100755 index 0000000000000000000000000000000000000000..684b44f96d93fa06e11b78c5d76463ff8a655c2d Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/adresse_depot.png differ diff --git a/documents/tuto_rstudio_gitlab/images/clone.png b/documents/tuto_rstudio_gitlab/images/clone.png new file mode 100755 index 0000000000000000000000000000000000000000..15e114e2d61116e094d51560efaf467574072b1c Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/clone.png differ diff --git a/documents/tuto_rstudio_gitlab/images/commit.png b/documents/tuto_rstudio_gitlab/images/commit.png new file mode 100755 index 0000000000000000000000000000000000000000..28734012e7d203634959cdd038779dd44c6c0097 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/commit.png differ diff --git a/documents/tuto_rstudio_gitlab/images/commit2.png b/documents/tuto_rstudio_gitlab/images/commit2.png new file mode 100755 index 0000000000000000000000000000000000000000..0c26431fe55b199e5bbf869c24d43f8a5323ec8e Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/commit2.png differ diff --git a/documents/tuto_rstudio_gitlab/images/commit3.png b/documents/tuto_rstudio_gitlab/images/commit3.png new file mode 100755 index 0000000000000000000000000000000000000000..20f3a13e74efa4e0fc92a9fb5c38ea7adae29888 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/commit3.png differ diff --git a/documents/tuto_rstudio_gitlab/images/commit4.png b/documents/tuto_rstudio_gitlab/images/commit4.png new file mode 100755 index 0000000000000000000000000000000000000000..1e18eff4e27724f3b64d38a73535c964d9922673 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/commit4.png differ diff --git a/documents/tuto_rstudio_gitlab/images/commit5.png b/documents/tuto_rstudio_gitlab/images/commit5.png new file mode 100755 index 0000000000000000000000000000000000000000..514ec36856d919fe20f2762cd5783c5b0c490b06 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/commit5.png differ diff --git a/documents/tuto_rstudio_gitlab/images/git.png b/documents/tuto_rstudio_gitlab/images/git.png new file mode 100755 index 0000000000000000000000000000000000000000..290631cae3df2c22786cda60a1a9fa8b95598189 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/git.png differ diff --git a/documents/tuto_rstudio_gitlab/images/new_project.png b/documents/tuto_rstudio_gitlab/images/new_project.png new file mode 100755 index 0000000000000000000000000000000000000000..27a245e7fd062e666317f5e9172b6db7b4e85782 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/new_project.png differ diff --git a/documents/tuto_rstudio_gitlab/images/password_proxy.png b/documents/tuto_rstudio_gitlab/images/password_proxy.png new file mode 100755 index 0000000000000000000000000000000000000000..2c377c0387174efaa1a8b51f6d1fa28dc5066450 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/password_proxy.png differ diff --git a/documents/tuto_rstudio_gitlab/images/push.png b/documents/tuto_rstudio_gitlab/images/push.png new file mode 100755 index 0000000000000000000000000000000000000000..5e4b0190156fc9e342656f4b25a47d099dc3a288 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/push.png differ diff --git a/documents/tuto_rstudio_gitlab/images/push2.png b/documents/tuto_rstudio_gitlab/images/push2.png new file mode 100755 index 0000000000000000000000000000000000000000..9e0352d7e3ac45c3fdf92f770e69f8a2865a7915 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/push2.png differ diff --git a/documents/tuto_rstudio_gitlab/images/push3.png b/documents/tuto_rstudio_gitlab/images/push3.png new file mode 100755 index 0000000000000000000000000000000000000000..2aef7e727965bbc425f9843813335a20a41f2f09 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/push3.png differ diff --git a/documents/tuto_rstudio_gitlab/images/push4 - Copie.png b/documents/tuto_rstudio_gitlab/images/push4 - Copie.png new file mode 100755 index 0000000000000000000000000000000000000000..7b27dfceeb87ce3864f6377661f81ae9b1d00816 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/push4 - Copie.png differ diff --git a/documents/tuto_rstudio_gitlab/images/push4.png b/documents/tuto_rstudio_gitlab/images/push4.png new file mode 100755 index 0000000000000000000000000000000000000000..7b27dfceeb87ce3864f6377661f81ae9b1d00816 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/push4.png differ diff --git a/documents/tuto_rstudio_gitlab/images/rstudio.png b/documents/tuto_rstudio_gitlab/images/rstudio.png new file mode 100755 index 0000000000000000000000000000000000000000..f856d763e49e05c6545936de70d335361c90dd41 Binary files /dev/null and b/documents/tuto_rstudio_gitlab/images/rstudio.png differ diff --git a/documents/tuto_rstudio_gitlab/tuto_rstudio_gitlab.md b/documents/tuto_rstudio_gitlab/tuto_rstudio_gitlab.md new file mode 100755 index 0000000000000000000000000000000000000000..b126e7607f4dfe877ca1d0f8e520f2444397aceb --- /dev/null +++ b/documents/tuto_rstudio_gitlab/tuto_rstudio_gitlab.md @@ -0,0 +1,92 @@ +# Dans Git + +- Enregistrer l'email et le nom de l'utilisateur + +``` +git config --global --user.email you@example.com +git config --global --user.name Your Name +``` + +NB : Ne pas mettre de guillemets. + +Ces deux paramètres sont obligatoire pour pouvoir commiter sinon on obtient le message suivant + +![commit3](documents/tuto_rstudio_gitlab/images/commit3.png) + +- Si vous êtes derrière un proxy, il faut le définir dans Git + +``` +git config --global http.proxy http://proxy.server.com:port +``` + +On peut aussi définir le proxyUsername pour n'avoir que le mot de passe à saisir + +``` +git config --global http.proxy http://proxyUsername@proxy.server.com:port +``` + +- Option pour que le login et mot de passe soient enregistrés pendant 1 heure + +``` +git config --global credential.helper "cache --timeout=3600" +``` + +# Dans RStudio + +- File / New Project / Version Control + +![new_project](documents/tuto_rstudio_gitlab/images/new_project.png) + +![git](documents/tuto_rstudio_gitlab/images/git.png) + +- Récupérer l'adresse du dépôt + +![adresse_depot](documents/tuto_rstudio_gitlab/images/adresse_depot.png) + +- Indiquer l'adresse du dépôt dans le champ "Repository URL" +- Il est possible de faire précéder l'adresse du dépôt par `xxx@`, xxx étant l'identifiant Gitlab, pour ne pas avoir à le renseigner par la suite + +![clone](documents/tuto_rstudio_gitlab/images/clone.png) + +- Si vous êtes derrière un proxy, il faut le définir dans Git +- Git demande le mot de passe du proxy + +![password_proxy](documents/tuto_rstudio_gitlab/images/password_proxy.png) + +- Git se connecte à Gitlab et récupère l'ensemble des données + +- RStudio redémarre pour se placer dans un mode lié à Git + +![rstudio](documents/tuto_rstudio_gitlab/images/rstudio.png) + +- Module2 / exo1 / toy_document.Rmd + +- Modifier le fichier + +- Sauvegarder + +- Aller dans Git pour effectuer le commit + +![commit](documents/tuto_rstudio_gitlab/images/commit.png) + +![commit2](documents/tuto_rstudio_gitlab/images/commit2.png) + +- Sélectionner les lignes à commiter puis cliquer sur "commit" + +![commit5](documents/tuto_rstudio_gitlab/images/commit5.png) + +Les modifications sont pour l'instant uniquement sur la machine. Elles n'ont pas été propagées sur Gitlab. + +- Cliquer sur "push" pour les propager sur Gitlab + +![push](documents/tuto_rstudio_gitlab/images/push.png) + +![push2](documents/tuto_rstudio_gitlab/images/push2.png) + +![push3](documents/tuto_rstudio_gitlab/images/push3.png) + +- NB : Il n'est pas possible de synchroniser vers Gitlab si des modifications ont été faites sur Gitlab et n'ont pas été répercupées en local + +![push4](documents/tuto_rstudio_gitlab/images/push4.png) + +- Cliquer sur "pull" pour synchroniser Gitlab vers Git \ No newline at end of file