Skip to content

Commit

Permalink
Restructure la partie Pandas (#497)
Browse files Browse the repository at this point in the history
* Prépare restructuration partie pandas

* Continue

* uodate

* Mise en forme chapitre

* Finalise le chapitre

* Chapitre d'intro

* Clean

* Initialise le nouveau chapitre

* Acquis

* Pandas followup

* NIR

* NIR

* modele étoile

* Left and right join

* finalise chapitre

* nouveaux chapitres

* update

* polars

* ssphub polars

* numpy

* Prépare le merge

* manual test

* Coqille

* Modifications de forme
  • Loading branch information
linogaliana committed May 3, 2024
1 parent d02515b commit e0d615e
Show file tree
Hide file tree
Showing 7 changed files with 3,073 additions and 2,272 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/manual-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Deploy website to Netlify and build notebooks

on:
push:
branches:
- solopandas
- dev

jobs:
pages:
name: Render-Blog
runs-on: ubuntu-latest
container: linogaliana/python-datascientist:latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Configure safe.directory # Workaround for actions/checkout#760
run: git config --global --add safe.directory /__w/python-datascientist/python-datascientist
- name: Render website
run: |
rm -f _quarto.yml
cp _quarto-prod.yml _quarto.yml
quarto --version
python build/append_environment.py
python build/tweak_render.py
cat _quarto.yml
quarto render --to html
- name: Install npm
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Deploy to Netlify
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
# NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID added in the repo's secrets
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
BRANCHE_REF: ${{ github.head_ref || github.ref_name }}
run: |
npm init -y
npm install --unsafe-perm=true netlify-cli -g
netlify init
netlify deploy --alias=${BRANCHE_REF} --dir="_site" --message "Preview deploy from ${BRANCHE_REF}"
enonces:
name: Render notebooks
runs-on: ubuntu-latest
container: linogaliana/python-datascientist:latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref || github.ref_name }}
- name: Configure safe.directory # Workaround for actions/checkout#760
run: |
git config --global --add safe.directory /__w/python-datascientist/python-datascientist
git config --global --add safe.directory /__w/python-datascientist/python-datascientist-notebooks
- shell: bash
run: |
ls
conda info
conda list
- name: Convert in ipynb with Quarto
run: |
rm -f _quarto.yml
cp _quarto-prod.yml _quarto.yml
quarto --version
git diff --name-only origin/master origin/${GITHUB_HEAD_REF} >> diff
python build/tweak_render.py
python build/pimp_notebook.py
quarto render content --to ipynb
mkdir -p temp_notebooks
mkdir -p temp_notebooks/notebooks
python build/move_files.py temp_notebooks/notebooks
quarto render content --to ipynb --execute -M echo:true
mkdir -p temp_notebooks/corrections
python build/move_files.py temp_notebooks/corrections
- name: Pushes to another repository
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
uses: linogaliana/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'temp_notebooks/'
destination-repository-username: 'linogaliana'
destination-repository-name: 'python-datascientist-notebooks'
user-email: lino.galiana@insee.fr
destination-github-username: linogaliana
target-branch: dev
create-target-branch-if-needed: true
reset-repo: true

8 changes: 4 additions & 4 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ project:
- content/getting-started/07_rappels_classes.qmd
- content/manipulation/index.qmd
- content/manipulation/01_numpy.qmd
- content/manipulation/02a_pandas_tutorial.qmd
- content/manipulation/02b_pandas_TP.qmd
- content/manipulation/02_pandas_intro.qmd
- content/manipulation/02_pandas_suite.qmd
- content/visualisation/index.qmd
- content/modelisation/index.qmd
- content/NLP/index.qmd
Expand Down Expand Up @@ -86,8 +86,8 @@ website:
- href: content/manipulation/index.qmd
text: "Introduction"
- content/manipulation/01_numpy.qmd
- content/manipulation/02a_pandas_tutorial.qmd
- content/manipulation/02b_pandas_TP.qmd
- content/manipulation/02_pandas_intro.qmd
- content/manipulation/02_pandas_suite.qmd
- content/manipulation/03_geopandas_tutorial.qmd
- content/manipulation/03_geopandas_TP.qmd
- content/manipulation/04a_webscraping_TP.qmd
Expand Down

0 comments on commit e0d615e

Please sign in to comment.