Skip to content

Eneru/vscode-python-datascience-template

Repository files navigation

vscode-python-datascience-template

security: bandit protected: by-gitleaks-blue pre-commit Uses the Cookiecutter Data Science project template

Start a datascience project faster and easier by simply creating a repository based on this template.
This repository already includes some of the most known DevSecOps recommandations.

Run Locally

Clone the project

git clone https://link-to-my-project

Go to the project directory and launch VSCode

cd my-project
code .

If you want to use JupyterLab, you must uncomment the installation, execution on container start and appPort in .devcontainer/devcontainer.json.

You should reopen VSCode in a devcontainer.

Then give the rights to your user to the files that will be overwritten:

sudo chown $USER:$USER README.md
sudo chown $USER:$USER .gitignore
sudo chown $USER:$USER LICENSE

Create a project in a terminal using ccds (the -f parameter will override the files) from the parent directory:

cd ..
ccds -f

In the command for the "project" name, you must give the name of the git folder (my-project in my previous example).

Go back to the directory and give files rights back to root:

cd my-project
sudo chown root README.md
sudo chown root .gitignore
sudo chown root LICENSE

Then configure pre-commit (if you want to execute gitleaks every time you commit):

pre-commit autoupdate
pre-commit install

And finally, if you want to ignore some findings from gitleaks, add them to the .gitleaksignore file.

(If you want to add Anaconda directly at the container creation, uncomment it in the devcontainer.json)

Pay attention

If you are using Conda

Conda is not directly handled by cyclonedx. You will certainly need to precise a Conda build in GitHub action, and add the conda SBOM generation with something like:

cyclonedx-py environment "$(conda run which python)"

If you have a lot of files or big files

gitleaks will scan every file before each commit. If you have a lot of files or big files, maybe you should only trigger it in GitHub action, and then remove .pre-commit-config.yml file.

The GitHub action can be found on the gitleak repository.

Related

Here are some related documentations:

Authors

About

Start a datascience project faster and easier

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published