Source code of PyDigger
See the about page on the web site for some explanation.
See the Video recording series following the development of the application. Specifically in the first episode you can see an explanation about it.
git clone https://github.com/szabgab/pydigger.com
config-skeleton.yml
to dev.yml
.repo
x public_repo
user
x read:user
x user:email
dev.yml
file in the github-token
field.docker-compose.override.yml.example
to docker-compose.override.yml
and personalize it if necessary.If you're using Windows, make sure to have a docker daemon up and running, e.g. via Docker Desktop.
Open a terminal and run the following from within your cloned pydigger.com directory:
docker-compose up --build
Visit the web page at http://localhost:6001 At this point the database is empty.
docker exec -it pydiggercom_cron_1 bash
To run the tests type in
pytest --cache-clear -vs
To run the linter type in
flake8 --count --show-source --statistics
To collect data from a single GitHub repository:
python fetch_recent.py --update url --url https://github.com/szabgab/pydigger.com --log DEBUG --screen
To collect data for a single PyPI package:
python fetch_recent.py --update package --package <PyPI package name> --log DEBUG --screen
For example:
python fetch_recent.py --update package --package flask --log DEBUG --screen
Fetch data of recently uploaded packages using the RSS feed of PyPI:
python fetch_recent.py --update rss --screen --log DEBUG
python fetch_recent.py --update deps --screen --log DEBUG
$ docker exec -it pydiggercom_mymongo_1 bash
# mongo -u root -p Secret # to login to mongodb
> use pydigger # pydigger is our database name
> db.dropDatabase() # To drop the pydigger database
> db.packages.find() # To list all the entries
Cleaning up database (during development)
docker exec pydiggercom_web_1 python remove_db.py
Remove a package
docker exec pydiggercom_web_1 python remove_package.py NAME
ssh to the server and run
./deploy.sh
Copyright 2023 Gábor Szabó
The source code in this repository is licensed under the MIT License.
The content of the site as collected from the various sources are copyright the respective parties.