-
Notifications
You must be signed in to change notification settings - Fork 71
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
Implement CLI --total
functionality
#162
Conversation
Thank you for the pull request!The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :) If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Data rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you! Maintainer checklist
|
--total
functionality
Any thoughts on what's causing it, @mhmohona? :) |
} | ||
|
||
# Dictionary to map data types to their Wikidata Q-IDs | ||
data_type_to_qid = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrewtavis will you please check here if I have the correct QID?
Minor comments so far:
Language: German
Data type: Verbs
Total number of lexemes: 999
We'll be good to go after all this! 🥳 |
Quick check here @mhmohona, are you planning on getting to the changes we mentioned above? |
Doesn't this work since Looks like there is a choices parameter that we can pass in to |
Currently stuck in this comment 😢
|
By this I mean let's move the functionality of |
@wkyoshida, thank you for looking into it. I have solved this problem. |
I need help with the QID. :( Unable to find the correct QIDs. It would be super helpful for me if you would update the |
I
I have addressed 1st and 3rd feedback from here. |
src/scribe_data/cli/main.py
Outdated
@@ -127,7 +128,11 @@ def main() -> None: | |||
) | |||
total_parser._actions[0].help = "Show this help message and exit." | |||
total_parser.add_argument( | |||
"-lang", "--language", type=str, help="The language(s) to check totals for." | |||
"-l", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to remove -l
as an option, @mhmohona, as I think that making sure that we don't have commands and arguments that are the same is important :)
@@ -190,7 +195,13 @@ def main() -> None: | |||
) | |||
|
|||
elif args.command in ["total", "t"]: | |||
return | |||
if not args.language and not args.data_type: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really appreciate the quality of your messages to the user, @mhmohona!
"Error: At least one of -lang/--language or -dt/--data-type must be specified." | ||
) | ||
total_parser.print_help() | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's always do a space after return
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this, @mhmohona! The full experience of Scribe-Data is really coming along 😊
Contributor checklist
Description
Implemented the
--total (-t)
functionality would check Wikidata for the total of certain groupings of languages and word types.Related issue
Fixes - #147