<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rlobo</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rlobo"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Rlobo"/>
	<updated>2026-09-17T01:52:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=160877</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=160877"/>
		<updated>2024-12-07T16:17:00Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* Front end */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
== Problem Statement==&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
Get Familiar with the Code:&lt;br /&gt;
* Start by exploring the codebase to get a clear understanding of its structure and purpose. The project uses a Flask-based GraphQL API to pull data from GitHub repositories and user contributions, and the README is a helpful guide to the modules, including authentication and the query classes.&lt;br /&gt;
* To see the code in action, run the demo.py file—it’ll show you what kind of responses to expect and how the different parts work together.&lt;br /&gt;
* Refactor the queries to improve modularity and efficiency. Use the constants module to handle field names and query nodes—this will help make the code more maintainable and reduce duplication.&lt;br /&gt;
* Organize the queries based on data type (e.g., repository commits, contributors), which will make the code cleaner and easier to reuse across different GitHub API endpoints.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
Create an intuitive frontend interface using React with TypeScript to display information from both GitHub and GitLab repositories. This user-friendly GUI will allow users to view repository data easily. A Flask backend will handle the data processing, providing APIs that retrieve and send the information to the frontend.&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Implement a /graphql endpoint using Flask and flask-graphql and then configure the endpoint to handle POST requests containing GraphQL queries.&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement resolvers for each query type&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop a middleware to authenticate requests using GitHub personal access tokens&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement comprehensive error handling for API requests and responses&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop integration tests to verify the interaction between Flask, GraphQL, and the GitHub API.&amp;lt;li&amp;gt;&lt;br /&gt;
* Test the complete request-response cycle for each implemented query.&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Project Components =&lt;br /&gt;
This project focuses on retrieving and refining GitHub-specific data for a user’s repository information. The objective is to efficiently fetch a detailed array of repository-related data, such as:&lt;br /&gt;
&lt;br /&gt;
* Repository contributors&lt;br /&gt;
* Contributions from each contributor&lt;br /&gt;
* Commit history and details for contributors&lt;br /&gt;
&lt;br /&gt;
The goal is to present a comprehensive view of a user’s activities within GitHub, using the GitHub GraphQL API for optimized data extraction.&lt;br /&gt;
&lt;br /&gt;
'''Frontend GUI (React + Typescript)''': &lt;br /&gt;
* Design a responsive and user-friendly interface to display GitHub repository information&lt;br /&gt;
* Implement interactive features, such as searching, sorting, and filtering by  allowing users to navigate and manage the displayed data&lt;br /&gt;
* Focus on a clean and visually appealing design that enhances the user experience&lt;br /&gt;
&lt;br /&gt;
'''Backend API (Flask)''':&lt;br /&gt;
* Develop Flask APIs to handle GraphQL queries to GitHub by retrieving essential repository and contribution information.&lt;br /&gt;
* Set up endpoints that correspond to specific queries (e.g., contributors, commit details) and ensuring a well-organized data flow.&lt;br /&gt;
* Integrate authentication measures using GitHub personal access tokens to secure access to sensitive information.&lt;br /&gt;
&lt;br /&gt;
'''Workflow''':&lt;br /&gt;
* The React frontend communicates with the Flask backend via structured APIs.&lt;br /&gt;
* Flask acts as the middle layer which will execute GraphQL queries to GitHub to obtain relevant data on repositories and user contributions.&lt;br /&gt;
* The retrieved information is processed and delivered to the frontend, where it is organized and displayed for easy user interaction.&lt;br /&gt;
&lt;br /&gt;
= Design Pattern and Best Practices =&lt;br /&gt;
We mention the different design patterns and best practices we plan on using in this project:&lt;br /&gt;
#'''DRY Principle''': We will create reusable components in React to build out user interface. This also happens to be one of the major advantages of React. We can create larger components in React by reusing some utility components.&lt;br /&gt;
#'''Observer Pattern''': React hooks like 'useEffect' provide a way for us observe all the changes in the user changes in the interface and allows us to provide suitable interactions based on those changes.&lt;br /&gt;
#'''HOC Pattern''': We will use higher order components in React to create layouts for all our pages. We will also use them to provide routing for all the different pages in the app.&lt;br /&gt;
#'''Mediator Pattern''': We will change the data coming from the backend application to a format that is suited for displaying in React. We will use the mediator pattern for this.&lt;br /&gt;
#'''Provider Pattern''': We will pass down props from one component to another down the chain without explicitly passing it down, using the provider pattern&lt;br /&gt;
&lt;br /&gt;
= Components =&lt;br /&gt;
Components are the basic building blocks in React. The section specifies the different components that we plan to create for this project.&lt;br /&gt;
&lt;br /&gt;
#'''Repository Statistics Page''': This will be the main page that will act as a home page for all the repository related statistics. These statistics will be based on the commit history of the repository.&lt;br /&gt;
#'''Contributor Commit Section''': This section will contain will contain all the commit related data of a specific author in a specific repository.&lt;br /&gt;
#'''Contributor list Section''': This section will contain the list of all the authors of the authors contributing to a particular repository. We will also show author-related data in this section. We might need more components to show all the author details.&lt;br /&gt;
#'''Contribution Section''': This section will show all the contribution related information by a particular contributor to a particular repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
=== Refactoring for Improved Code Quality ===&lt;br /&gt;
&lt;br /&gt;
We have made significant improvements to our codebase to enhance readability, maintainability, and consistency:&lt;br /&gt;
Constant Usage for Field and Node Names&lt;br /&gt;
We have introduced a new constants module to replace string literals in our query structure and data extraction processes. This change brings several benefits:&lt;br /&gt;
* Improved code consistency&amp;lt;/li&amp;gt;&lt;br /&gt;
* Reduced risk of typos&amp;lt;/li&amp;gt;&lt;br /&gt;
* Easier maintenance and updates&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Streamlined Query Arguments ===&lt;br /&gt;
We have optimized our query structure by parameterizing the arguments. This enhancement allows for more flexible and reusable queries.&lt;br /&gt;
* Enhanced Query Flexibility: Queries are more adaptable, allowing parameter changes without altering the underlying structure.&amp;lt;/li&amp;gt;&lt;br /&gt;
* Improved Code Maintainability: A centralized query structure minimizes code duplication.&lt;br /&gt;
* Better Performance Optimization: Consistent query structures enable efficient caching and reuse of results&lt;br /&gt;
&lt;br /&gt;
=== Front end ===&lt;br /&gt;
The interface for displaying GitHub repository information should be responsive and visually appealing, focusing on a minimalist and user-friendly design. At the top, a placeholder input field prompts users to enter the owner and repository name, keeping the layout clean and straightforward. Once the repository is loaded, the page displays information in an organized and interactive manner, with sortable columns (e.g., stars, forks, and issues) and filter options for attributes like programming language or activity status. Repository details are presented in expandable cards or rows, allowing users to view additional information without cluttering the interface.&lt;br /&gt;
[[File:UI1.png|center|thumb|500px|alt=]]&lt;br /&gt;
[[File:UI2.png|center|thumb|500px|alt=]]&lt;br /&gt;
[[File:UI3.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
[[File:original_hs.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refac_hs.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
The refactored code improves readability, maintainability, and scalability by replacing hardcoded strings with descriptive constants (e.g., NODE_REPOSITORY instead of &amp;quot;repository&amp;quot;) and encapsulating query arguments as reusable variables (ARG_OWNER, ARG_NAME). This abstraction ensures consistency and minimizes the risk of errors when updating fields or arguments. If the GraphQL schema changes, such as renaming &amp;quot;repository&amp;quot;, only the constant NODE_REPOSITORY needs to be updated in the refactored code, ensuring minimal disruption across the codebase.&lt;br /&gt;
&lt;br /&gt;
  * New Constants module and replaced all string literal in the query structure and data extraction with these constants. It includes node names, field names, and argument names.&lt;br /&gt;
  * Modified the `__init__` method to accept 'owner', 'repo_name', and 'pg_size' as parameters as it makes the class initialization more explicit.&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
[[File:original_russ.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repo.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
The refactored code improves modularity, readability, and maintainability by replacing hardcoded strings with constants. This enhances clarity and reduces the likelihood of errors. Additionally, it introduces structured comments to clarify the purpose of each query component. For example, in the refactored code, NODE_AUTHOR and FIELD_NAME are used to represent the author and their name, respectively, making the logic more understandable compared to the actual code, where &amp;quot;author&amp;quot; and &amp;quot;name&amp;quot; are directly hardcoded. Such abstraction makes updates or debugging more straightforward, as changes to query fields require edits only in constants rather than throughout the code.&lt;br /&gt;
&lt;br /&gt;
  * Removed the `RepositoryContributorsContribution` class and its associated methods. Focuses now on `RepositoryContributors` and `extract_unique_author`&lt;br /&gt;
  * This uses new constants for accessing dictionary keys as it makes more consistent&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
[[File:repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
The refactored code introduces constants for field and node names, replacing hardcoded strings to enhance maintainability and readability. This abstraction reduces potential errors, centralizes definitions, and promotes consistency across the codebase. Additionally, the refactored version improves semantic clarity by utilizing get() for safer dictionary key access, mitigating risks of runtime errors.&lt;br /&gt;
In the refactored code, constants such as NODE_REPOSITORY, FIELD_NAME, and FIELD_LOGIN replace hardcoded strings like &amp;quot;repository&amp;quot;, &amp;quot;name&amp;quot;, and &amp;quot;login&amp;quot;. This makes updates easier and reduces errors.&lt;br /&gt;
&lt;br /&gt;
  * Introduced a new constants module and replaced all string literal in the query structure and data extraction with these constants.&lt;br /&gt;
  * Modified extract_unique_author to use the safer 'get()' method while accessing dictionary keys.&lt;br /&gt;
&lt;br /&gt;
===/Constants===&lt;br /&gt;
&lt;br /&gt;
Field Constants&lt;br /&gt;
[[File:field_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
Node Constants&lt;br /&gt;
[[File:node_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
Argument Constants&lt;br /&gt;
[[File:arg_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
&lt;br /&gt;
*Testing with pytest&lt;br /&gt;
 Test Discovery: pytest automatically discovers tests in the specified files (those starting with test_ or ending with _test.py) and runs them.&lt;br /&gt;
&lt;br /&gt;
*Fixtures:&lt;br /&gt;
 Fixtures are defined using the @pytest.fixture decorator. They provide reusable setup code for tests.In this case, mock_raw_data_single_author and &lt;br /&gt;
  mock_raw_data_multiple_authors provide simulated responses from a GitHub API for single and multiple authors.&lt;br /&gt;
&lt;br /&gt;
*Assertions: &lt;br /&gt;
 Each test function uses assert statements to check if the actual outputs match the expected results, helping verify the correctness of the code.&lt;br /&gt;
&lt;br /&gt;
*Execution: &lt;br /&gt;
 Run the tests with the command *python -m pytest -v [file name]* in the terminal, and it will show which tests passed or failed.&lt;br /&gt;
&lt;br /&gt;
Testing RepositoryContributors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
[[File:Graphql test2.jpeg|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Query Structure Test:&lt;br /&gt;
The test_repository_contributors_query_structure checks if the generated GraphQL query string from the RepositoryContributors class matches the expected query template by stripping whitespace and comparing the two strings.&lt;br /&gt;
&lt;br /&gt;
Unique Author Extraction:&lt;br /&gt;
The test_single_author function verifies that the extract_unique_author method correctly extracts the name and login of a single author from the provided mock data.&lt;br /&gt;
The test_multiple_authors function checks that multiple authors are accurately extracted, ensuring that their names and logins are included in the results.&lt;br /&gt;
This structured approach ensures that both the query generation and author extraction functionalities of the RepositoryContributors class are tested effectively.&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributor&lt;br /&gt;
[[File:test_contri.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
=Work Flow Diagram=&lt;br /&gt;
&amp;lt;b&amp;gt;OSS project phase 1:&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:GithubMiner.drawio.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&amp;lt;b&amp;gt;OSS project phase 2 after the changes were made:&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:GithubMiner2.drawio.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=160874</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=160874"/>
		<updated>2024-12-07T16:14:38Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
== Problem Statement==&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
Get Familiar with the Code:&lt;br /&gt;
* Start by exploring the codebase to get a clear understanding of its structure and purpose. The project uses a Flask-based GraphQL API to pull data from GitHub repositories and user contributions, and the README is a helpful guide to the modules, including authentication and the query classes.&lt;br /&gt;
* To see the code in action, run the demo.py file—it’ll show you what kind of responses to expect and how the different parts work together.&lt;br /&gt;
* Refactor the queries to improve modularity and efficiency. Use the constants module to handle field names and query nodes—this will help make the code more maintainable and reduce duplication.&lt;br /&gt;
* Organize the queries based on data type (e.g., repository commits, contributors), which will make the code cleaner and easier to reuse across different GitHub API endpoints.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
Create an intuitive frontend interface using React with TypeScript to display information from both GitHub and GitLab repositories. This user-friendly GUI will allow users to view repository data easily. A Flask backend will handle the data processing, providing APIs that retrieve and send the information to the frontend.&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Implement a /graphql endpoint using Flask and flask-graphql and then configure the endpoint to handle POST requests containing GraphQL queries.&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement resolvers for each query type&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop a middleware to authenticate requests using GitHub personal access tokens&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement comprehensive error handling for API requests and responses&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop integration tests to verify the interaction between Flask, GraphQL, and the GitHub API.&amp;lt;li&amp;gt;&lt;br /&gt;
* Test the complete request-response cycle for each implemented query.&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Project Components =&lt;br /&gt;
This project focuses on retrieving and refining GitHub-specific data for a user’s repository information. The objective is to efficiently fetch a detailed array of repository-related data, such as:&lt;br /&gt;
&lt;br /&gt;
* Repository contributors&lt;br /&gt;
* Contributions from each contributor&lt;br /&gt;
* Commit history and details for contributors&lt;br /&gt;
&lt;br /&gt;
The goal is to present a comprehensive view of a user’s activities within GitHub, using the GitHub GraphQL API for optimized data extraction.&lt;br /&gt;
&lt;br /&gt;
'''Frontend GUI (React + Typescript)''': &lt;br /&gt;
* Design a responsive and user-friendly interface to display GitHub repository information&lt;br /&gt;
* Implement interactive features, such as searching, sorting, and filtering by  allowing users to navigate and manage the displayed data&lt;br /&gt;
* Focus on a clean and visually appealing design that enhances the user experience&lt;br /&gt;
&lt;br /&gt;
'''Backend API (Flask)''':&lt;br /&gt;
* Develop Flask APIs to handle GraphQL queries to GitHub by retrieving essential repository and contribution information.&lt;br /&gt;
* Set up endpoints that correspond to specific queries (e.g., contributors, commit details) and ensuring a well-organized data flow.&lt;br /&gt;
* Integrate authentication measures using GitHub personal access tokens to secure access to sensitive information.&lt;br /&gt;
&lt;br /&gt;
'''Workflow''':&lt;br /&gt;
* The React frontend communicates with the Flask backend via structured APIs.&lt;br /&gt;
* Flask acts as the middle layer which will execute GraphQL queries to GitHub to obtain relevant data on repositories and user contributions.&lt;br /&gt;
* The retrieved information is processed and delivered to the frontend, where it is organized and displayed for easy user interaction.&lt;br /&gt;
&lt;br /&gt;
= Design Pattern and Best Practices =&lt;br /&gt;
We mention the different design patterns and best practices we plan on using in this project:&lt;br /&gt;
#'''DRY Principle''': We will create reusable components in React to build out user interface. This also happens to be one of the major advantages of React. We can create larger components in React by reusing some utility components.&lt;br /&gt;
#'''Observer Pattern''': React hooks like 'useEffect' provide a way for us observe all the changes in the user changes in the interface and allows us to provide suitable interactions based on those changes.&lt;br /&gt;
#'''HOC Pattern''': We will use higher order components in React to create layouts for all our pages. We will also use them to provide routing for all the different pages in the app.&lt;br /&gt;
#'''Mediator Pattern''': We will change the data coming from the backend application to a format that is suited for displaying in React. We will use the mediator pattern for this.&lt;br /&gt;
#'''Provider Pattern''': We will pass down props from one component to another down the chain without explicitly passing it down, using the provider pattern&lt;br /&gt;
&lt;br /&gt;
= Components =&lt;br /&gt;
Components are the basic building blocks in React. The section specifies the different components that we plan to create for this project.&lt;br /&gt;
&lt;br /&gt;
#'''Repository Statistics Page''': This will be the main page that will act as a home page for all the repository related statistics. These statistics will be based on the commit history of the repository.&lt;br /&gt;
#'''Contributor Commit Section''': This section will contain will contain all the commit related data of a specific author in a specific repository.&lt;br /&gt;
#'''Contributor list Section''': This section will contain the list of all the authors of the authors contributing to a particular repository. We will also show author-related data in this section. We might need more components to show all the author details.&lt;br /&gt;
#'''Contribution Section''': This section will show all the contribution related information by a particular contributor to a particular repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
=== Refactoring for Improved Code Quality ===&lt;br /&gt;
&lt;br /&gt;
We have made significant improvements to our codebase to enhance readability, maintainability, and consistency:&lt;br /&gt;
Constant Usage for Field and Node Names&lt;br /&gt;
We have introduced a new constants module to replace string literals in our query structure and data extraction processes. This change brings several benefits:&lt;br /&gt;
* Improved code consistency&amp;lt;/li&amp;gt;&lt;br /&gt;
* Reduced risk of typos&amp;lt;/li&amp;gt;&lt;br /&gt;
* Easier maintenance and updates&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Streamlined Query Arguments ===&lt;br /&gt;
We have optimized our query structure by parameterizing the arguments. This enhancement allows for more flexible and reusable queries.&lt;br /&gt;
* Enhanced Query Flexibility: Queries are more adaptable, allowing parameter changes without altering the underlying structure.&amp;lt;/li&amp;gt;&lt;br /&gt;
* Improved Code Maintainability: A centralized query structure minimizes code duplication.&lt;br /&gt;
* Better Performance Optimization: Consistent query structures enable efficient caching and reuse of results&lt;br /&gt;
&lt;br /&gt;
=== Front end ===&lt;br /&gt;
[[File:UI1.png|center|thumb|500px|alt=]]&lt;br /&gt;
[[File:UI2.png|center|thumb|500px|alt=]]&lt;br /&gt;
[[File:UI3.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
[[File:original_hs.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refac_hs.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
The refactored code improves readability, maintainability, and scalability by replacing hardcoded strings with descriptive constants (e.g., NODE_REPOSITORY instead of &amp;quot;repository&amp;quot;) and encapsulating query arguments as reusable variables (ARG_OWNER, ARG_NAME). This abstraction ensures consistency and minimizes the risk of errors when updating fields or arguments. If the GraphQL schema changes, such as renaming &amp;quot;repository&amp;quot;, only the constant NODE_REPOSITORY needs to be updated in the refactored code, ensuring minimal disruption across the codebase.&lt;br /&gt;
&lt;br /&gt;
  * New Constants module and replaced all string literal in the query structure and data extraction with these constants. It includes node names, field names, and argument names.&lt;br /&gt;
  * Modified the `__init__` method to accept 'owner', 'repo_name', and 'pg_size' as parameters as it makes the class initialization more explicit.&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
[[File:original_russ.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repo.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
The refactored code improves modularity, readability, and maintainability by replacing hardcoded strings with constants. This enhances clarity and reduces the likelihood of errors. Additionally, it introduces structured comments to clarify the purpose of each query component. For example, in the refactored code, NODE_AUTHOR and FIELD_NAME are used to represent the author and their name, respectively, making the logic more understandable compared to the actual code, where &amp;quot;author&amp;quot; and &amp;quot;name&amp;quot; are directly hardcoded. Such abstraction makes updates or debugging more straightforward, as changes to query fields require edits only in constants rather than throughout the code.&lt;br /&gt;
&lt;br /&gt;
  * Removed the `RepositoryContributorsContribution` class and its associated methods. Focuses now on `RepositoryContributors` and `extract_unique_author`&lt;br /&gt;
  * This uses new constants for accessing dictionary keys as it makes more consistent&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
[[File:repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
The refactored code introduces constants for field and node names, replacing hardcoded strings to enhance maintainability and readability. This abstraction reduces potential errors, centralizes definitions, and promotes consistency across the codebase. Additionally, the refactored version improves semantic clarity by utilizing get() for safer dictionary key access, mitigating risks of runtime errors.&lt;br /&gt;
In the refactored code, constants such as NODE_REPOSITORY, FIELD_NAME, and FIELD_LOGIN replace hardcoded strings like &amp;quot;repository&amp;quot;, &amp;quot;name&amp;quot;, and &amp;quot;login&amp;quot;. This makes updates easier and reduces errors.&lt;br /&gt;
&lt;br /&gt;
  * Introduced a new constants module and replaced all string literal in the query structure and data extraction with these constants.&lt;br /&gt;
  * Modified extract_unique_author to use the safer 'get()' method while accessing dictionary keys.&lt;br /&gt;
&lt;br /&gt;
===/Constants===&lt;br /&gt;
&lt;br /&gt;
Field Constants&lt;br /&gt;
[[File:field_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
Node Constants&lt;br /&gt;
[[File:node_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
Argument Constants&lt;br /&gt;
[[File:arg_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
&lt;br /&gt;
*Testing with pytest&lt;br /&gt;
 Test Discovery: pytest automatically discovers tests in the specified files (those starting with test_ or ending with _test.py) and runs them.&lt;br /&gt;
&lt;br /&gt;
*Fixtures:&lt;br /&gt;
 Fixtures are defined using the @pytest.fixture decorator. They provide reusable setup code for tests.In this case, mock_raw_data_single_author and &lt;br /&gt;
  mock_raw_data_multiple_authors provide simulated responses from a GitHub API for single and multiple authors.&lt;br /&gt;
&lt;br /&gt;
*Assertions: &lt;br /&gt;
 Each test function uses assert statements to check if the actual outputs match the expected results, helping verify the correctness of the code.&lt;br /&gt;
&lt;br /&gt;
*Execution: &lt;br /&gt;
 Run the tests with the command *python -m pytest -v [file name]* in the terminal, and it will show which tests passed or failed.&lt;br /&gt;
&lt;br /&gt;
Testing RepositoryContributors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
[[File:Graphql test2.jpeg|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Query Structure Test:&lt;br /&gt;
The test_repository_contributors_query_structure checks if the generated GraphQL query string from the RepositoryContributors class matches the expected query template by stripping whitespace and comparing the two strings.&lt;br /&gt;
&lt;br /&gt;
Unique Author Extraction:&lt;br /&gt;
The test_single_author function verifies that the extract_unique_author method correctly extracts the name and login of a single author from the provided mock data.&lt;br /&gt;
The test_multiple_authors function checks that multiple authors are accurately extracted, ensuring that their names and logins are included in the results.&lt;br /&gt;
This structured approach ensures that both the query generation and author extraction functionalities of the RepositoryContributors class are tested effectively.&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributor&lt;br /&gt;
[[File:test_contri.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
=Work Flow Diagram=&lt;br /&gt;
&amp;lt;b&amp;gt;OSS project phase 1:&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:GithubMiner.drawio.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&amp;lt;b&amp;gt;OSS project phase 2 after the changes were made:&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:GithubMiner2.drawio.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=160873</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=160873"/>
		<updated>2024-12-07T16:12:02Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* Test Scenarios */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
== Problem Statement==&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
Get Familiar with the Code:&lt;br /&gt;
* Start by exploring the codebase to get a clear understanding of its structure and purpose. The project uses a Flask-based GraphQL API to pull data from GitHub repositories and user contributions, and the README is a helpful guide to the modules, including authentication and the query classes.&lt;br /&gt;
* To see the code in action, run the demo.py file—it’ll show you what kind of responses to expect and how the different parts work together.&lt;br /&gt;
* Refactor the queries to improve modularity and efficiency. Use the constants module to handle field names and query nodes—this will help make the code more maintainable and reduce duplication.&lt;br /&gt;
* Organize the queries based on data type (e.g., repository commits, contributors), which will make the code cleaner and easier to reuse across different GitHub API endpoints.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
Create an intuitive frontend interface using React with TypeScript to display information from both GitHub and GitLab repositories. This user-friendly GUI will allow users to view repository data easily. A Flask backend will handle the data processing, providing APIs that retrieve and send the information to the frontend.&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Implement a /graphql endpoint using Flask and flask-graphql and then configure the endpoint to handle POST requests containing GraphQL queries.&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement resolvers for each query type&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop a middleware to authenticate requests using GitHub personal access tokens&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement comprehensive error handling for API requests and responses&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop integration tests to verify the interaction between Flask, GraphQL, and the GitHub API.&amp;lt;li&amp;gt;&lt;br /&gt;
* Test the complete request-response cycle for each implemented query.&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Project Components =&lt;br /&gt;
This project focuses on retrieving and refining GitHub-specific data for a user’s repository information. The objective is to efficiently fetch a detailed array of repository-related data, such as:&lt;br /&gt;
&lt;br /&gt;
* Repository contributors&lt;br /&gt;
* Contributions from each contributor&lt;br /&gt;
* Commit history and details for contributors&lt;br /&gt;
&lt;br /&gt;
The goal is to present a comprehensive view of a user’s activities within GitHub, using the GitHub GraphQL API for optimized data extraction.&lt;br /&gt;
&lt;br /&gt;
'''Frontend GUI (React + Typescript)''': &lt;br /&gt;
* Design a responsive and user-friendly interface to display GitHub repository information&lt;br /&gt;
* Implement interactive features, such as searching, sorting, and filtering by  allowing users to navigate and manage the displayed data&lt;br /&gt;
* Focus on a clean and visually appealing design that enhances the user experience&lt;br /&gt;
&lt;br /&gt;
'''Backend API (Flask)''':&lt;br /&gt;
* Develop Flask APIs to handle GraphQL queries to GitHub by retrieving essential repository and contribution information.&lt;br /&gt;
* Set up endpoints that correspond to specific queries (e.g., contributors, commit details) and ensuring a well-organized data flow.&lt;br /&gt;
* Integrate authentication measures using GitHub personal access tokens to secure access to sensitive information.&lt;br /&gt;
&lt;br /&gt;
'''Workflow''':&lt;br /&gt;
* The React frontend communicates with the Flask backend via structured APIs.&lt;br /&gt;
* Flask acts as the middle layer which will execute GraphQL queries to GitHub to obtain relevant data on repositories and user contributions.&lt;br /&gt;
* The retrieved information is processed and delivered to the frontend, where it is organized and displayed for easy user interaction.&lt;br /&gt;
&lt;br /&gt;
= Design Pattern and Best Practices =&lt;br /&gt;
We mention the different design patterns and best practices we plan on using in this project:&lt;br /&gt;
#'''DRY Principle''': We will create reusable components in React to build out user interface. This also happens to be one of the major advantages of React. We can create larger components in React by reusing some utility components.&lt;br /&gt;
#'''Observer Pattern''': React hooks like 'useEffect' provide a way for us observe all the changes in the user changes in the interface and allows us to provide suitable interactions based on those changes.&lt;br /&gt;
#'''HOC Pattern''': We will use higher order components in React to create layouts for all our pages. We will also use them to provide routing for all the different pages in the app.&lt;br /&gt;
#'''Mediator Pattern''': We will change the data coming from the backend application to a format that is suited for displaying in React. We will use the mediator pattern for this.&lt;br /&gt;
#'''Provider Pattern''': We will pass down props from one component to another down the chain without explicitly passing it down, using the provider pattern&lt;br /&gt;
&lt;br /&gt;
= Components =&lt;br /&gt;
Components are the basic building blocks in React. The section specifies the different components that we plan to create for this project.&lt;br /&gt;
&lt;br /&gt;
#'''Repository Statistics Page''': This will be the main page that will act as a home page for all the repository related statistics. These statistics will be based on the commit history of the repository.&lt;br /&gt;
#'''Contributor Commit Section''': This section will contain will contain all the commit related data of a specific author in a specific repository.&lt;br /&gt;
#'''Contributor list Section''': This section will contain the list of all the authors of the authors contributing to a particular repository. We will also show author-related data in this section. We might need more components to show all the author details.&lt;br /&gt;
#'''Contribution Section''': This section will show all the contribution related information by a particular contributor to a particular repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
=== Refactoring for Improved Code Quality ===&lt;br /&gt;
&lt;br /&gt;
We have made significant improvements to our codebase to enhance readability, maintainability, and consistency:&lt;br /&gt;
Constant Usage for Field and Node Names&lt;br /&gt;
We have introduced a new constants module to replace string literals in our query structure and data extraction processes. This change brings several benefits:&lt;br /&gt;
* Improved code consistency&amp;lt;/li&amp;gt;&lt;br /&gt;
* Reduced risk of typos&amp;lt;/li&amp;gt;&lt;br /&gt;
* Easier maintenance and updates&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Streamlined Query Arguments ===&lt;br /&gt;
We have optimized our query structure by parameterizing the arguments. This enhancement allows for more flexible and reusable queries.&lt;br /&gt;
* Enhanced Query Flexibility: Queries are more adaptable, allowing parameter changes without altering the underlying structure.&amp;lt;/li&amp;gt;&lt;br /&gt;
* Improved Code Maintainability: A centralized query structure minimizes code duplication.&lt;br /&gt;
* Better Performance Optimization: Consistent query structures enable efficient caching and reuse of results&lt;br /&gt;
&lt;br /&gt;
=== UI ===&lt;br /&gt;
[[File:UI1.png|center|thumb|500px|alt=]]&lt;br /&gt;
[[File:UI2.png|center|thumb|500px|alt=]]&lt;br /&gt;
[[File:UI3.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
[[File:original_hs.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refac_hs.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
The refactored code improves readability, maintainability, and scalability by replacing hardcoded strings with descriptive constants (e.g., NODE_REPOSITORY instead of &amp;quot;repository&amp;quot;) and encapsulating query arguments as reusable variables (ARG_OWNER, ARG_NAME). This abstraction ensures consistency and minimizes the risk of errors when updating fields or arguments. If the GraphQL schema changes, such as renaming &amp;quot;repository&amp;quot;, only the constant NODE_REPOSITORY needs to be updated in the refactored code, ensuring minimal disruption across the codebase.&lt;br /&gt;
&lt;br /&gt;
  * New Constants module and replaced all string literal in the query structure and data extraction with these constants. It includes node names, field names, and argument names.&lt;br /&gt;
  * Modified the `__init__` method to accept 'owner', 'repo_name', and 'pg_size' as parameters as it makes the class initialization more explicit.&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
[[File:original_russ.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repo.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
The refactored code improves modularity, readability, and maintainability by replacing hardcoded strings with constants. This enhances clarity and reduces the likelihood of errors. Additionally, it introduces structured comments to clarify the purpose of each query component. For example, in the refactored code, NODE_AUTHOR and FIELD_NAME are used to represent the author and their name, respectively, making the logic more understandable compared to the actual code, where &amp;quot;author&amp;quot; and &amp;quot;name&amp;quot; are directly hardcoded. Such abstraction makes updates or debugging more straightforward, as changes to query fields require edits only in constants rather than throughout the code.&lt;br /&gt;
&lt;br /&gt;
  * Removed the `RepositoryContributorsContribution` class and its associated methods. Focuses now on `RepositoryContributors` and `extract_unique_author`&lt;br /&gt;
  * This uses new constants for accessing dictionary keys as it makes more consistent&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
[[File:repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
The refactored code introduces constants for field and node names, replacing hardcoded strings to enhance maintainability and readability. This abstraction reduces potential errors, centralizes definitions, and promotes consistency across the codebase. Additionally, the refactored version improves semantic clarity by utilizing get() for safer dictionary key access, mitigating risks of runtime errors.&lt;br /&gt;
In the refactored code, constants such as NODE_REPOSITORY, FIELD_NAME, and FIELD_LOGIN replace hardcoded strings like &amp;quot;repository&amp;quot;, &amp;quot;name&amp;quot;, and &amp;quot;login&amp;quot;. This makes updates easier and reduces errors.&lt;br /&gt;
&lt;br /&gt;
  * Introduced a new constants module and replaced all string literal in the query structure and data extraction with these constants.&lt;br /&gt;
  * Modified extract_unique_author to use the safer 'get()' method while accessing dictionary keys.&lt;br /&gt;
&lt;br /&gt;
===/Constants===&lt;br /&gt;
&lt;br /&gt;
Field Constants&lt;br /&gt;
[[File:field_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
Node Constants&lt;br /&gt;
[[File:node_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
Argument Constants&lt;br /&gt;
[[File:arg_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
&lt;br /&gt;
*Testing with pytest&lt;br /&gt;
 Test Discovery: pytest automatically discovers tests in the specified files (those starting with test_ or ending with _test.py) and runs them.&lt;br /&gt;
&lt;br /&gt;
*Fixtures:&lt;br /&gt;
 Fixtures are defined using the @pytest.fixture decorator. They provide reusable setup code for tests.In this case, mock_raw_data_single_author and &lt;br /&gt;
  mock_raw_data_multiple_authors provide simulated responses from a GitHub API for single and multiple authors.&lt;br /&gt;
&lt;br /&gt;
*Assertions: &lt;br /&gt;
 Each test function uses assert statements to check if the actual outputs match the expected results, helping verify the correctness of the code.&lt;br /&gt;
&lt;br /&gt;
*Execution: &lt;br /&gt;
 Run the tests with the command *python -m pytest -v [file name]* in the terminal, and it will show which tests passed or failed.&lt;br /&gt;
&lt;br /&gt;
Testing RepositoryContributors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
[[File:Graphql test2.jpeg|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Query Structure Test:&lt;br /&gt;
The test_repository_contributors_query_structure checks if the generated GraphQL query string from the RepositoryContributors class matches the expected query template by stripping whitespace and comparing the two strings.&lt;br /&gt;
&lt;br /&gt;
Unique Author Extraction:&lt;br /&gt;
The test_single_author function verifies that the extract_unique_author method correctly extracts the name and login of a single author from the provided mock data.&lt;br /&gt;
The test_multiple_authors function checks that multiple authors are accurately extracted, ensuring that their names and logins are included in the results.&lt;br /&gt;
This structured approach ensures that both the query generation and author extraction functionalities of the RepositoryContributors class are tested effectively.&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributor&lt;br /&gt;
[[File:test_contri.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
=Work Flow Diagram=&lt;br /&gt;
&amp;lt;b&amp;gt;OSS project phase 1:&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:GithubMiner.drawio.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&amp;lt;b&amp;gt;OSS project phase 2 after the changes were made:&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:GithubMiner2.drawio.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=159414</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=159414"/>
		<updated>2024-11-13T03:12:13Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* Work Flow Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Implement a /graphql endpoint using Flask and flask-graphql and then configure the endpoint to handle POST requests containing GraphQL queries.&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement resolvers for each query type&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop a middleware to authenticate requests using GitHub personal access tokens&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement comprehensive error handling for API requests and responses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop integration tests to verify the interaction between Flask, GraphQL, and the GitHub API.&amp;lt;li&amp;gt;&lt;br /&gt;
* Test the complete request-response cycle for each implemented query.&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
[[File:original_hs.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refac_hs.png|center|thumb|500px|alt=]]&lt;br /&gt;
  * New Constants module and replaced all string literal in the query structure and data extraction with these constants. It includes node names, field names, and argument names.&lt;br /&gt;
  * Modified the `__init__` method to accept 'owner', 'repo_name', and 'pg_size' as parameters as it makes the class initialization more explicit.&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
[[File:original_russ.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repo.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
  * Removed the `RepositoryContributorsContribution` class and its associated methods. Focuses now on `RepositoryContributors` and `extract_unique_author`&lt;br /&gt;
  * This uses new constants for accessing dictionary keys as it makes more consistent&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
[[File:repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
  * Introduced a new constants module and replaced all string literal in the query structure and data extraction with these constants.&lt;br /&gt;
  * Modified extract_unique_author to use the safer 'get()' method while accessing dictionary keys.&lt;br /&gt;
&lt;br /&gt;
===/Constants===&lt;br /&gt;
&lt;br /&gt;
Field Constants&lt;br /&gt;
[[File:field_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
Node Constants&lt;br /&gt;
[[File:node_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
Argument Constants&lt;br /&gt;
[[File:arg_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
&lt;br /&gt;
*Testing with pytest&lt;br /&gt;
 Test Discovery: pytest automatically discovers tests in the specified files (those starting with test_ or ending with _test.py) and runs them.&lt;br /&gt;
&lt;br /&gt;
*Fixtures:&lt;br /&gt;
 Fixtures are defined using the @pytest.fixture decorator. They provide reusable setup code for tests.In this case, mock_raw_data_single_author and &lt;br /&gt;
  mock_raw_data_multiple_authors provide simulated responses from a GitHub API for single and multiple authors.&lt;br /&gt;
&lt;br /&gt;
*Assertions: &lt;br /&gt;
 Each test function uses assert statements to check if the actual outputs match the expected results, helping verify the correctness of the code.&lt;br /&gt;
&lt;br /&gt;
*Execution: &lt;br /&gt;
 Run the tests with the command *python -m pytest -v [file name]* in the terminal, and it will show which tests passed or failed.&lt;br /&gt;
&lt;br /&gt;
Testing RepositoryContributors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
[[File:Graphql test2.jpeg|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Query Structure Test:&lt;br /&gt;
The test_repository_contributors_query_structure checks if the generated GraphQL query string from the RepositoryContributors class matches the expected query template by stripping whitespace and comparing the two strings.&lt;br /&gt;
&lt;br /&gt;
Unique Author Extraction:&lt;br /&gt;
The test_single_author function verifies that the extract_unique_author method correctly extracts the name and login of a single author from the provided mock data.&lt;br /&gt;
The test_multiple_authors function checks that multiple authors are accurately extracted, ensuring that their names and logins are included in the results.&lt;br /&gt;
This structured approach ensures that both the query generation and author extraction functionalities of the RepositoryContributors class are tested effectively.&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributor&lt;br /&gt;
[[File:test_contri.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
=Work Flow Diagram=&lt;br /&gt;
&amp;lt;b&amp;gt;OSS project phase 1:&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:GithubMiner.drawio.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&amp;lt;b&amp;gt;OSS project phase 2 after the changes were made:&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:GithubMiner2.drawio.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:GithubMiner2.drawio.png&amp;diff=159412</id>
		<title>File:GithubMiner2.drawio.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:GithubMiner2.drawio.png&amp;diff=159412"/>
		<updated>2024-11-13T03:11:43Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:GithubMiner.drawio.png&amp;diff=159410</id>
		<title>File:GithubMiner.drawio.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:GithubMiner.drawio.png&amp;diff=159410"/>
		<updated>2024-11-13T03:10:11Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=159408</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=159408"/>
		<updated>2024-11-13T03:09:13Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Implement a /graphql endpoint using Flask and flask-graphql and then configure the endpoint to handle POST requests containing GraphQL queries.&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement resolvers for each query type&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop a middleware to authenticate requests using GitHub personal access tokens&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement comprehensive error handling for API requests and responses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop integration tests to verify the interaction between Flask, GraphQL, and the GitHub API.&amp;lt;li&amp;gt;&lt;br /&gt;
* Test the complete request-response cycle for each implemented query.&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
[[File:original_hs.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refac_hs.png|center|thumb|500px|alt=]]&lt;br /&gt;
  * New Constants module and replaced all string literal in the query structure and data extraction with these constants. It includes node names, field names, and argument names.&lt;br /&gt;
  * Modified the `__init__` method to accept 'owner', 'repo_name', and 'pg_size' as parameters as it makes the class initialization more explicit.&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
[[File:original_russ.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repo.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
  * Removed the `RepositoryContributorsContribution` class and its associated methods. Focuses now on `RepositoryContributors` and `extract_unique_author`&lt;br /&gt;
  * This uses new constants for accessing dictionary keys as it makes more consistent&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
[[File:repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
  * Introduced a new constants module and replaced all string literal in the query structure and data extraction with these constants.&lt;br /&gt;
  * Modified extract_unique_author to use the safer 'get()' method while accessing dictionary keys.&lt;br /&gt;
&lt;br /&gt;
===/Constants===&lt;br /&gt;
&lt;br /&gt;
Field Constants&lt;br /&gt;
[[File:field_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
Node Constants&lt;br /&gt;
[[File:node_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
Argument Constants&lt;br /&gt;
[[File:arg_constant.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
&lt;br /&gt;
*Testing with pytest&lt;br /&gt;
 Test Discovery: pytest automatically discovers tests in the specified files (those starting with test_ or ending with _test.py) and runs them.&lt;br /&gt;
&lt;br /&gt;
*Fixtures:&lt;br /&gt;
 Fixtures are defined using the @pytest.fixture decorator. They provide reusable setup code for tests.In this case, mock_raw_data_single_author and &lt;br /&gt;
  mock_raw_data_multiple_authors provide simulated responses from a GitHub API for single and multiple authors.&lt;br /&gt;
&lt;br /&gt;
*Assertions: &lt;br /&gt;
 Each test function uses assert statements to check if the actual outputs match the expected results, helping verify the correctness of the code.&lt;br /&gt;
&lt;br /&gt;
*Execution: &lt;br /&gt;
 Run the tests with the command *python -m pytest -v [file name]* in the terminal, and it will show which tests passed or failed.&lt;br /&gt;
&lt;br /&gt;
Testing RepositoryContributors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
[[File:Graphql test2.jpeg|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Query Structure Test:&lt;br /&gt;
The test_repository_contributors_query_structure checks if the generated GraphQL query string from the RepositoryContributors class matches the expected query template by stripping whitespace and comparing the two strings.&lt;br /&gt;
&lt;br /&gt;
Unique Author Extraction:&lt;br /&gt;
The test_single_author function verifies that the extract_unique_author method correctly extracts the name and login of a single author from the provided mock data.&lt;br /&gt;
The test_multiple_authors function checks that multiple authors are accurately extracted, ensuring that their names and logins are included in the results.&lt;br /&gt;
This structured approach ensures that both the query generation and author extraction functionalities of the RepositoryContributors class are tested effectively.&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributor&lt;br /&gt;
[[File:test_contri.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
=Work Flow Diagram=&lt;br /&gt;
&amp;lt;b&amp;gt;OSS project phase 1:&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:Graphql test2.jpeg|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&amp;lt;b&amp;gt;OSS project phase 2 after the changes were made:&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:Graphql test2.jpeg|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158357</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158357"/>
		<updated>2024-10-30T02:54:21Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* /tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Implement a /graphql endpoint using Flask and flask-graphql and then configure the endpoint to handle POST requests containing GraphQL queries.&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement resolvers for each query type&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop a middleware to authenticate requests using GitHub personal access tokens&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement comprehensive error handling for API requests and responses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop integration tests to verify the interaction between Flask, GraphQL, and the GitHub API.&amp;lt;li&amp;gt;&lt;br /&gt;
* Test the complete request-response cycle for each implemented query.&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
  * New Constants module and replaced all string literal in the query structure and data extraction with these constants. It includes node names, field names, and argument names.&lt;br /&gt;
  * Modified the `__init__` method to accept 'owner', 'repo_name', and 'pg_size' as parameters as it makes the class initialization more explicit.&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
[[File:original_russ.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repo.png|center|thumb|500px|alt=]]&lt;br /&gt;
&lt;br /&gt;
  * Removed the `RepositoryContributorsContribution` class and its associated methods. Focuses now on `RepositoryContributors` and `extract_unique_author`&lt;br /&gt;
  * This uses new constants for accessing dictionary keys as it makes more consistent&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
[[File:repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
  * Introduced a new constants module and replaced all string literal in the query structure and data extraction with these constants.&lt;br /&gt;
  * Modified extract_unique_author to use the safer 'get()' method while accessing dictionary keys.&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
&lt;br /&gt;
*Testing with pytest&lt;br /&gt;
 Test Discovery: pytest automatically discovers tests in the specified files (those starting with test_ or ending with _test.py) and runs them.&lt;br /&gt;
&lt;br /&gt;
*Fixtures:&lt;br /&gt;
 Fixtures are defined using the @pytest.fixture decorator. They provide reusable setup code for tests.In this case, mock_raw_data_single_author and &lt;br /&gt;
  mock_raw_data_multiple_authors provide simulated responses from a GitHub API for single and multiple authors.&lt;br /&gt;
&lt;br /&gt;
*Assertions: &lt;br /&gt;
 Each test function uses assert statements to check if the actual outputs match the expected results, helping verify the correctness of the code.&lt;br /&gt;
&lt;br /&gt;
*Execution: &lt;br /&gt;
 Run the tests with the command *python -m pytest -v [file name]* in the terminal, and it will show which tests passed or failed.&lt;br /&gt;
&lt;br /&gt;
Testing RepositoryContributors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
[[File:Graphql test2.jpeg|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Query Structure Test:&lt;br /&gt;
The test_repository_contributors_query_structure checks if the generated GraphQL query string from the RepositoryContributors class matches the expected query template by stripping whitespace and comparing the two strings.&lt;br /&gt;
&lt;br /&gt;
Unique Author Extraction:&lt;br /&gt;
The test_single_author function verifies that the extract_unique_author method correctly extracts the name and login of a single author from the provided mock data.&lt;br /&gt;
The test_multiple_authors function checks that multiple authors are accurately extracted, ensuring that their names and logins are included in the results.&lt;br /&gt;
This structured approach ensures that both the query generation and author extraction functionalities of the RepositoryContributors class are tested effectively.&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributor&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158314</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158314"/>
		<updated>2024-10-30T02:47:35Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* /tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Implement a /graphql endpoint using Flask and flask-graphql and then configure the endpoint to handle POST requests containing GraphQL queries.&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement resolvers for each query type&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop a middleware to authenticate requests using GitHub personal access tokens&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement comprehensive error handling for API requests and responses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop integration tests to verify the interaction between Flask, GraphQL, and the GitHub API.&amp;lt;li&amp;gt;&lt;br /&gt;
* Test the complete request-response cycle for each implemented query.&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
  * New Constants module and replaced all string literal in the query structure and data extraction with these constants. It includes node names, field names, and argument names.&lt;br /&gt;
  * Modified the `__init__` method to accept 'owner', 'repo_name', and 'pg_size' as parameters as it makes the class initialization more explicit.&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
  * Removed the `RepositoryContributorsContribution` class and its associated methods. Focuses now on `RepositoryContributors` and `extract_unique_author`&lt;br /&gt;
  * This uses new constants for accessing dictionary keys as it makes more consistent&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
[[File:repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
  * Introduced a new constants module and replaced all string literal in the query structure and data extraction with these constants.&lt;br /&gt;
  * Modified extract_unique_author to use the safer 'get()' method while accessing dictionary keys.&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
Testing with pytest&lt;br /&gt;
Test Discovery: pytest automatically discovers tests in the specified files (those starting with test_ or ending with _test.py) and runs them.&lt;br /&gt;
&lt;br /&gt;
Fixtures:&lt;br /&gt;
Fixtures are defined using the @pytest.fixture decorator. They provide reusable setup code for tests.&lt;br /&gt;
In this case, mock_raw_data_single_author and mock_raw_data_multiple_authors provide simulated responses from a GitHub API for single and multiple authors.&lt;br /&gt;
&lt;br /&gt;
Assertions: &lt;br /&gt;
Each test function uses assert statements to check if the actual outputs match the expected results, helping verify the correctness of the code.&lt;br /&gt;
&lt;br /&gt;
Execution: &lt;br /&gt;
Run the tests with the command python -m pytest -v  in the terminal, and it will show which tests passed or failed.&lt;br /&gt;
&lt;br /&gt;
Testing RepositoryContributors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
[[File:Graphql test2.jpeg|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Query Structure Test:&lt;br /&gt;
The test_repository_contributors_query_structure checks if the generated GraphQL query string from the RepositoryContributors class matches the expected query template by stripping whitespace and comparing the two strings.&lt;br /&gt;
&lt;br /&gt;
Unique Author Extraction:&lt;br /&gt;
The test_single_author function verifies that the extract_unique_author method correctly extracts the name and login of a single author from the provided mock data.&lt;br /&gt;
The test_multiple_authors function checks that multiple authors are accurately extracted, ensuring that their names and logins are included in the results.&lt;br /&gt;
This structured approach ensures that both the query generation and author extraction functionalities of the RepositoryContributors class are tested effectively.&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Graphql_test2.jpeg&amp;diff=158308</id>
		<title>File:Graphql test2.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Graphql_test2.jpeg&amp;diff=158308"/>
		<updated>2024-10-30T02:47:01Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Test2.jpeg&amp;diff=158299</id>
		<title>File:Test2.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Test2.jpeg&amp;diff=158299"/>
		<updated>2024-10-30T02:44:49Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: Rlobo reverted File:Test2.jpeg to an old version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Test2.jpeg&amp;diff=158297</id>
		<title>File:Test2.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Test2.jpeg&amp;diff=158297"/>
		<updated>2024-10-30T02:44:32Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: Rlobo reverted File:Test2.jpeg to an old version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158292</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158292"/>
		<updated>2024-10-30T02:42:08Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* /tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Implement a /graphql endpoint using Flask and flask-graphql and then configure the endpoint to handle POST requests containing GraphQL queries.&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement resolvers for each query type&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop a middleware to authenticate requests using GitHub personal access tokens&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement comprehensive error handling for API requests and responses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop integration tests to verify the interaction between Flask, GraphQL, and the GitHub API.&amp;lt;li&amp;gt;&lt;br /&gt;
* Test the complete request-response cycle for each implemented query.&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
  * New Constants module and replaced all string literal in the query structure and data extraction with these constants. It includes node names, field names, and argument names.&lt;br /&gt;
  * Modified the `__init__` method to accept 'owner', 'repo_name', and 'pg_size' as parameters as it makes the class initialization more explicit.&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
  * Removed the `RepositoryContributorsContribution` class and its associated methods. Focuses now on `RepositoryContributors` and `extract_unique_author`&lt;br /&gt;
  * This uses new constants for accessing dictionary keys as it makes more consistent&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
[[File:repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
  * Introduced a new constants module and replaced all string literal in the query structure and data extraction with these constants.&lt;br /&gt;
  * Modified extract_unique_author to use the safer 'get()' method while accessing dictionary keys.&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
Testing with pytest&lt;br /&gt;
Test Discovery: pytest automatically discovers tests in the specified files (those starting with test_ or ending with _test.py) and runs them.&lt;br /&gt;
&lt;br /&gt;
Fixtures:&lt;br /&gt;
Fixtures are defined using the @pytest.fixture decorator. They provide reusable setup code for tests.&lt;br /&gt;
In this case, mock_raw_data_single_author and mock_raw_data_multiple_authors provide simulated responses from a GitHub API for single and multiple authors.&lt;br /&gt;
&lt;br /&gt;
Assertions: &lt;br /&gt;
Each test function uses assert statements to check if the actual outputs match the expected results, helping verify the correctness of the code.&lt;br /&gt;
&lt;br /&gt;
Execution: &lt;br /&gt;
Run the tests with the command python -m pytest -v  in the terminal, and it will show which tests passed or failed.&lt;br /&gt;
&lt;br /&gt;
Testing RepositoryContributors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.jpeg|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Query Structure Test:&lt;br /&gt;
The test_repository_contributors_query_structure checks if the generated GraphQL query string from the RepositoryContributors class matches the expected query template by stripping whitespace and comparing the two strings.&lt;br /&gt;
&lt;br /&gt;
Unique Author Extraction:&lt;br /&gt;
The test_single_author function verifies that the extract_unique_author method correctly extracts the name and login of a single author from the provided mock data.&lt;br /&gt;
The test_multiple_authors function checks that multiple authors are accurately extracted, ensuring that their names and logins are included in the results.&lt;br /&gt;
This structured approach ensures that both the query generation and author extraction functionalities of the RepositoryContributors class are tested effectively.&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Test2.jpeg&amp;diff=158281</id>
		<title>File:Test2.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Test2.jpeg&amp;diff=158281"/>
		<updated>2024-10-30T02:40:07Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: Rlobo uploaded a new version of File:Test2.jpeg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158279</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158279"/>
		<updated>2024-10-30T02:39:09Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* /tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Implement a /graphql endpoint using Flask and flask-graphql and then configure the endpoint to handle POST requests containing GraphQL queries.&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement resolvers for each query type&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop a middleware to authenticate requests using GitHub personal access tokens&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement comprehensive error handling for API requests and responses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop integration tests to verify the interaction between Flask, GraphQL, and the GitHub API.&amp;lt;li&amp;gt;&lt;br /&gt;
* Test the complete request-response cycle for each implemented query.&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
  * New Constants module and replaced all string literal in the query structure and data extraction with these constants. It includes node names, field names, and argument names.&lt;br /&gt;
  * Modified the `__init__` method to accept 'owner', 'repo_name', and 'pg_size' as parameters as it makes the class initialization more explicit.&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
  * Removed the `RepositoryContributorsContribution` class and its associated methods. Focuses now on `RepositoryContributors` and `extract_unique_author`&lt;br /&gt;
  * This uses new constants for accessing dictionary keys as it makes more consistent&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
[[File:repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
  * Introduced a new constants module and replaced all string literal in the query structure and data extraction with these constants.&lt;br /&gt;
  * Modified extract_unique_author to use the safer 'get()' method while accessing dictionary keys.&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
Testing with pytest&lt;br /&gt;
Test Discovery: pytest automatically discovers tests in the specified files (those starting with test_ or ending with _test.py) and runs them.&lt;br /&gt;
&lt;br /&gt;
Fixtures:&lt;br /&gt;
Fixtures are defined using the @pytest.fixture decorator. They provide reusable setup code for tests.&lt;br /&gt;
In this case, mock_raw_data_single_author and mock_raw_data_multiple_authors provide simulated responses from a GitHub API for single and multiple authors.&lt;br /&gt;
&lt;br /&gt;
Assertions: &lt;br /&gt;
Each test function uses assert statements to check if the actual outputs match the expected results, helping verify the correctness of the code.&lt;br /&gt;
&lt;br /&gt;
Execution: &lt;br /&gt;
Run the tests with the command python -m pytest -v  in the terminal, and it will show which tests passed or failed.&lt;br /&gt;
&lt;br /&gt;
Testing RepositoryContributors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
[[File:repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
[[File:refactored_repository_contributors.png|center|thumb|500px|alt=Code for the RepositoryContributors class showing the query structure in a hierarchical format]]&lt;br /&gt;
&lt;br /&gt;
Query Structure Test:&lt;br /&gt;
The test_repository_contributors_query_structure checks if the generated GraphQL query string from the RepositoryContributors class matches the expected query template by stripping whitespace and comparing the two strings.&lt;br /&gt;
&lt;br /&gt;
Unique Author Extraction:&lt;br /&gt;
The test_single_author function verifies that the extract_unique_author method correctly extracts the name and login of a single author from the provided mock data.&lt;br /&gt;
The test_multiple_authors function checks that multiple authors are accurately extracted, ensuring that their names and logins are included in the results.&lt;br /&gt;
This structured approach ensures that both the query generation and author extraction functionalities of the RepositoryContributors class are tested effectively.&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158208</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158208"/>
		<updated>2024-10-30T02:20:34Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* /tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Implement a /graphql endpoint using Flask and flask-graphql and then configure the endpoint to handle POST requests containing GraphQL queries.&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement resolvers for each query type&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop a middleware to authenticate requests using GitHub personal access tokens&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement comprehensive error handling for API requests and responses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop integration tests to verify the interaction between Flask, GraphQL, and the GitHub API.&amp;lt;li&amp;gt;&lt;br /&gt;
* Test the complete request-response cycle for each implemented query.&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
  * New Constants module and replaced all string literal in the query structure and data extraction with these constants. It includes node names, field names, and argument names.&lt;br /&gt;
  * Modified the `__init__` method to accept 'owner', 'repo_name', and 'pg_size' as parameters as it makes the class initialization more explicit.&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
  * Removed the `RepositoryContributorsContribution` class and its associated methods. Focuses now on `RepositoryContributors` and `extract_unique_author`&lt;br /&gt;
  * This uses new constants for accessing dictionary keys as it makes more consistent&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
&lt;br /&gt;
  * Introduced a new constants module and replaced all string literal in the query structure and data extraction with these constants.&lt;br /&gt;
  * Modified extract_unique_author to use the safer 'get()' method while accessing dictionary keys.&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
Testing with pytest&lt;br /&gt;
Test Discovery: pytest automatically discovers tests in the specified files (those starting with test_ or ending with _test.py) and runs them.&lt;br /&gt;
&lt;br /&gt;
Fixtures:&lt;br /&gt;
Fixtures are defined using the @pytest.fixture decorator. They provide reusable setup code for tests.&lt;br /&gt;
In this case, mock_raw_data_single_author and mock_raw_data_multiple_authors provide simulated responses from a GitHub API for single and multiple authors.&lt;br /&gt;
&lt;br /&gt;
Assertions: &lt;br /&gt;
Each test function uses assert statements to check if the actual outputs match the expected results, helping verify the correctness of the code.&lt;br /&gt;
&lt;br /&gt;
Execution: &lt;br /&gt;
Run the tests with the command python -m pytest -v  in the terminal, and it will show which tests passed or failed.&lt;br /&gt;
&lt;br /&gt;
Testing RepositoryContributors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
Query Structure Test:&lt;br /&gt;
The test_repository_contributors_query_structure checks if the generated GraphQL query string from the RepositoryContributors class matches the expected query template by stripping whitespace and comparing the two strings.&lt;br /&gt;
&lt;br /&gt;
Unique Author Extraction:&lt;br /&gt;
The test_single_author function verifies that the extract_unique_author method correctly extracts the name and login of a single author from the provided mock data.&lt;br /&gt;
The test_multiple_authors function checks that multiple authors are accurately extracted, ensuring that their names and logins are included in the results.&lt;br /&gt;
This structured approach ensures that both the query generation and author extraction functionalities of the RepositoryContributors class are tested effectively.&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158203</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158203"/>
		<updated>2024-10-30T02:19:04Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* /tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Implement a /graphql endpoint using Flask and flask-graphql and then configure the endpoint to handle POST requests containing GraphQL queries.&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement resolvers for each query type&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop a middleware to authenticate requests using GitHub personal access tokens&amp;lt;li&amp;gt;&lt;br /&gt;
* Implement comprehensive error handling for API requests and responses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&amp;lt;li&amp;gt;&lt;br /&gt;
* Develop integration tests to verify the interaction between Flask, GraphQL, and the GitHub API.&amp;lt;li&amp;gt;&lt;br /&gt;
* Test the complete request-response cycle for each implemented query.&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
  * New Constants module and replaced all string literal in the query structure and data extraction with these constants. It includes node names, field names, and argument names.&lt;br /&gt;
  * Modified the `__init__` method to accept 'owner', 'repo_name', and 'pg_size' as parameters as it makes the class initialization more explicit.&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
  * Removed the `RepositoryContributorsContribution` class and its associated methods. Focuses now on `RepositoryContributors` and `extract_unique_author`&lt;br /&gt;
  * This uses new constants for accessing dictionary keys as it makes more consistent&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
&lt;br /&gt;
  * Introduced a new constants module and replaced all string literal in the query structure and data extraction with these constants.&lt;br /&gt;
  * Modified extract_unique_author to use the safer 'get()' method while accessing dictionary keys.&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
Testing with pytest&lt;br /&gt;
Test Discovery: pytest automatically discovers tests in the specified files (those starting with test_ or ending with _test.py) and runs them.&lt;br /&gt;
&lt;br /&gt;
Fixtures:&lt;br /&gt;
Fixtures are defined using the @pytest.fixture decorator. They provide reusable setup code for tests.&lt;br /&gt;
In this case, mock_raw_data_single_author and mock_raw_data_multiple_authors provide simulated responses from a GitHub API for single and multiple authors.&lt;br /&gt;
&lt;br /&gt;
Assertions: &lt;br /&gt;
Each test function uses assert statements to check if the actual outputs match the expected results, helping verify the correctness of the code.&lt;br /&gt;
&lt;br /&gt;
Execution: &lt;br /&gt;
Run the tests with the command pytest in the terminal, and it will show which tests passed or failed.&lt;br /&gt;
&lt;br /&gt;
Testing RepositoryContributors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
Query Structure Test:&lt;br /&gt;
The test_repository_contributors_query_structure checks if the generated GraphQL query string from the RepositoryContributors class matches the expected query template by stripping whitespace and comparing the two strings.&lt;br /&gt;
&lt;br /&gt;
Unique Author Extraction:&lt;br /&gt;
The test_single_author function verifies that the extract_unique_author method correctly extracts the name and login of a single author from the provided mock data.&lt;br /&gt;
The test_multiple_authors function checks that multiple authors are accurately extracted, ensuring that their names and logins are included in the results.&lt;br /&gt;
This structured approach ensures that both the query generation and author extraction functionalities of the RepositoryContributors class are tested effectively.&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158056</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158056"/>
		<updated>2024-10-30T01:26:50Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* Github Repository */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Integrate existing code with Flask to expose GraphQL queries as API endpoints.&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158055</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158055"/>
		<updated>2024-10-30T01:26:12Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* Github Miner */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the &lt;br /&gt;
GitHub repository[https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
This project implements a Flask-based GraphQL API that provides access to GitHub user contribution metrics. It serves as a bridge between client applications and the GitHub GraphQL API, offering a streamlined interface for querying user activity data.&lt;br /&gt;
*  GraphQL Integration: Utilizes the flask-graphql library to seamlessly integrate GraphQL functionality into a Flask application&amp;lt;/li&amp;gt;&lt;br /&gt;
*  GitHub API Interaction: Communicates with the GitHub GraphQL API to fetch user contribution data, including repository information and activity metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Customizable Queries: Supports flexible queries allowing clients to request specific user data and metrics&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Authentication: Implements secure authentication using GitHub personal access tokens&amp;lt;/li&amp;gt;&lt;br /&gt;
*  Scalable Architecture: Designed with modularity in mind, allowing for easy expansion of query types and addition of new features&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Integrate existing code with Flask to expose GraphQL queries as API endpoints.&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158031</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158031"/>
		<updated>2024-10-30T01:19:52Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: /* Github Miner */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the GitHub repository [https://github.ncsu.edu/hshelar/GitHub_Miner/tree/refactor_repository].&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
Refactor the GraphQL API endpoint for contribution metrics by &lt;br /&gt;
*  replacing hard-coded variables with reusable constants&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Integrate existing code with Flask to expose GraphQL queries as API endpoints.&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158024</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=158024"/>
		<updated>2024-10-30T01:18:44Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Github Miner=&lt;br /&gt;
&lt;br /&gt;
GitHub Miner is a versatile tool designed to interact with GitHub's APIs, allowing users to query and retrieve valuable insights and detailed information about GitHub profiles, repositories, and activities. It supports a range of functions to facilitate data extraction, such as:&lt;br /&gt;
&lt;br /&gt;
Tracking a user’s contributions over time to understand their activity levels and areas of focus.&lt;br /&gt;
Compiling comments made by a user, which can shed light on their interactions, discussions, and contributions to collaborative work.&lt;br /&gt;
Listing repositories owned by the user, providing a clear view of their projects, technical interests, and areas of expertise.&lt;br /&gt;
Beyond these core functions, GitHub Miner includes several other methods aimed at delivering in-depth analytics from GitHub data, making it useful for developers, recruiters, and researchers who need to analyze GitHub activity. For more details, comprehensive documentation on the available methods and their usage can be found on the GitHub repository&lt;br /&gt;
&lt;br /&gt;
=Project Description=&lt;br /&gt;
&lt;br /&gt;
Refactor the GraphQL API endpoint for contribution metrics by &lt;br /&gt;
*  replacing hard-coded variables with reusable constants&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Key Objectives=&lt;br /&gt;
API Endpoint Development:&lt;br /&gt;
&lt;br /&gt;
* Integrate existing code with Flask to expose GraphQL queries as API endpoints.&lt;br /&gt;
&lt;br /&gt;
Testing and Validation:&lt;br /&gt;
&lt;br /&gt;
* Conduct thorough testing (unit tests and integration tests) to verify the correctness and reliability of the implemented endpoints. Validate API functionality across different scenarios to ensure robustness and reliability.&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
===/repositories===&lt;br /&gt;
&lt;br /&gt;
* repository_commits&lt;br /&gt;
&lt;br /&gt;
* repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
* repository_contributors&lt;br /&gt;
&lt;br /&gt;
===/tests===&lt;br /&gt;
&lt;br /&gt;
* test_repository_commits&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors_contribution&lt;br /&gt;
&lt;br /&gt;
* test_repository_contributors&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
&lt;br /&gt;
Harsh Shelar&lt;br /&gt;
&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
&lt;br /&gt;
=Github Repository=&lt;br /&gt;
&lt;br /&gt;
original: https://github.ncsu.edu/jcui9/GitHub_Miner&lt;br /&gt;
&lt;br /&gt;
forked: https://github.ncsu.edu/hshelar/GitHub_Miner&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=157974</id>
		<title>CSC/ECE 517 Fall 2024 - G2402 Refactor Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_G2402_Refactor_Graphql_API_endpoint_for_repositories&amp;diff=157974"/>
		<updated>2024-10-30T00:48:16Z</updated>

		<summary type="html">&lt;p&gt;Rlobo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Objectives ===&lt;br /&gt;
&lt;br /&gt;
1. API Integration: Transform existing GitHub GraphQL queries into accessible endpoints using Flask frameworke&lt;br /&gt;
2. Testing Implementation: Develop comprehensive testing protocols for endpoint validation&lt;br /&gt;
3. Documentation: Provide detailed API documentation and usage guidelines&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. GraphQL Query Framework:&lt;br /&gt;
* Modular query construction system&lt;br /&gt;
* Support for paginated data requests&lt;br /&gt;
* Comprehensive error handling&lt;br /&gt;
* Rate limiting management&lt;br /&gt;
&lt;br /&gt;
3. API Endpoint Capabilities:&lt;br /&gt;
* User profile statistics retrieval&lt;br /&gt;
* Contribution metrics collection&lt;br /&gt;
* Repository-specific data access&lt;br /&gt;
* Commit history analysis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GraphQL API Endpoint Refactoring ==&lt;br /&gt;
This section details the refactoring process of existing GraphQL queries into accessible API endpoints through Python Flask framework. The refactoring aims to transform standalone GraphQL queries into organized, maintainable API endpoints that can be easily accessed and integrated with other systems.&lt;br /&gt;
&lt;br /&gt;
=== Current Codebase Overview ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Query Framework:&lt;br /&gt;
* QueryNode class for basic GraphQL query construction&lt;br /&gt;
* QueryNodePaginator for handling paginated requests&lt;br /&gt;
* Query and PaginatedQuery classes for terminal query execution[1]&lt;br /&gt;
&lt;br /&gt;
3. Existing Queries:&lt;br /&gt;
* User login information retrieval&lt;br /&gt;
* Profile statistics collection&lt;br /&gt;
* Contribution metrics gathering&lt;br /&gt;
* Repository-specific data access[1]&lt;br /&gt;
&lt;br /&gt;
=== Integration with Flask ===&lt;br /&gt;
&lt;br /&gt;
1. Framework Setup:&lt;br /&gt;
* Implementation of Flask application structure&lt;br /&gt;
* Configuration of necessary routes and endpoints&lt;br /&gt;
* Integration of authentication middleware&lt;br /&gt;
&lt;br /&gt;
2. API Endpoint Structure:&lt;br /&gt;
* /api/v1/user/login - User authentication endpoint&lt;br /&gt;
* /api/v1/user/profile - Profile statistics endpoint&lt;br /&gt;
* /api/v1/user/contributions - Contribution metrics endpoint&lt;br /&gt;
* /api/v1/repositories - Repository data endpoint&lt;br /&gt;
&lt;br /&gt;
== Development Process ==&lt;br /&gt;
&lt;br /&gt;
=== API Endpoint Development ===&lt;br /&gt;
&lt;br /&gt;
1. Authentication Implementation:&lt;br /&gt;
* Integration of PersonalAccessTokenAuthenticator with Flask&lt;br /&gt;
* Setup of secure token validation&lt;br /&gt;
* Implementation of error handling for authentication failures&lt;br /&gt;
&lt;br /&gt;
2. Query Integration:&lt;br /&gt;
* Conversion of existing GraphQL queries to API endpoints&lt;br /&gt;
* Implementation of request parameter validation&lt;br /&gt;
* Response formatting and standardization&lt;br /&gt;
&lt;br /&gt;
3. Rate Limiting:&lt;br /&gt;
* Implementation of GitHub API rate limit handling&lt;br /&gt;
* Query optimization for efficient resource usage&lt;br /&gt;
* Cache implementation for frequently accessed data&lt;br /&gt;
&lt;br /&gt;
=== Testing and Validation ===&lt;br /&gt;
&lt;br /&gt;
1. Unit Testing:&lt;br /&gt;
* Authentication mechanism testing&lt;br /&gt;
* Individual endpoint validation&lt;br /&gt;
* Query response verification&lt;br /&gt;
&lt;br /&gt;
2. Integration Testing:&lt;br /&gt;
* End-to-end API flow testing&lt;br /&gt;
* Rate limit handling verification&lt;br /&gt;
* Error scenario validation&lt;br /&gt;
&lt;br /&gt;
3. Performance Testing:&lt;br /&gt;
* Response time measurement&lt;br /&gt;
* Resource usage monitoring&lt;br /&gt;
* Scalability assessment&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
This project addresses the challenges in analyzing students' pre-class GitHub contributions and their correlation with academic performance through an efficient API system.&lt;br /&gt;
&lt;br /&gt;
=== Existing Challenges ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Technical Limitations:&lt;br /&gt;
   * Complex GraphQL query structure requiring specialized knowledge&lt;br /&gt;
   * Lack of standardized API endpoints for contribution metrics&lt;br /&gt;
   * Rate limiting constraints from GitHub API&lt;br /&gt;
&lt;br /&gt;
3. Integration Challenges:&lt;br /&gt;
   * Difficulty in connecting with existing academic systems&lt;br /&gt;
   * Absence of automated data collection mechanisms&lt;br /&gt;
   * Limited scalability for multiple course sections&lt;br /&gt;
&lt;br /&gt;
=== Proposed Solutions ===&lt;br /&gt;
&lt;br /&gt;
1. API Development:&lt;br /&gt;
   * Creation of RESTful endpoints using Flask framework&lt;br /&gt;
   * Implementation of efficient GraphQL query management&lt;br /&gt;
   * Development of robust authentication system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. System Integration:&lt;br /&gt;
   * Seamless integration with academic platforms&lt;br /&gt;
   * Automated reporting mechanisms&lt;br /&gt;
   * Scalable architecture for multiple courses&lt;br /&gt;
&lt;br /&gt;
== Workflow Diagram ==&lt;br /&gt;
&lt;br /&gt;
=== Initial Setup ===&lt;br /&gt;
&lt;br /&gt;
1. Environment Configuration:&lt;br /&gt;
   * Python virtual environment setup&lt;br /&gt;
   * Installation of required dependencies&lt;br /&gt;
   * Configuration of GitHub PAT authentication&lt;br /&gt;
&lt;br /&gt;
2. Base Structure Implementation:&lt;br /&gt;
   * Flask application framework setup&lt;br /&gt;
   * GraphQL query structure development&lt;br /&gt;
   * Authentication system integration&lt;br /&gt;
&lt;br /&gt;
3. Database Configuration:&lt;br /&gt;
   * Schema design for contribution metrics&lt;br /&gt;
   * Integration with data storage system&lt;br /&gt;
   * Implementation of caching mechanisms&lt;br /&gt;
&lt;br /&gt;
=== Integration Steps ===&lt;br /&gt;
&lt;br /&gt;
1. API Development Phase:&lt;br /&gt;
   * Implementation of core API endpoints&lt;br /&gt;
   * Integration of GraphQL queries&lt;br /&gt;
   * Development of response formatting&lt;br /&gt;
&lt;br /&gt;
2. Testing Implementation:&lt;br /&gt;
   * Unit test development&lt;br /&gt;
   * Integration test setup&lt;br /&gt;
   * Performance testing protocols&lt;br /&gt;
&lt;br /&gt;
3. Deployment Process:&lt;br /&gt;
   * Server configuration&lt;br /&gt;
   * Environment variable setup&lt;br /&gt;
   * Production deployment procedures&lt;br /&gt;
&lt;br /&gt;
== Design Patterns and Architecture ==&lt;br /&gt;
The project implements several design patterns to ensure maintainable, scalable, and efficient code structure.&lt;br /&gt;
&lt;br /&gt;
1. Factory Pattern:&lt;br /&gt;
   * Implementation in authentication system&lt;br /&gt;
   * Creation of GraphQL query objects&lt;br /&gt;
   * Dynamic endpoint generation&lt;br /&gt;
&lt;br /&gt;
2. Singleton Pattern:&lt;br /&gt;
   * Client instance management&lt;br /&gt;
   * Configuration handling&lt;br /&gt;
   * Rate limiter implementation&lt;br /&gt;
&lt;br /&gt;
3. Strategy Pattern:&lt;br /&gt;
   * Query execution strategies&lt;br /&gt;
   * Authentication mechanisms&lt;br /&gt;
   * Response formatting&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
&lt;br /&gt;
1. Core Files:&lt;br /&gt;
   * github_graphql/authentication.py&lt;br /&gt;
   * github_graphql/client.py&lt;br /&gt;
   * github_graphql/query.py&lt;br /&gt;
   * queries/login.py&lt;br /&gt;
&lt;br /&gt;
2. Test Files:&lt;br /&gt;
   * tests/test_authentication.py&lt;br /&gt;
   * tests/test_client.py&lt;br /&gt;
   * tests/test_query.py&lt;br /&gt;
&lt;br /&gt;
3. Configuration Files:&lt;br /&gt;
   * requirements.txt&lt;br /&gt;
   * .env.example&lt;br /&gt;
   * setup.py&lt;br /&gt;
&lt;br /&gt;
== Solutions/Details of Changes Made ==&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 solution approach ===&lt;br /&gt;
&lt;br /&gt;
1. Authentication System Implementation:&lt;br /&gt;
   * Created PersonalAccessTokenAuthenticator class&lt;br /&gt;
   * Implemented secure token management&lt;br /&gt;
   * Added environment variable handling&lt;br /&gt;
&lt;br /&gt;
2. Query Framework Development:&lt;br /&gt;
   * Developed QueryNode base class&lt;br /&gt;
   * Implemented Query and PaginatedQuery classes&lt;br /&gt;
   * Added support for complex query construction&lt;br /&gt;
&lt;br /&gt;
3. Core Functionality:&lt;br /&gt;
   * Basic API endpoint setup&lt;br /&gt;
   * Integration with Flask framework&lt;br /&gt;
   * Initial error handling implementation&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 solution approach ===&lt;br /&gt;
&lt;br /&gt;
1. Advanced Features:&lt;br /&gt;
   * Pagination support for large datasets&lt;br /&gt;
   * Rate limiting management&lt;br /&gt;
   * Cache implementation&lt;br /&gt;
&lt;br /&gt;
2. System Optimization:&lt;br /&gt;
   * Query performance improvements&lt;br /&gt;
   * Response time optimization&lt;br /&gt;
   * Memory usage optimization&lt;br /&gt;
&lt;br /&gt;
3. Security Enhancements:&lt;br /&gt;
   * Token validation improvement&lt;br /&gt;
   * Request validation&lt;br /&gt;
   * Error handling enhancement&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing ===&lt;br /&gt;
&lt;br /&gt;
1. Authentication Tests:&lt;br /&gt;
   ```python&lt;br /&gt;
   def test_token_validation():&lt;br /&gt;
       authenticator = PersonalAccessTokenAuthenticator(token)&lt;br /&gt;
       assert authenticator.validate_token()&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
2. Query Tests:&lt;br /&gt;
   ```python&lt;br /&gt;
   def test_query_construction():&lt;br /&gt;
       query = QueryNode(&amp;quot;user&amp;quot;, [&amp;quot;login&amp;quot;, &amp;quot;email&amp;quot;])&lt;br /&gt;
       assert str(query) == &amp;quot;user { login email }&amp;quot;&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
3. Client Tests:&lt;br /&gt;
   ```python&lt;br /&gt;
   def test_client_execution():&lt;br /&gt;
       client = Client(protocol, host, authenticator)&lt;br /&gt;
       response = client.execute(query, substitutions)&lt;br /&gt;
       assert response.status_code == 200&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
=== Integration Testing ===&lt;br /&gt;
&lt;br /&gt;
1. End-to-End Flow Tests:&lt;br /&gt;
   * API endpoint accessibility&lt;br /&gt;
   * Authentication flow&lt;br /&gt;
   * Query execution chain&lt;br /&gt;
&lt;br /&gt;
2. Performance Tests:&lt;br /&gt;
   * Response time measurements&lt;br /&gt;
   * Rate limit handling&lt;br /&gt;
   * Resource usage monitoring&lt;br /&gt;
&lt;br /&gt;
3. Error Handling Tests:&lt;br /&gt;
   * Invalid token scenarios&lt;br /&gt;
   * Malformed query handling&lt;br /&gt;
   * Network error recovery&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
=== API Endpoints Overview ===&lt;br /&gt;
&lt;br /&gt;
1. Authentication Endpoints:&lt;br /&gt;
   * POST /api/v1/auth/token&lt;br /&gt;
   * GET /api/v1/auth/validate&lt;br /&gt;
&lt;br /&gt;
2. User Data Endpoints:&lt;br /&gt;
   * GET /api/v1/user/profile&lt;br /&gt;
   * GET /api/v1/user/contributions&lt;br /&gt;
   * GET /api/v1/user/repositories&lt;br /&gt;
&lt;br /&gt;
3. Repository Endpoints:&lt;br /&gt;
   * GET /api/v1/repos/{owner}/{name}&lt;br /&gt;
   * GET /api/v1/repos/{owner}/{name}/commits&lt;br /&gt;
&lt;br /&gt;
=== Usage Instructions ===&lt;br /&gt;
&lt;br /&gt;
1. Environment Setup:&lt;br /&gt;
   ```bash&lt;br /&gt;
   python -m venv venv&lt;br /&gt;
   source venv/bin/activate&lt;br /&gt;
   pip install -r requirements.txt&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
2. Configuration:&lt;br /&gt;
   ```bash&lt;br /&gt;
   cp .env.example .env&lt;br /&gt;
   # Add your GitHub PAT to .env file&lt;br /&gt;
   GITHUB_TOKEN=your_token_here&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
3. API Usage:&lt;br /&gt;
   ```python&lt;br /&gt;
   from github_graphql import Client&lt;br /&gt;
   &lt;br /&gt;
   client = Client()&lt;br /&gt;
   response = client.execute(UserProfileStats(), {&amp;quot;user&amp;quot;: &amp;quot;username&amp;quot;})&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Mentor:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Jialin Cui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Team Members:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manan Manojkumar Tiwari&lt;br /&gt;
Russel Andrew Lobo&lt;br /&gt;
Harsh Shelar&lt;/div&gt;</summary>
		<author><name>Rlobo</name></author>
	</entry>
</feed>