Skip to content

Commit

Permalink
Update CI elements
Browse files Browse the repository at this point in the history
  • Loading branch information
linogaliana committed Jun 12, 2023
1 parent e12187b commit 7adbea4
Showing 1 changed file with 7 additions and 44 deletions.
51 changes: 7 additions & 44 deletions content/course/modern-ds/continuous_integration/index.qmd
Expand Up @@ -429,8 +429,8 @@ Le modèle suivant, expliqué en dessous, fournit un modèle de recette pour
tester un notebook. Supposons que ce fichier soit présent
dans un chemin `.github/workflows/test-notebook.yml`

{{< tabs tabTotal="2" >}}
{{% tab tabName="Environnement virtuel" %}}

<details><summary>Environnement virtuel</summary>

```yaml
name: Test notebook execution using Github Actions
Expand Down Expand Up @@ -464,8 +464,9 @@ jobs:
retention-days: 5
```

{{% /tab %}}
{{% tab tabName="Environnement conda" %}}
</details>

<details><summary>Environnement conda</summary>

```yaml
name: Test notebook execution using Github Actions
Expand Down Expand Up @@ -499,8 +500,8 @@ jobs:
path: myfile.ipynb
retention-days: 5
```
{{% /tab %}}
{{< /tabs >}}

</details>

Dans les deux cas, la démarche est la même:

Expand Down Expand Up @@ -713,41 +714,3 @@ AWS.
- https://towardsdatascience.com/from-jupyter-to-kubernetes-refactoring-and-deploying-notebooks-using-open-source-tools-19f99585e923


## Annexe: la même approche d'intégration continue avec `Travis`

`Travis` est un système d'intégration continue
qui était populaire avant l'émergence des
`Github Actions`. La manière équivalente de procéder
sur `Travis` par rapport à celle
présentée précedemment serait:

```yaml
# Modèle de fichier .travis.yml
language: python
python:
- "3.10"

install:
- sudo apt-get update
# We do this conditionally because it saves us some downloading if the
# version is the same.
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda env create -n test-environment python=$TRAVIS_PYTHON_VERSION -f environment.yml
- source activate test-environment

script:
- jupytext --to py --execute myfile.ipynb
```


0 comments on commit 7adbea4

Please sign in to comment.