SEACrowd / seacrowd-datahub

A collaborative project to collect datasets in SEA languages, SEA regions, or SEA cultures.
Apache License 2.0
64 stars 57 forks source link

Add `.upper` method for `--schema` parameter #648

Closed muhammadravi251001 closed 5 months ago

muhammadravi251001 commented 5 months ago

Issue:

This is also a (really) minor thing that I noticed when running tests with the --schema parameter.

I noticed that all the items in the VALID_SCHEMAS variable are strings in full capital letters, there are no strings in lowercase letters (except for NoneType).

Therefore, by changing the line:

parser.add_argument(
      "--schema",
      type=str,
      ...

to:

parser.add_argument(
      "--schema",
      type=str.upper,
      ...

Automate the conversion of the --schema parameter input by the user. Especially since the general habit is to type in lowercase.

Although this is a very simple thing, it is better to automate it.