Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

15_run_python_scanner.sh - Scan Python code for packages

Description

Finds the Python packages the deposit’s code imports. When the deposit has no .py or .ipynb files, it removes any old outputs and exits.

  1. Installs the scanner requirements from tools/requirements-scanner.txt.

  2. Runs pipreqs --scan-notebooks, writing generated/requirements-generated.txt (an author’s own requirements.txt is never touched) and generated/python-scanner.log.

  3. Runs tools/filter_requirements.py to compare the scan with the author’s requirements.txt, writing generated/python-deps.csv and .md, and the report note generated/software-warnings-python.md.

Usage

./automations/15_run_python_scanner.sh <projectID>

Environment Variables