GSoC-19: Retriever changes

Google Summer of Code 2019 - Weecology

Posted by Harshit Bansal on June 24, 2019 · 2 mins read

Hello,

The 3rd and 4th weeks of the coding period are almost over and it has been a fun time working on the project. During the first two weeks, I mainly worked on moving the scripts and their adding/editing functionalities from the retriever to the recipes repository. I had opened 4 pull requests for the above tasks, two in each repository, and all of them got merged. During these two weeks, I worked on the following tasks:

  • Making appropriate code changes in retriever due to moving scripts to the recipes repository. The docs were also updated as the script editing or adding functionalities have been moved to the recipes repository. The PR for this task is currently in review stage.
  • Adding CLI interface to the retriever-recipes repository for adding, deleting and editing scripts. The PR is in review stage.
  • Adding a pre-commit hook for updating the script versions prior to making a commit. The PR is again in review and testing stage and is expected to be merged soon.
  • Adding a test script to check the installation of modified or newly added scripts. Travis CI is also integrated to run remote tests when pushing the code. A Dockerfile has been written to facilitate the running of Travis tests in an isolated environment.

Their was some discussion needed regarding the moving of scripts. Andrew, one of the mentors was of the view that some scripts should be present in retriever to give the users an idea of the json scripts. Thus, keeping this in mind, we came to the decision that we would assign five scripts (the most stable and the oldest) as the "retriever legacy scripts", keeping them in retriever. The rest of the scripts would be moved to the recipes repository.

To facilitate the use of recipes as a command-line utility, the user would simply clone the repository and install it. The steps would be:

git clone https://www.github.com/weecology/retriever-recipes.git
cd retriever-recipes
python setup.py install

The usage of the CLI interface would be:

  • Add a new JSON script: retriever-recipes new_json
  • Delete an existing JSON script: retriever-recipes delete_json dataset
  • Edit an existing JSON script: retriever-recipes edit_json dataset