Usage
This page provides usage instructions for indexing projects in AGORA. Using AGORA as administrator requires executing the python script (main.py) of the AGORA Elasticsearch Client. The command line arguments of the script are the following:
- create_index: creates the index and the mappings
- add_project name: adds or updates a project given its github url
- add_projects file: adds or updates projects given a list of github urls (in a txt file)
- flush_index: flushes the index
- delete_project name: deletes a project given its github url
- delete_projects file: deletes projects given a list of github urls (in a txt file)
- delete_index: deletes the index and the mappings
The index can be populated using the add_project or add_projects options. For example, to add the project https://github.com/AuthEceSoftEng/agora-ast-parser, the needed command is:
sudo python3 main.py add_project https://github.com/AuthEceSoftEng/agora-ast-parser
Also, to add a list of projects, for example the one residing in test_projects.txt, the needed command is:
sudo python3 main.py add_projects ./projectlists/test_projects.txt
In folder projectlists, there are also lists for the 100 and the 3000 GitHub java projects with the most stars (see Datasets for more information on the lists of projects of AGORA).
All other users (apart from the administrator) are not given sufficient privileges to perform these actions. They are only allowed to issue POST requests at the search endpoints, so that they can use the web UI and the API of AGORA.