-
Notifications
You must be signed in to change notification settings - Fork 319
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
[idea] Make separate file for each program from program-list.json
(instead of keeping all programs in one file)
#346
Comments
Avoiding the rebase would be good - It gets unwieldy especially if lots of additions come in at the same time. What would you suggest as a unique key? |
I have two options at the moment:
The first option is good because it's simple to issue new ids but it's hard to find the program you need without grep. The second one is more human-friendly but it's harder to issue new ids (and there may be collisions, when a company has more than one program). |
We can use numerical ids but have a workflow merging them together in a single file on push to the main branch. |
That's a really good idea! Maybe something like bucket sorting by the company's name (e.g. |
Hi @prodigysml Do you mean something like this? tree programs
where each
I'm not sure how to deal with collisions in such case. For example, both Android and Chrome programs hosted at https://bughunters.google.com thus both have |
Yup that's what I meant! Hmm didn't think about the collisions honestly. Your idea sounds good but maintainers will need to make sure they merge careful and don't duplicate data. |
May be we can automatically deduplicate (via GitHub Actions) based on the data provided? For example, check that "policy_url" is unique or some combination of fields is unique. |
Hi @prodigysml, hi @yesnet0! I've just added a proof of concept for the issue in #351 😃 |
@nikitastupin I like it so far - In context of what diodb is trying to solve (catalog all known policy URLs along with their safe harbor status and optional attributes), policy_url itself could be considered the primary key. @prodigysml and @jmanoto - Any thoughts how we could better manage collisions here? |
Resolving conflicts on json isnt difficult IMO, do you mean doubles? |
Hi @sickcodes 👋
I agree that compared to more complex merge conflicts resolving this might be easy (though I personally don't know the easy way to do it). However, if we can avoid conflicts with little or no tradeoff - why not avoid them? I'm aware of the following tradeoffs: (1) we should change the repo structure (short-term), (2) when someone adds a program he or she should figure out the primary key (filename) for it (long-term). We can remediate the 2nd tradeoff with providing a script that helps generating a new program (kinda like Also, storing each program in a separate file could help to avoid duplicate entries. For example, now we have 272
Sorry, I didn't quite got the point. Could you elaborate what do you mean by "doubles"? |
Doubles, meaning duplicate entries. a58b6b2#diff-3209bee5852a8fc2dde56c367fffe517831fa18462004498955d355234899867R39-R40 Previously pandas would bring the JSON raw into a datatable, and spit out an alphabetically sorted, de-duplicated JSON, jq to pretty-print it. |
Another way to solve the rebase problem would be to use https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms instead of PRs. So that a contributor opens an issue, fills a form. Then a maintainer checks the submission and if everything is fine it'll run a chat-ops command to merge the program. Though it's not clear how to handle changes or deletions in this case. |
Hi 👋
The problem: now if we have more than one Pull Request to
program-list.json
and merge one of them then we'll most likely need to rebase the other Pull Request which isn't convenient.I've thought about making a separate file for each program, this will ease adding new programs (no need for rebase).
What are you thoughts on this?
The text was updated successfully, but these errors were encountered: