Skip to content

My full report of my Google Summer of Code 2024 contributions.

License

Notifications You must be signed in to change notification settings

valens200/GSoC-2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Google Summer of Code 2024

A full report on my Google Summer of Code 2024 work with FOSSology

Project: "REST API Improvements" πŸ‘¨β€πŸ’»

Project Details | Contributions | Documentation | Deliverables | Major Takeaways | Acknowledgements | Future ventures

πŸ“ Project Details

Overview

This project aims to address the need for improving and upgrading APIs on FOSSology to version 2 by identifying areas for enhancement, fixing issues, and ensuring that clients using V1 aren't affected. To solve this, There are three main objectives to focus on. First, enhancing existing APIs by adding missing features for comprehensive implementation. Second, upgrading REST APIs to version 2, fixing bugs, and adopting new design patterns for efficient functionality. Additionally, any new endpoints added will adhere to Version 2 standards. My plan includes quality assurance measures, such as unit and integration testing, to ensure all requirements are met satisfactorily. Overall, my goal is to improve the usability and effectiveness of FOSSology's APIs for a better user experience.

Milestones and Tasks

Milestone 1: Enhance the existing unit test coverage for APIs

  • Enhance Unit Tests for /folder, /group, /license, /upload endpoints.
  • Enhance Unit Tests for /maintenance, /upload_tree, /info endpoints.

Milestone 2: Complete upgradation & improvement of all endpoints' tests to version 2.

  • Upgrade & Improve /folder, /group, /info,overview,job,copyright tests.
  • Upgrade & Improve /license, /maintenance, /upload, /user tests.

Milestone 3: Complete addition of new Unit tests for all endpoints

  • Add Unit Tests for /upload, /folder, /group, /license endpints.
  • Add Unit Tests for /maintenance, /copyright, /overview, /report,/job endpoints.

Milestone 4: Complete addition of Unit tests for all models

  • Add Unit Tests for upload, folder, group, scanCode,GroupPermissions, and UploadSummary models.
  • Add Unit Tests for UserGroupMember, Job, BulkHistory, Analysis, and ApiVersion models.
  • Add Unit Tests for agent, decider, fileInfo, group,licenseCandidate, and permissions models.

Milestone 5: Complete addition of integration tests for Data Acess Objects (DAOs)

  • Add integration Tests for folder, agent, and pfile DAOs.
  • Add integration Tests for license, upload, uploadPermssions, and showJobs models.


🌏 Contributions

During my participation in the Google Summer of Code (GSoC) program, I focused on enhancing the quality of the system by improving and adding new unit and integration test cases. Through this, I tested all functionalities to verify whether they work as expected and met the requirements. After finishing unit test cases development for APIs and models, I tackled integration tests for Data Access Objects (DAOs).

  1. Unit tests development

  • I developed new unit test cases for all controllers and models contributing to the quality improvement of the software, verifying that API units and models are working as expected.
  1. Api test cases upgrade to version 2

  • Since my collegue Divij was upgrading REST APIs to version 2, the same to my side, I dedicate my time to upgrade all test cases to version 2.
  1. Integration tests development

  • Finally, After improving and enhancing the existing test cases in Data Access Objects (DAOs), I developed new integration test cases verifying that all DAOs components and database are properly working together to meet the requirements as expected.

Unit test cases development:

Upgradation of REST APIs unit tests to Version 2 πŸ‘¨β€πŸ’»

  1. Upgrade /MaintenanceControllerTest,LicenseControllerTest,GroupControllerTest,CopyrightsControllerTest,UploadControllerTest, and UserContollerTest to support version 2.

  2. Added MaintenanceControllerTest, and UploadTreeControllerTest.

MaintenanceControllerTest

I added more than 5 test cases to ensure that maintenance functionalities work as expected.

image

UploadTreeControllerTest

  - Improved up to 30 test cases, checking whether they work propery and meet the expected needs.
  - Added 16 more test cases, making sure that all APIs in UploadTreeControllerTest are covered.
  - Checked and verified that the UploadTree API works as expected and meets the requirements.

image

