Skip to content

OpenHub API Interfacing for Project Search #317

@beydlern

Description

@beydlern

1. Purpose

OpenHub is a website that indexes open-source projects with their respective project information (i.e. lines of code, contributors, etc). The purpose of this task is to extend R/config.R to host a collection of functions that interface with OpenHub's API, Ohloh, to help facilitate in locating open source projects for analysis.

2. Process

Create a collection of functions implemented in R/config.R, where each function will grab one endpoint (item of project information, such as the number of lines of code). Create a notebook to demonstrate how to use these R/config.R Ohloh API interfacing functions to request information on an open-source project on OpenHub.

Checklist for Extractable Project Information

  • name: The name of the project.
  • id: The project's unique ID on OpenHub.
  • primary_language: The primary code language used by the project.
  • activity: The project's activity level (Very Low, Low, Moderate, High, and Very High).
  • html_url: The project's URL on OpenHub.
  • project_links: The project's links, which may contain the mailing list URL link (may be "N/A" if unable to find project links, checking html_url of the project to verify is advised).
  • min_month: OpenHub's first recorded year and month of the project's data (typically the date of the project's first commit, YYYY-MM format).
  • twelve_month_contributor_count: The number of contributors who made at least one commit to the project source code in the past twelve months.
  • total_contributor_count: The total number of contributors who made at least one commit to the project source code since the project's inception.
  • twelve_month_commit_count: The total number of commits to the project source code in the past twelve months.
  • total_commit_count: The total number of commits to the project source code since the project's inception.
  • total_code_lines: The most recent total count of all source code lines.
  • code_languages: A language breakdown with percentages for each substantial (as determined by OpenHub, less contributing languages are grouped and renamed as "Other") contributing language in the project's source code.

Example Endpoint Pathing

This specific comment in this issue thread details the endpoint pathing process to look for a specific project's analysis collection under an organization's portfolio projects, specified by project name (project names are unique in OpenHub).

3. Task List

  • Apply for an API key for Ohloh API.
  • Understand how to form a request to Ohloh API.
  • Understand the response XML format after an HTTP GET request.
  • Create the interfacing functions to extract the extractable project information and search for projects; Implement these functions in R/config.R.
  • Create a notebook, vignettes/openhub_project_search.Rmd, to demonstrate how to use the new R/config.R functions that interface with Ohloh API to extract useful information about a project and search through OpenHub's database of projects to search for a project based on a set of filters for analysis.

Function Signatures

  • openhub_api_organizations()
  • openhub_api_portfolio_projects()
  • openhub_api_projects()
  • openhub_api_analyses()
  • openhub_parse_organizations()
  • openhub_parse_portfolio_projects()
  • openhub_parse_projects()
  • openhub_parse_analyses()
  • openhub_download()
  • openhub_retrieve()
  • openhub_api_iterate_pages()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions