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

Updates types for RepoCards fields #1358

Merged
merged 3 commits into from
Feb 23, 2023
Merged

Updates types for RepoCards fields #1358

merged 3 commits into from
Feb 23, 2023

Conversation

davanstrien
Copy link
Member

@davanstrien davanstrien commented Feb 22, 2023

Follows up from #1356 to update more repo card attribute types to Optional[List[str]].

@Wauplin @julien-c, at the moment, I have changed the types for:

  • metrics
  • language
  • source datasets

For some attributes like license, it's likely that it will almost only be a single string: should I also change those types or focus only on the fields more likely to be an array with multiple items?

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Feb 22, 2023

The documentation is not available anymore as the PR was closed or merged.

@Wauplin
Copy link
Contributor

Wauplin commented Feb 22, 2023

Hi @davanstrien , thanks for taking the time.

For some attributes like license, it's likely that it will almost only be a single string: should I also change those types or focus only on the fields more likely to be an array with multiple items?

Yes I think it makes sense to keep the type str for fields where a single values is very likely to happen. license is the case but maybe language as well, isn't it?

@julien-c
Copy link
Member

i think the current PR is good! (i was not sure about languages either, but i think it's fine to type it as str[])

@Wauplin
Copy link
Contributor

Wauplin commented Feb 22, 2023

Fine with keeping the PR as is it as well, was just asking.

@davanstrien
Copy link
Member Author

Thanks both; I'll do a quick double-check for any other changes tomorrow am. I'll update the PR to ready for review once I've done that.

@davanstrien davanstrien marked this pull request as ready for review February 23, 2023 11:27
@davanstrien
Copy link
Member Author

I updated the source_datasets field to List[str]. I think this is ready to review/merge.

@davanstrien davanstrien requested a review from Wauplin February 23, 2023 11:28
@davanstrien davanstrien changed the title switch types to list of string for RepoCards Updates types for RepoCards Feb 23, 2023
@davanstrien davanstrien changed the title Updates types for RepoCards Updates types for RepoCards fields Feb 23, 2023
Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Looks good to me! I'm merging it :)

@Wauplin Wauplin merged commit 32c438f into main Feb 23, 2023
@Wauplin Wauplin deleted the RepoCard-types-update branch February 23, 2023 14:21
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.

4 participants