src-d / datasets

source{d} datasets ("big code") for source code analysis and machine learning on source code
Other
323 stars 82 forks source link

pga: add flag to the command to select pga version to download #111

Closed mcarmonaa closed 5 years ago

mcarmonaa commented 5 years ago

Closes #108

Right now there is only one pga version so HTTP calls are hardcoded to be done to (for both either index or siva files):

http://pga.sourced.tech/csv/latest.csv.gz
http://pga.sourced.tech/siva/latest/xx/xx7303c49ac984a9fec60523f2d5297682e16646.siva

Adding the root flag --pga-version it allows you to select which version of the pga you want to work with, requesting for paths like:

http://pga.sourced.tech/csv/v1.csv.gz
http://pga.sourced.tech/siva/v1/xx/xx7303c49ac984a9fec60523f2d5297682e16646.siva

latest is set by default which is the only version working for the moment.