diff --git a/.github/workflows/check_python_methods.py b/.github/workflows/check_python_methods.py index 4868fd5a08..af8b2b673a 100644 --- a/.github/workflows/check_python_methods.py +++ b/.github/workflows/check_python_methods.py @@ -25,6 +25,11 @@ 'viam.app.app_client.AppClient.get_rover_rental_parts', ] +def is_unimplemented(obj): + if obj.find(class_="property"): + return "abstract" in obj.find(class_="property").text + else: + return False def make_soup(url): page = urlopen(url) @@ -89,6 +94,7 @@ def parse(type, names): # Find all python methods objects on Python docs site soup py_methods_sdk_docs = soup.find_all("dl", class_="py method") py_methods_sdk_docs_filtered_ids = [] + py_methods_sdk_docs_undocumented_ids = [] # Get ids and filter list for tag in py_methods_sdk_docs: @@ -100,7 +106,11 @@ def parse(type, names): and not id.endswith(".get_resource_name") and not id.endswith(".get_operation") \ and not id.endswith(".LOGGER") and not id.endswith("__") \ and not id in ignore_apis: - py_methods_sdk_docs_filtered_ids.append(id) + if is_unimplemented(tag_sigobject): + py_methods_sdk_docs_undocumented_ids.append(id) + else: + py_methods_sdk_docs_filtered_ids.append(id) + # Get methods information method_text = [] @@ -248,13 +258,14 @@ def parse(type, names): print(f"SDK methods missing for type {type}: {sdk_methods_missing}\n\n") + print(f"SDK methods unimplemented for type {type}: {py_methods_sdk_docs_undocumented_ids}\n\n") print(f"SDK methods found for type {type}: {sdk_methods_found}\n\n") return sdk_methods_missing, methods_dict def print_method_information(missing_methods, methods_dict): for method in missing_methods: - print(f"Method: {method} \n\n{methods_dict.get(method)}") + print(f"Method: {method}\n\n{methods_dict.get(method)}") print("---\n") @@ -271,7 +282,7 @@ def print_method_information(missing_methods, methods_dict): total_sdk_methods_missing.extend(missing_robot_apis) if total_sdk_methods_missing: - print(f"Total SDK methods missing: {total_sdk_methods_missing} \n\nMissing Method Information: \n") + print(f"Total SDK methods missing: {total_sdk_methods_missing} \n\nMissing Method Information:\n") print_method_information(missing_services, services_dict) print_method_information(missing_components, components_dict) print_method_information(missing_app_apis, app_apis_dict) diff --git a/docs/program/apis/cloud.md b/docs/program/apis/cloud.md index b0d5d5c4eb..20d85a5ac2 100644 --- a/docs/program/apis/cloud.md +++ b/docs/program/apis/cloud.md @@ -1328,3 +1328,99 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/ {{% /tab %}} {{< /tabs >}} + + diff --git a/static/include/services/apis/cloud.md b/static/include/services/apis/cloud.md index 9d32300d24..6d4f65c568 100644 --- a/static/include/services/apis/cloud.md +++ b/static/include/services/apis/cloud.md @@ -1,15 +1,25 @@ Method Name | Description ----------- | ----------- + + [`ListOrganizations`](/program/apis/cloud/#listorganizations) | List the {{< glossary_tooltip term_id="organization" text="organizations" >}} the user owns. + [`GetOrganizationNamespaceAvailability`](/program/apis/cloud/#getorganizationnamespaceavailability) | Check the availability of an organization namespace. + [`ListOrganizationMembers`](/program/apis/cloud/#listorganizationmembers) | List the members and invites of the current organization. + [`UpdateOrganizationInviteAuthorizations`](/program/apis/cloud/#updateorganizationinviteauthorizations) | Update the authorizations attached to an organization invite that has already been created. + + + [`CreateLocation`](/program/apis/cloud/#createlocation) | Create and name a {{< glossary_tooltip term_id="location" text="location" >}}. [`GetLocation`](/program/apis/cloud/#getlocation) | Get a location by its ID. [`UpdateLocation`](/program/apis/cloud/#updatelocation ) | Change the name of and/or assign a parent location to a location. [`DeleteLocation`](/program/apis/cloud/#deletelocation ) | Delete a location. [`ListLocations`](/program/apis/cloud/#listlocations ) | List locations. + + [`LocationAuth`](/program/apis/cloud/#locationauth ) | Get a location's authorization (location secrets). [`CreateLocationSecret`](/program/apis/cloud/#createlocationsecret ) | Create a new location secret. [`DeleteLocationSecret`](/program/apis/cloud/#deletelocationsecret ) | Delete a location secret. @@ -38,8 +48,10 @@ Method Name | Description [`AddRole`](/program/apis/cloud/#addrole ) | Add a role (owner or operator). [`RemoveRole`](/program/apis/cloud/#removerole ) | Remove a role (owner or operator). [`ListAuthorizations`](/program/apis/cloud/#listauthorizations ) | List authorizations (owners and operators). + [`CreateModule`](/program/apis/cloud/#createmodule ) | Create a {{< glossary_tooltip term_id="module" text="module" >}}. [`UpdateModule`](/program/apis/cloud/#updatemodule ) | Update module metadata. [`UploadModuleFile`](/program/apis/cloud/#uploadmodulefile ) | Upload a module file. [`GetModule`](/program/apis/cloud/#getmodule ) | Get a module by its ID. [`ListModules`](/program/apis/cloud/#listmodules ) | List available modules. + \ No newline at end of file