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

(Re)adds moreByDeveloper-, similarApps- and dataSafety-field to app() and updates tests #134

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

kluhan
Copy link
Collaborator

@kluhan kluhan commented Jun 20, 2022

Issue solved

Problem partially solved

@kluhan
Copy link
Collaborator Author

kluhan commented Jun 23, 2022

Issue solved

@kluhan kluhan marked this pull request as draft June 24, 2022 00:23
'description': ElementSpec(None, [i, 2, 1]).extract_content(container)
} for i in range(0, len(container))
])
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoMingyu i don't like this double nested lamda function at all, especially since it is identical for data_collected and data_shared. do you have an idea? i was thinking of just defining the elementspecs for a single entry here and replacing the outer lamda function with a classic loop in data_safety.py, similar to what we do for the reviews.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the very slow reply. I didn't turn on notifications for mention, and the PR was Draft, so I left it alone. First, if you are interested in becoming a maintainer, please email me. The PRs you've contributed so far have been very effective, so I'm ready to welcome.

Back to the point, I'm not satisfied with the double nested structure. At the time of developing the initial version, it seems that the field of view was not wide. It's okay to write a PR as you said. I am open to large-scale changes.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kluhan mention for notification

Comment on lines +217 to +228
lambda entrys: [
{
"name": ElementSpec(None, [0]).extract_content(entrys[j]),
"optional": ElementSpec(None, [1]).extract_content(
entrys[j]
),
"usage": ElementSpec(None, [2], None, None).extract_content(
entrys[j]
),
}
for j in range(0, len(entrys))
],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block can be replaced to classic function. As you said, dataCollected and dataShared structure is simillar. It will resolve nesting of lambdas.

I like these element specification with one-line code. But complexity of data structure increases, we can change declaring extractor functions to classic function(using def).

@JoMingyu
Copy link
Owner

JoMingyu commented Sep 7, 2022

There are a lot of diffs, It's better to split the PRs.

@JoMingyu JoMingyu mentioned this pull request Sep 7, 2022
Hotfix
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.

2 participants