-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include github-org-analyzer under tutorial/github-org-analyzer (#56)
- Loading branch information
1 parent
e9f4926
commit 500928c
Showing
10 changed files
with
502 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# github-org-analyzer | ||
|
||
This Fortran package provides procedures to analyze GitHub organizations and retrieve valuable information about their repositories. By leveraging the power of the `http-client` package, this analyzer fetches data from the GitHub API to generate insightful reports. | ||
|
||
## Features | ||
|
||
The `github-org-analyzer` package offers the following procedures: | ||
|
||
* `analyze_github_organization`: Provides detailed information about all repositories within the organization. | ||
* `get_top_active_repositories`: Retrieves information about the top active repositories within the organization. | ||
* `get_top_starred_repositories`: Retrieves information about the top starred repositories within the organization. | ||
* `get_most_used_repositories`: Retrieves information about the most used repositories within the organization. | ||
* `get_contributor_from_repositories`: Retrieves information about the contributors of the organization's repositories. | ||
|
||
## Prerequisites | ||
|
||
To use the `github-org-analyzer` package, ensure you have the following dependencies installed: | ||
|
||
* Fortran compiler | ||
* On Ubuntu, you need to install the curl development headers. Use the following command: | ||
```bash | ||
sudo apt install -y libcurl4-openssl-dev | ||
``` | ||
|
||
## Installation | ||
|
||
1. Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/your-username/github-org-analyzer.git | ||
``` | ||
|
||
2. Compile the package using your fpm: | ||
|
||
```bash | ||
cd github-org-analyzer | ||
fpm build | ||
fpm run | ||
``` | ||
|
||
## Usage | ||
|
||
To use the procedures provided by `github-org-analyzer`, follow these steps: | ||
|
||
1. Import the package into your Fortran project: | ||
|
||
```fortran | ||
use github_org_analyzer | ||
``` | ||
|
||
2. Call the desired procedures to retrieve information about GitHub organizations and their repositories. | ||
|
||
```fortran | ||
! Analyze GitHub organization | ||
call analyze_github_organization("your-github-org") | ||
! Get information about top active repositories | ||
call get_top_active_repositories("your-github-org") | ||
! Get information about top starred repositories | ||
call get_top_starred_repositories("your-github-org") | ||
! Get information about most used repositories | ||
call get_most_used_repositories("your-github-org") | ||
! Get information about contributors from repositories | ||
call get_contributor_from_repositories("your-github-org", "org-repository") | ||
``` | ||
|
||
Happy analyzing! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
program main | ||
! This Fortran project, named "GitHub Organization Analyzer," demonstrates the usage of the | ||
! http-client module to make HTTP requests and interact with the GitHub API. The project | ||
! provides a set of subroutines that allow users to fetch and display information about GitHub | ||
! repositories and contributors within a specified GitHub organization. | ||
|
||
use github_org_analyzer, only: analyze_github_organization, get_top_active_repositories, & | ||
get_top_starred_repositories, get_most_used_repositories, get_contributor_from_repositories | ||
|
||
implicit none | ||
|
||
! Fetching and displaying information about all repositories within the GitHub organization | ||
! 'fortran-lang' using the analyze_github_organization subroutine. | ||
print *, '::::::: All Repositories :::::::'//new_line('a') | ||
call analyze_github_organization(org_name='fortran-lang') | ||
|
||
! Fetching and displaying detailed information about the top active repositories within the | ||
! organization using the get_top_active_repositories subroutine. | ||
print *, '::::::: Top Active Repositories :::::::'//new_line('a') | ||
call get_top_active_repositories(org_name='fortran-lang') | ||
|
||
! Fetching and displaying detailed information about the top starred repositories within the | ||
! organization using the get_top_starred_repositories subroutine. | ||
print *, '::::::: Top Starred Repositories :::::::'//new_line('a') | ||
call get_top_starred_repositories(org_name='fortran-lang') | ||
|
||
! Fetching and displaying detailed information about the most used repositories within the | ||
! organization (based on the number of forks) using the get_most_used_repositories subroutine. | ||
print *, '::::::: Top Used Repositories :::::::'//new_line('a') | ||
call get_most_used_repositories(org_name='fortran-lang') | ||
|
||
! Fetching and displaying detailed information about contributors from the repository 'stdlib' | ||
! within the organization using the get_contributor_from_repositories subroutine. | ||
print *, '::::::: Contributors from a Repositories :::::::'//new_line('a') | ||
call get_contributor_from_repositories(org_name='fortran-lang', repo_name='stdlib') | ||
|
||
end program main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name = "github-org-analyzer" | ||
version = "0.1.0" | ||
license = "license" | ||
author = "Rajkumar" | ||
maintainer = "[email protected]" | ||
copyright = "Copyright 2023, Rajkumar" | ||
[build] | ||
auto-executables = true | ||
auto-tests = true | ||
auto-examples = true | ||
module-naming = false | ||
[install] | ||
library = false | ||
[fortran] | ||
implicit-typing = false | ||
implicit-external = false | ||
source-form = "free" | ||
|
||
[dependencies] | ||
http.git = "https://github.com/fortran-lang/http-client.git" | ||
stdlib = "*" | ||
json-fortran = { git = "https://github.com/jacobwilliams/json-fortran.git" } | ||
|
Oops, something went wrong.