Skip to content

Commit 580cba7

Browse files
authored
Multilingual version as quarto profile (#533)
* Add profiles * First test * project * csv no commit * up * multilingual numpy * switch * finalizing * up * Modularisation * no if * intro * render all * format * replace master by main
1 parent 101465f commit 580cba7

40 files changed

Lines changed: 1851 additions & 630 deletions

.github/workflows/manual-test.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,9 @@ jobs:
6464
conda list
6565
- name: Convert in ipynb with Quarto
6666
run: |
67-
rm -f _quarto.yml
68-
cp _quarto-prod.yml _quarto.yml
67+
export QUARTO_PROFILE=fr,en
6968
quarto --version
70-
git diff --name-only origin/master origin/${GITHUB_HEAD_REF} >> diff
69+
git diff --name-only origin/main origin/${GITHUB_HEAD_REF} >> diff
7170
python build/tweak_render.py
7271
python build/pimp_notebook.py
7372
quarto render content --to ipynb

.github/workflows/netlify-test.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@ jobs:
2121
run: git config --global --add safe.directory /__w/python-datascientist/python-datascientist
2222
- name: Render website
2323
run: |
24-
rm -f _quarto.yml
25-
cp _quarto-prod.yml _quarto.yml
24+
export QUARTO_PROFILE=dev
2625
quarto --version
27-
git diff --name-only origin/master origin/${GITHUB_HEAD_REF} | grep -v '/_' >> diff
2826
python build/append_environment.py
2927
python build/tweak_render.py
30-
cat _quarto.yml
3128
quarto render --to html
3229
- name: Install npm
3330
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
@@ -67,10 +64,8 @@ jobs:
6764
conda list
6865
- name: Convert in ipynb with Quarto
6966
run: |
70-
rm -f _quarto.yml
71-
cp _quarto-prod.yml _quarto.yml
67+
export QUARTO_PROFILE=dev
7268
quarto --version
73-
git diff --name-only origin/master origin/${GITHUB_HEAD_REF} | grep -v '/_' >> diff
7469
python build/tweak_render.py
7570
python build/pimp_notebook.py
7671
quarto render content --to ipynb

.github/workflows/prod.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,11 @@ jobs:
5656
run: git config --global --add safe.directory /__w/python-datascientist/python-datascientist
5757
- name: Render website
5858
run: |
59-
rm -f _quarto.yml
60-
cp _quarto-prod.yml _quarto.yml
59+
export QUARTO_PROFILE=fr,en
6160
python build/append_environment.py
6261
quarto render --to html
6362
- name: Publish to Pages
64-
if: github.ref == 'refs/heads/master'
63+
if: github.ref == 'refs/heads/main'
6564
run: |
6665
git config --global user.email quarto-github-actions-publish@example.com
6766
git config --global user.name "Quarto GHA Workflow Runner"
@@ -88,12 +87,7 @@ jobs:
8887
conda list
8988
- name: Convert in ipynb with Quarto
9089
run: |
91-
rm -f _quarto.yml
92-
cp _quarto-prod.yml _quarto.yml
93-
find content -type f -name "*.qmd" ! -name "_*" >> diff
94-
cat diff
95-
python build/tweak_render.py
96-
python build/pimp_notebook.py
90+
export QUARTO_PROFILE=fr,en
9791
quarto render content --to ipynb
9892
mkdir -p temp_notebooks
9993
mkdir -p temp_notebooks/notebooks

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
_book/
33
_site/
44
*index.ipynb
5+
*.csv
56
*.parquet
67
*.ipynb
78
*.ipynb_checkpoints/
@@ -11,6 +12,7 @@ site_libs/
1112
.jupyter_cache/
1213
_freeze/
1314
content/manipulation/cog_2023.csv
15+
*_black_formatted.py
1416

1517
*.png
1618
*.jpg

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[![build-doc Actions Status](https://github.com/linogaliana/python-datascientist/actions/workflows/prod.yml/badge.svg)](https://github.com/linogaliana/python-datascientist/actions)
44

5-
<a href="https://github.com/linogaliana/python-datascientist/blob/master/notebooks/course/manipulation/01_numpy.ipynb" class="github"><i class="fab fa-github"></i></a>
6-
<a href="https://downgit.github.io/#/home?url=https://github.com/linogaliana/python-datascientist/blob/master/notebooks/course/manipulation/01_numpy.ipynb" target="_blank" rel="noopener"><img src="https://img.shields.io/badge/Download-Notebook-important?logo=Jupyter" alt="Download"></a>
7-
<a href="https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/notebooks/course/manipulation/01_numpy.ipynb" target="_blank" rel="noopener"><img src="https://img.shields.io/badge/Visualize-nbviewer-blue?logo=Jupyter" alt="nbviewer"></a>
5+
<a href="https://github.com/linogaliana/python-datascientist/blob/main/notebooks/course/manipulation/01_numpy.ipynb" class="github"><i class="fab fa-github"></i></a>
6+
<a href="https://downgit.github.io/#/home?url=https://github.com/linogaliana/python-datascientist/blob/main/notebooks/course/manipulation/01_numpy.ipynb" target="_blank" rel="noopener"><img src="https://img.shields.io/badge/Download-Notebook-important?logo=Jupyter" alt="Download"></a>
7+
<a href="https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/main/notebooks/course/manipulation/01_numpy.ipynb" target="_blank" rel="noopener"><img src="https://img.shields.io/badge/Visualize-nbviewer-blue?logo=Jupyter" alt="nbviewer"></a>
88
<a href="https://datalab.sspcloud.fr/launcher/ide/jupyter-python?autoLaunch=true&onyxia.friendlyName=%C2%ABpython-datascience%C2%BB&init.personalInit=%C2%ABhttps%3A%2F%2Fraw.githubusercontent.com%2Flinogaliana%2Fpython-datascientist%2Fmaster%2Fsspcloud%2Finit-jupyter.sh%C2%BB&init.personalInitArgs=%C2%ABmanipulation%2001_numpy%C2%BB&security.allowlist.enabled=false" target="_blank" rel="noopener"><img src="https://img.shields.io/badge/SSPcloud-Tester%20via%20SSP--cloud-informational&amp;color=yellow?logo=Python" alt="Onyxia"></a><br>
9-
<a href="http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/notebooks/course/manipulation/01_numpy.ipynb" target="_blank" rel="noopener"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
9+
<a href="http://colab.research.google.com/github/linogaliana/python-datascientist/blob/main/notebooks/course/manipulation/01_numpy.ipynb" target="_blank" rel="noopener"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
1010

1111

1212
[![DOI](https://zenodo.org/badge/280161677.svg)](https://zenodo.org/badge/latestdoi/280161677)
@@ -97,7 +97,7 @@ Les _notebooks_ sont générés de manière à être cohérente avec le site web
9797
et sont maintenant stockés sur un [dépôt à part](https://github.com/linogaliana/python-datascientist-notebooks).
9898

9999
L'environnement `Conda` nécessaire pour faire tourner l'ensemble du
100-
cours est disponible dans un fichier [`environment.yml`](https://github.com/linogaliana/python-datascientist-docker/blob/master/environment.yml).
100+
cours est disponible dans un fichier [`environment.yml`](https://github.com/linogaliana/python-datascientist-docker/blob/main/environment.yml).
101101
Il est recommandé d'utiliser la `conda-forge` afin de bénéficier de versions
102102
récentes des packages.
103103
</details>

_quarto-dev.yml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
project:
2+
type: website
3+
render:
4+
- index.qmd
5+
- content/getting-started/index.qmd
6+
- content/getting-started/01_installation.qmd
7+
- content/getting-started/02_DS_environment.qmd
8+
- content/getting-started/03_data_analysis.qmd
9+
- content/getting-started/04_python_practice.qmd
10+
- content/getting-started/05_rappels_types.qmd
11+
- content/getting-started/06_rappels_fonctions.qmd
12+
- content/getting-started/07_rappels_classes.qmd
13+
- content/manipulation/index.qmd
14+
- content/manipulation/01_numpy.qmd
15+
- content/manipulation/01_numpy_en.qmd
16+
- content/visualisation/index.qmd
17+
- content/modelisation/index.qmd
18+
- content/NLP/index.qmd
19+
- content/annexes/evaluation.qmd
20+
21+
website:
22+
title: "Python pour la data science"
23+
page-footer:
24+
left: |
25+
Python pour la _data science_, Lino Galiana.<br>
26+
Licence {{< fa brands creative-commons >}}<br>
27+
Code source disponible sur [`Github`](https://github.com/linogaliana/python-datascientist)
28+
right: |
29+
Site construit avec {{< fa brands python >}} et [`Quarto`](https://quarto.org/)<br>
30+
Inspiration pour la mise en forme du site [ici](https://www.andreashandel.com)<br>
31+
[Code source disponible sur {{< fa brands github >}} `GitHub`](https://github.com/linogaliana/python-datascientist)
32+
33+
34+
sidebar:
35+
- id: home
36+
title: "Homepage"
37+
href: index.qmd
38+
- id: introduction
39+
title: "Introduction"
40+
#collapse-level: 2
41+
contents:
42+
- content/getting-started/index.qmd
43+
- content/getting-started/01_installation.qmd
44+
- content/getting-started/02_DS_environment.qmd
45+
- content/getting-started/03_data_analysis.qmd
46+
- content/getting-started/04_python_practice.qmd
47+
- content/getting-started/05_rappels_types.qmd
48+
- content/getting-started/06_rappels_fonctions.qmd
49+
- content/getting-started/07_rappels_classes.qmd
50+
- id: manipulation
51+
title: "Manipuler"
52+
#collapse-level: 2
53+
contents:
54+
- href: content/manipulation/index.qmd
55+
text: "Introduction"
56+
- content/manipulation/01_numpy.qmd
57+
- content/manipulation/02_pandas_intro.qmd
58+
- content/manipulation/02_pandas_suite.qmd
59+
- content/manipulation/03_geopandas_intro.qmd
60+
- content/manipulation/04a_webscraping_TP.qmd
61+
- content/manipulation/04c_API_TP.qmd
62+
- content/manipulation/04b_regex_TP.qmd
63+
- id: communication
64+
title: "Communiquer"
65+
#collapse-level: 2
66+
contents:
67+
- href: content/visualisation/index.qmd
68+
text: "Introduction"
69+
- content/visualisation/matplotlib.qmd
70+
- content/visualisation/maps.qmd
71+
- id: modelisation
72+
title: "Modéliser"
73+
#collapse-level: 2
74+
contents:
75+
- href: content/modelisation/index.qmd
76+
text: "Introduction"
77+
- content/modelisation/0_preprocessing.qmd
78+
- content/modelisation/1_modelevaluation.qmd
79+
- content/modelisation/2_SVM.qmd
80+
- content/modelisation/3_regression.qmd
81+
- content/modelisation/4_featureselection.qmd
82+
- content/modelisation/5_clustering.qmd
83+
- content/modelisation/6_pipeline.qmd
84+
- content/modelisation/7_mlapi.qmd
85+
- id: NLP
86+
title: "NLP"
87+
#collapse-level: 2
88+
contents:
89+
- href: content/NLP/index.qmd
90+
text: "Introduction"
91+
- content/NLP/01_intro.qmd
92+
- content/NLP/02_exoclean.qmd
93+
- content/NLP/03_lda.qmd
94+
- content/NLP/04_word2vec.qmd
95+
- content/NLP/05_exo_supp.qmd
96+
- id: modern
97+
title: "Approfondissements"
98+
#collapse-level: 2
99+
contents:
100+
- href: content/modern-ds/index.qmd
101+
text: "Introduction"
102+
- content/modern-ds/continuous_integration.qmd
103+
- content/modern-ds/dallE.qmd
104+
- content/modern-ds/s3.qmd
105+
- content/modern-ds/elastic_approfondissement.qmd
106+
- content/modern-ds/elastic_intro.qmd
107+
- id: git
108+
title: "Git"
109+
#collapse-level: 2
110+
contents:
111+
- href: content/git/index.qmd
112+
text: "Introduction"
113+
- content/git/introgit.qmd
114+
- content/git/exogit.qmd
115+
- id: appendix
116+
title: "Annexes"
117+
#collapse-level: 2
118+
contents:
119+
- content/annexes/evaluation.qmd
120+
- content/annexes/corrections.qmd
121+
- href: https://linogaliana.github.io/python-datascientist-slides/#/title-slide
122+
text: "Slides de présentation"
123+
124+
125+
citation:
126+
title: "Python pour la data science"
127+
author: Lino Galiana
128+
type: book
129+
doi: "10.5281/zenodo.8229676"
130+
url: https://pythonds.linogaliana.fr/
131+
issued: 2023
132+

_quarto-en.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
project:
2+
type: website
3+
output-dir: "./_site/en"
4+
render:
5+
- index.qmd
6+
# English content
7+
- content/manipulation/01_numpy.qmd
8+
- content/manipulation/02_pandas_intro.qmd
9+
10+
lang: en
11+
12+
website:
13+
title: "Python for data science"
14+
page-footer:
15+
left: |
16+
Python pour la _data science_, Lino Galiana.<br>
17+
Licence {{< fa brands creative-commons >}}<br>
18+
Code source disponible sur [`Github`](https://github.com/linogaliana/python-datascientist)
19+
right: |
20+
Site construit avec {{< fa brands python >}} et [`Quarto`](https://quarto.org/)<br>
21+
Inspiration pour la mise en forme du site [ici](https://www.andreashandel.com)<br>
22+
[Code source disponible sur {{< fa brands github >}} `GitHub`](https://github.com/linogaliana/python-datascientist)
23+
body-header: |
24+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
25+
<a href="#" onclick="this.href = location.href.replace('/en/', '/');" class="button-cta">
26+
<button class="btn"><i class="fa fa-language"></i> Passer à la version française 🇫🇷</button>
27+
</a>
28+
sidebar:
29+
- id: introduction
30+
title: "Introduction"
31+
#collapse-level: 2
32+
contents:
33+
- content/getting-started/index.qmd
34+
- content/getting-started/01_installation.qmd
35+
- content/getting-started/02_DS_environment.qmd
36+
- content/getting-started/03_data_analysis.qmd
37+
- content/getting-started/04_python_practice.qmd
38+
- content/getting-started/05_rappels_types.qmd
39+
- content/getting-started/06_rappels_fonctions.qmd
40+
- content/getting-started/07_rappels_classes.qmd
41+
- id: manipulation
42+
title: "Wrangle"
43+
#collapse-level: 2
44+
contents:
45+
- href: content/manipulation/index.qmd
46+
text: "Introduction"
47+
- content/manipulation/01_numpy.qmd
48+
- content/manipulation/02_pandas_intro.qmd
49+
- content/manipulation/02_pandas_suite.qmd
50+
- content/manipulation/03_geopandas_intro.qmd
51+
- content/manipulation/04a_webscraping_TP.qmd
52+
- content/manipulation/04c_API_TP.qmd
53+
- content/manipulation/04b_regex_TP.qmd
54+
- id: communication
55+
title: "Communicate"
56+
#collapse-level: 2
57+
contents:
58+
- href: content/visualisation/index.qmd
59+
text: "Introduction"
60+
- content/visualisation/matplotlib.qmd
61+
- content/visualisation/maps.qmd
62+
- id: modelisation
63+
title: "Model"
64+
#collapse-level: 2
65+
contents:
66+
- href: content/modelisation/index.qmd
67+
text: "Introduction"
68+
- content/modelisation/0_preprocessing.qmd
69+
- content/modelisation/1_modelevaluation.qmd
70+
- content/modelisation/2_SVM.qmd
71+
- content/modelisation/3_regression.qmd
72+
- content/modelisation/4_featureselection.qmd
73+
- content/modelisation/5_clustering.qmd
74+
- content/modelisation/6_pipeline.qmd
75+
- content/modelisation/7_mlapi.qmd
76+
- id: NLP
77+
title: "NLP"
78+
#collapse-level: 2
79+
contents:
80+
- href: content/NLP/index.qmd
81+
text: "Introduction"
82+
- content/NLP/01_intro.qmd
83+
- content/NLP/02_exoclean.qmd
84+
- content/NLP/03_lda.qmd
85+
- content/NLP/04_word2vec.qmd
86+
- content/NLP/05_exo_supp.qmd
87+
- id: modern
88+
title: "In-depth"
89+
#collapse-level: 2
90+
contents:
91+
- href: content/modern-ds/index.qmd
92+
text: "Introduction"
93+
- content/modern-ds/continuous_integration.qmd
94+
- content/modern-ds/s3.qmd
95+
- content/modern-ds/elastic_approfondissement.qmd
96+
- content/modern-ds/elastic_intro.qmd
97+
- id: git
98+
title: "Git"
99+
#collapse-level: 2
100+
contents:
101+
- href: content/git/index.qmd
102+
text: "Introduction"
103+
- content/git/introgit.qmd
104+
- content/git/exogit.qmd
105+
- id: appendix
106+
title: "Annexes"
107+
#collapse-level: 2
108+
contents:
109+
- content/annexes/evaluation.qmd
110+
- content/annexes/corrections.qmd
111+
- href: https://linogaliana.github.io/python-datascientist-slides/#/title-slide
112+
text: "Slides de présentation"
113+
114+
citation:
115+
title: "Python pour la data science"
116+
author: Lino Galiana
117+
type: book
118+
doi: "10.5281/zenodo.8229676"
119+
url: https://pythonds.linogaliana.fr/
120+
issued: 2023
121+
122+

0 commit comments

Comments
 (0)