-
Notifications
You must be signed in to change notification settings - Fork 77
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
Auto Generate Provider Documentation #873
Changes from 3 commits
d93c65a
554e238
e9b0fb9
ee4e1c9
0566d7c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
|
||
|
||
|
||
# Provider | ||
|
||
|
||
The crowd provider determines the source of the crowd workers. | ||
## mock | ||
|
||
|
||
|
||
|
||
|dest|type|default|help|choices|required| | ||
| :--- | :--- | :--- | :--- | :--- | :--- | | ||
|requester_name|str|???|None|None|False| | ||
|
||
## mturk | ||
|
||
|
||
|
||
|
||
|dest|type|default|help|choices|required| | ||
| :--- | :--- | :--- | :--- | :--- | :--- | | ||
|requester_name|str|???|None|None|False| | ||
|
||
## mturk sandbox | ||
|
||
|
||
|
||
|
||
|dest|type|default|help|choices|required| | ||
| :--- | :--- | :--- | :--- | :--- | :--- | | ||
|requester_name|str|???|None|None|False| |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from mdutils.mdutils import MdUtils | ||
from mephisto.client.cli_commands import get_wut_arguments | ||
from mephisto.operations.registry import ( | ||
get_valid_provider_types, | ||
) | ||
from mephisto.scripts.local_db.gh_actions.auto_generate_blueprint import ( | ||
create_blueprint_info, | ||
) | ||
|
||
|
||
def main(): | ||
provider_file = MdUtils( | ||
file_name="../../../../docs/web/docs/reference/providers.md", | ||
) | ||
provider_file.new_header(level=1, title="Provider") | ||
provider_file.new_paragraph( | ||
"The crowd provider determines the source of the crowd workers." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the simplicity of what you have here. I think I would merge it with some of the details from https://mephisto.ai/docs/explanations/architecture_overview/#crowdproviders to say something like:
cc @JackUrb |
||
) | ||
valid_provider_types = get_valid_provider_types() | ||
for provider_type in valid_provider_types: | ||
provider_file.new_header(level=2, title=provider_type.replace("_", " ")) | ||
args = get_wut_arguments( | ||
("provider={provider_name}".format(provider_name=provider_type),) | ||
) | ||
arg_dict = args[0] | ||
create_blueprint_info(provider_file, arg_dict) | ||
|
||
provider_file.create_md_file() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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.
All the other sibling pages are plural ("Architects", "Blueprints"). Can we call this "Providers" to stay consistent?