--- title: LexImpact Prepare Data keywords: fastai sidebar: home_sidebar nb_path: "notebooks/contributing.ipynb" ---
curl -sSL https://install.python-poetry.org | python3 -
Ajouter la commande suivante dans le .bashrc (toujours nécessaire ?) :
export PATH="$HOME/.local/bin:$PATH"
Pour supprimer un environnement : https://python-poetry.org/docs/managing-environments/
poetry env list
poetry env remove 3.7
Pour afficher l'arbre des dépendances:
poetry show --tree
poetry env use 3.8
poetry install
Pour développer la pipeline, il faut des packages supplémentaires :
poetry install --extras "pipeline"
poetry env use /usr/bin/python3.8
!ln -s ../leximpact_prepare_data
!cd analyses && ln -s ../../leximpact_prepare_data
!cd extractions_base_des_impots && ln -s ../../leximpact_prepare_data
!cd retraitement_erfs-fpr && ln -s ../../leximpact_prepare_data
!~/.local/bin/poetry run python -m ipykernel install --name leximpact-prepare-data-kernel --user
!make precommit
#!poetry run nbdev_build_docs
!cd .. && make docs
The documentation is available at https://documentation.leximpact.dev/leximpact_prepare_data/
It's build with NBDev in the GitLab CI.
Due to dependancies conflicts, we have to do it like this:
--clear-output do not work with nbconvert < 6 that is needed for nbdev. We do it to avoid publishing sensitive data. We have to find a better way to publish outputs without sensitive data.nbdev_build_docs because it does not work in our env for unkown reason.Then we copy the docs via scp to our server and build the final statics docs with Jekyll on it.
NBDev build docs with Jekyll because it is supported by Github for free hosting.
Pour convertir les Notebooks en Jekyll:
docker run -v $PWD:/project -w /project -v /media/data-in:/mnt/data-in -v /media/data-out:/mnt/data-out fastai/jekyll sh deploy/build_docs.sh
Pour interpréter le Jekyll:
make docs_serve
Puis aller sur http://127.0.0.1:4000/leximpact_prepare_data//.