diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 37b37855b..86304a074 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -27,7 +27,7 @@ jobs: python auto_generate_blueprint.py python auto_generate_architect.py python auto_generate_requester.py - + python auto_generate_provider.py - name: Install dependencies run: yarn install --frozen-lockfile - name: Build website diff --git a/docs/web/docs/reference/providers.md b/docs/web/docs/reference/providers.md new file mode 100644 index 000000000..7d4bb7d1a --- /dev/null +++ b/docs/web/docs/reference/providers.md @@ -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| diff --git a/docs/web/docs/reference/Requester.md b/docs/web/docs/reference/requesters.md similarity index 100% rename from docs/web/docs/reference/Requester.md rename to docs/web/docs/reference/requesters.md diff --git a/mephisto/scripts/local_db/gh_actions/auto_generate_provider.py b/mephisto/scripts/local_db/gh_actions/auto_generate_provider.py new file mode 100644 index 000000000..e20fb01db --- /dev/null +++ b/mephisto/scripts/local_db/gh_actions/auto_generate_provider.py @@ -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="Providers") + provider_file.new_paragraph( + "Crowd providers standardize access to external crowd workers, by wrapping external API communication through a standardized interface." + ) + 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() diff --git a/mephisto/scripts/local_db/gh_actions/auto_generate_requester.py b/mephisto/scripts/local_db/gh_actions/auto_generate_requester.py index fbeaaf96c..fb4190585 100644 --- a/mephisto/scripts/local_db/gh_actions/auto_generate_requester.py +++ b/mephisto/scripts/local_db/gh_actions/auto_generate_requester.py @@ -10,7 +10,7 @@ def main(): requester_file = MdUtils( - file_name="../../../../docs/web/docs/reference/Requester.md", + file_name="../../../../docs/web/docs/reference/requesters.md", ) requester_file.new_header(level=1, title="Requesters") requester_file.new_paragraph(