From 178f16ead871ef2ec333644eb9aec4745a9efdca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7oise=20Conil?= <francoise.conil@insa-lyon.fr> Date: Thu, 3 Nov 2022 18:53:21 +0100 Subject: [PATCH] Add .gitignore for flit to build the package --- .gitignore | 5 +++++ README.md | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..13f0c29 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*~ +*.pyc +__pycache__ + +*.csv diff --git a/README.md b/README.md index edd23a0..7d010da 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,27 @@ Packaging informations : - https://packaging.python.org/en/latest/tutorials/packaging-projects/ - https://choosealicense.com/ +## Troubleshooting + +If we have untracked data files in the package tree, flist refuses to build the +package. + +```shell +$ flit build +Fetching list of valid trove classifiers I-flit.validate +Untracked or deleted files in the source directory. Commit, undo or ignore these files in your VCS. +``` + +If we add a line to ignore, e.g. all csv files, in `.gitignore` we get a warning when we want to add one. + +```shell +$ git add src/import-resources-example/data/WPP2022_TotalPopulationBySex.csv +Les chemins suivants sont ignorés par un de vos fichiers .gitignore : +src/import-resources-example/data/WPP2022_TotalPopulationBySex.csv +astuce: Utilisez -f si vous voulez vraiment les ajouter. +astuce: Éliminez ce message en lançant +astuce: "git config advice.addIgnoredFile false" +``` + +As we can append the data files with `-f`, I will ignore the data file in `.gitignore`. + -- GitLab