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
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.
- Enhance Unit Tests for
/folder
,/group
,/license
,/upload
endpoints. - Enhance Unit Tests for
/maintenance
,/upload_tree
,/info
endpoints.
- Upgrade & Improve
/folder
,/group
,/info
,overview
,job
,copyright
tests. - Upgrade & Improve
/license
,/maintenance
,/upload
,/user
tests.
- Add Unit Tests for
/upload
,/folder
,/group
,/license
endpints. - Add Unit Tests for
/maintenance
,/copyright
,/overview
,/report
,/job
endpoints.
- Add Unit Tests for
upload
,folder
,group
,scanCode
,GroupPermissions
, andUploadSummary
models. - Add Unit Tests for
UserGroupMember
,Job
,BulkHistory
,Analysis
, andApiVersion
models. - Add Unit Tests for
agent
,decider
,fileInfo
,group
,licenseCandidate
, andpermissions
models.
- Add integration Tests for
folder
,agent
, andpfile
DAOs. - Add integration Tests for
license
,upload
,uploadPermssions
, andshowJobs
models.
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).
- 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.
- 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.
- 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.
-
Upgrade
/MaintenanceControllerTest
,LicenseControllerTest
,GroupControllerTest
,CopyrightsControllerTest
,UploadControllerTest
, andUserContollerTest
to support version 2. -
Added
MaintenanceControllerTest
, andUploadTreeControllerTest
.
I added more than 5 test cases to ensure that maintenance functionalities work as expected.
- 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.
- `LicenseControllerTest`, `GroupControllerTest`, `CopyrightsControllerTest`,`UploadControllerTest`, and `FolderControllerTest` [#2827](https://github.com/fossology/fossology/pull/2827) and [#2834]https://github.com/fossology/fossology/pull/2834
- 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.
- 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.
- 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.
- 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.
- 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.
Models tests are numerous but I would like to show some screenshoots.
AnaysisTest
,BulkHistroryTest
,ScanCodeTest
,FolderTest
and so on.. #2825
- 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.
- 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.
- 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.
- 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.
LicenseCandidateTest
,AgentTest
,DeciderTest
,and so on.. #2829
- 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.
- 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.
- 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.
- Added more integration test cases for
FolderDAOTest
#2830
- 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.
- Added more integration tests for
PfileDAOTest
,ShowJobsDAOTest
,UploadPermissionsDAOTest
,UploadDATest
and so on.. #2832
- 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.
- 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.
- 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.
Throughout the 12 weeks of the GSoC period, I created weekly documentation for recording and tracking my progress. The documentation can be found here
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. |
-
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:
-
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.
-
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.
- 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
andmaintainable
code, plusclear commit messages
andpull requests
. - Improved
communication
andleadership
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.
- fossology/fossology#2764
- fossology/fossology#2834.
- fossology/fossology#2832
- fossology/fossology#2830
- fossology/fossology#2829
- fossology/fossology#2827
- fossology/fossology#2826
- fossology/fossology#2825
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!