Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webapp: Separate functions/constructors db by projects #1662

Merged
merged 6 commits into from
Aug 12, 2024

Conversation

arthurscchan
Copy link
Contributor

In the current logic, the DB JSON file for functions and constructors contains is combined into two JSON files which contain all functions/constructors of all projects. This is not a good practice because this makes the whole JSON file so large and hard to maintain. This PR alters the approach by saving the functions/constructors in separate files for each project. In addition, the functions/constructors are not loaded to the data_storage.py during webapp initialisation. Instead, the needed project functions/constructors are retrieved lively when it is requested. With this new setting, four functions have been provided in data_storage. Two of them request a project name and only retrieve the functions/constructors for the target project. The other two preserve the old functionality by going through all functions/constructors JSON for all projects and returning a full functions/constructors list same as before.

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@arthurscchan arthurscchan marked this pull request as ready for review July 11, 2024 10:06
@arthurscchan arthurscchan marked this pull request as draft August 12, 2024 10:29
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@arthurscchan arthurscchan marked this pull request as ready for review August 12, 2024 11:07
@DavidKorczynski DavidKorczynski merged commit 7d14015 into ossf:main Aug 12, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants