A Python plugin that can be used to analyze and report issues about a module dependencies at build time.
To get this plugin running:
-
Run the docker-python-pipeline first:
sudo docker-compose --profile python up -d
-
Feed the database with the testPackages.txt-file:
cat testPackages.txt | sudo docker-compose exec -T kafka kafka-console-producer.sh --broker-list kafka:9092 --topic fasten.PyPI.releases --property 'parse.key=true' --property 'key.separator=|'
-
Check if the pipeline is fed (will take a while):
- via curl:
curl -X GET localhost:9080/api/pypi/packages
- via the
metadata-db
container:- exec inside the container:
sudo docker-compose exec metadata-db /bin/bash
- query the database:
PGPASSWORD=fasten1234 psql --host localhost --port 5432 --username fasten fasten_python --command="SELECT * FROM packages;"
-
Activate your python virtual environment (if you use one):
source pypi-Plugin-venv/bin/activate
-
Make sure that you have the packages
pycg
,pycg-stitch
installed.
To install them run the following inside the pycg / pycg-stitch folder (assuming you are using a virtual environment):sudo pypi-Plugin-venv/bin/python3.9 setup.py install
-
Run the pypi-plugin from inside the
fasten-pypi-plugin/src/fasten
-folder to create a Call Graph for the plugin itself:python3 main.py \ --product fasten-pypi-plugin \ --pkg_name fasten-pypi-plugin \ --project_path ./ \ --timestamp 42 \ --version 1.0 \ --requirements ../../requirements.txt
-
The Call-Graphs can be found inside the
fasten-pypi-plugin/src/fasten/callGraphs
-folder.