- `LicenseControllerTest`, `GroupControllerTest`, `CopyrightsControllerTest`,`UploadControllerTest`, and `FolderControllerTest` [#2827](https://github.com/fossology/fossology/pull/2827) and [#2834]https://github.com/fossology/fossology/pull/2834

LicenseControllerTest

  - Improved up to 19 test cases in LicenseControllerTest, checking whether they work propery and meet the expected needs.
  - Added more than 31 new test cases, making sure that all APIs in LicenseController are covered.
  - Checked and verified that the Upload API works as expected and meets the requirements.

image

UploadControllerTest

  - Improved up to 30 test cases, checking whether they work propery and meet the expected needs.
  - Added more than 16 new test cases, making sure that all APIs in UploadController are covered.
  - Checked and verified that the Upload API works as expected and meets the requirements.

image

FolderControllerTest

  - Improved up to 20 test cases, checking whether they work propery and meet the expected needs.
  - Added up to 10 new test cases, making sure that all APIs in FolderController are covered.
  - Checked and verified that the Folder API works as expected and meets the requirements.

image

GroupControllerTest

  - Improved up to 8 existing test cases, checking whether they work propery and meet the expected needs.
  - Added up to 17 new test cases, making sure that all APIs in GroupController are covered.
  - Checked and verified that the Group API works as expected and meets the requirements.

image

CopyrightsControllerTest

  - Initiated the test and added up to 20 new test cases, making sure that all APIs in CopyrightsController are covered.
  - Checked and verified that the Copyrights API works as expected and meets the requirements.

image

Models test cases.

Models tests are numerous but I would like to show some screenshoots.

  • AnaysisTest, BulkHistroryTest, ScanCodeTest, FolderTest and so on.. #2825

AnaysisTest

  - Improved up to 5 existing test cases, checking whether member variables and methods in Analysis model work as expected and meet the requirements.
  - Added up to 11 new test cases, making sure that all member variables and methods in Analysis model are covered.
  - Checked and verified that the Analysis model works as expected and meets the requirements.

image

ScanCodeTest

  - Created the test and introduced up to 5 new tests, making sure that all member variables and methods in ScanCode model are covered.
  - Checked and verified that the ScanCode model works as expected and meets the requirements.

image

BulkHistroryTest

  - Created the test and introduced up to 8 new tests, making sure that all member variables and methods in BulkHistrory model are covered.
  - Checked and verified that the BulkHistrory model works as expected and meets the requirements.

image

FolderTest

  - Improved 1 test case that was existing.
  - Added up to 5 new test cases, making sure that all member variables and methods in Folder model are covered.
  - Checked and verified that the Folder model works as expected and meets the requirements.

image

  • LicenseCandidateTest, AgentTest, DeciderTest,and so on.. #2829

LicenseCandidateTest

  - Created the test model and introduced up to 13 new tests, making sure that all member variables and methods in LicenseCandidate model are covered.
  - Checked and verified that the LicenseCandidate model works as expected and meets the requirements.

image

AgentTest

  - Created the test model and introduced up to 13 new tests, making sure that all member variables and methods in Agent model are covered.
  - Checked and verified that the Agent model works as expected and meets the requirements.

image

DeciderTest

  - I enhanced up to 4 tests that were existing.
  - I added up to 2 new tests, making sure that all member variables and methods in Decider model are covered.
  - Checked and verified that the Decider model works as expected and meets the requirements.

image

Integration test cases development.

  • Added more integration test cases for FolderDAOTest #2830

FolderDAOTest

  - I enhanced up to 16 tests that were existing.
  - I added up to 13 new tests, making sure that all member variables and methods in FolderDao model are covered.
  - Checked and verified that the integration between Database, FolderDao and other components work as expected and meets the requirements.

image

  • Added more integration tests for PfileDAOTest, ShowJobsDAOTest,UploadPermissionsDAOTest, UploadDATest and so on.. #2832

UploadPermissionsDAOTest

  - I enhanced and added new test cases, making sure that all member variables and methods in UploadPermissionsDAO model are covered.
  - Checked and verified that the integration between Database, UploadPermissionsDAO and other components work as expected and meets the requirements.

image

PfileDAOTest

  - I enhanced and added new test cases, making sure that all member variables and methods in PfileDAO model are covered.
  - Checked and verified that the integration between Database, PfileDAO and other components work as expected and meets the requirements.

image image

ShowJobsDAOTest

  - I enhanced and added new test cases, making sure that all member variables and methods in ShowJobsDAO model are covered.
  - Checked and verified that the integration between Database, ShowJobsDAO and other components work as expected and meets the requirements.

image image

Documentation:πŸ“„

Throughout the 12 weeks of the GSoC period, I created weekly documentation for recording and tracking my progress. The documentation can be found here

πŸ‘¨πŸ»β€πŸ« DELIVERABLES

Tasks Planned Completed Remarks
Upgrade and Improve all REST API unit tests Yes βœ”οΈ
I have improved and added new unit tests for APIs Yes βœ”οΈ
Enhanced and added new unit tests for models Yes βœ”οΈ
Improved and added new integration tests for Data Access Objects Yes βœ”οΈ(partially) There's still a work ahead to ensure that all the DAOs follow integration testing standards and also making sure that the test coverage for each is at least 75%.
Adding end-to-end tests for APIs NO ❌ I am going to finalize this in coming weeks after GSoC.

Future PlansπŸš€

  • Implement end-to-end tests for FOSSology APIs:

    To ensure high quality software, there is still a work to do. I look forward to finalizing additional end-to-end tests development for FOSSology APIs to verify that all functionalities are working as expected and meeting the requirements. In the pipeline are several exciting improvements to look forward to:

  • Guiding new contributors to FOSSology:

    I look forward to providing a full guidance new contributors for not only contributing to FOSSology Excellence in license compliance but also broadening the open-source family.

  • Provide more contributions:

    As I started the open-source journey, I won't step back.I will keep my dedication , determination and love to open-source. I will keep contributing to FOSSology, guiding and mentoring new contributors as well.

Major Takeaways πŸ“š

  • Developed a deeper understanding of the open-source world and the collaborative nature of open-source projects.
  • Gained open-source culture.
  • Improved in writing clean and maintainable code, plus clear commit messages and pull requests.
  • Improved communication and leadership abilities by learning from mentors’ guidance.
  • Learned how to quickly adapt to the community’s coding standards.
  • I realized and learned the importance of communication and collaboration in open-source projects.
  • I learned how to break down a large project into smaller tasks, set timelines, and stay disciplined to meet deadlines. This experience improved my project management skills.
  • Gained the ability to research and explore unfamiliar technologies, tools, and concepts efficiently.
  • Developed the ability to navigate, understand, and contribute to large, complex codebases.
  • Contributing to an open-source project enhanced my sense of responsibility.
  • Created friendships and professional connections with people from other countries.

Links of work done: 🎯

Pull Requests πŸ”—

  1. fossology/fossology#2764
  2. fossology/fossology#2834.
  3. fossology/fossology#2832
  4. fossology/fossology#2830
  5. fossology/fossology#2829
  6. fossology/fossology#2827
  7. fossology/fossology#2826
  8. fossology/fossology#2825

πŸŽ“ Acknowledgements

Being a part of FOSSology was a rewarding experience and journey of growth in my crucial aspects of life. The journey was really exciting more than I expected. As my first endeavor into open-source, I learned the ropes and gained invaluable skills including communication, teamwork, writing clean code and other technical skills that are very crucial in my future ventures. I deeply extend heartfelt gratitude for the whole FOSSology team especially my mentors for the kindness, patience and invaluable support they gave me throughtout this journey.
Special thanks to Shaheem Azmal M MD, Gaurav Mishra, Samuel Dushimimana, and Soham Banerjee as my mentors. I really appreciate how supportive, responsive, and encouraging these people are, their full guidance and support has truly shaped me and made me who I am today.

In conclusion, It has been an exciting journey working with this wonderful community, and I've gained so much from the experience. This is not an end but a good start to tackle as many open-source projects as possible. I will embrace the open-cource culture I gained from GSoC, keep contributing as well as guiding new contributors!

🌐 Let's connect!

About

My full report of my Google Summer of Code 2024 contributions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published