Skip to content

Documentation updates#8

Merged
azrosen92 merged 3 commits into
mainfrom
ar/readme-customizations
Feb 20, 2025
Merged

Documentation updates#8
azrosen92 merged 3 commits into
mainfrom
ar/readme-customizations

Conversation

@azrosen92

@azrosen92 azrosen92 commented Feb 19, 2025

Copy link
Copy Markdown
Collaborator

Following Speakeasy's guide for customizing docs, updates the documentation to use more conventional python patterns, and adds some more useful code snippets. Adds a more practical usage example based on a real series of requests that a partner would make when following our company onboarding guide.

@azrosen92 azrosen92 changed the title better error handling in example usage Documentation updates Feb 19, 2025
@azrosen92
azrosen92 force-pushed the ar/readme-customizations branch from 3ad3696 to 3216716 Compare February 19, 2025 22:23
Comment thread gusto_embedded/README.md Outdated
<!-- End IDE Support [idesupport] -->

<!-- Start SDK Example Usage [usage] -->
<!-- No SDK Example Usage [usage] -->

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how we indicate to speakeasy not to overwrite a section in the README with generated docs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to remove the <!-- Start [tag] --> altogether, right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh yeah you're right, looks like I misread the instructions. Thanks!

Comment thread gusto_embedded/README.md
with Gusto(
company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""),
) as gusto:
auth_token = os.getenv("GUSTO_COMPANY_ACCESS_AUTH", None)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of @satanas's feedback – shorter lines, more validation, and use None over ""

@azrosen92
azrosen92 requested review from a team and satanas February 19, 2025 22:45
@azrosen92
azrosen92 marked this pull request as ready for review February 19, 2025 22:45
Comment thread gusto_embedded/README.md Outdated
<!-- End IDE Support [idesupport] -->

<!-- Start SDK Example Usage [usage] -->
<!-- No SDK Example Usage [usage] -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to remove the <!-- Start [tag] --> altogether, right?

Comment thread gusto_embedded/README.md Outdated

<!-- Start SDK Example Usage [usage] -->
<!-- No SDK Example Usage [usage] -->
## SDK Example Usage

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Since we're maintaining this section can we rename this title to just Example Usage? I'd like us to drop the usage of "SDK" whenever possible to avoid confusions.

Comment thread gusto_embedded/README.md Outdated
company. Then use the returned company access token for further requests. We'll do this in the following steps.
1. [Create a Partner Managed Company](https://github.com/Gusto/gusto-python-client/blob/main/gusto_embedded/docs/sdks/companies/README.md#create_partner_managed)
2. [View](https://flows.gusto.com/terms) and [Accept](https://github.com/Gusto/gusto-python-client/blob/main/gusto_embedded/docs/sdks/companies/README.md#accept_terms_of_service) Terms of Service]
3. [Create a Company Location]()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a link?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, good catch

Comment thread gusto_embedded/README.md Outdated
new partner managed company. In this section we will illustrate using a system access token to create a partner managed
company. Then use the returned company access token for further requests. We'll do this in the following steps.
1. [Create a Partner Managed Company](https://github.com/Gusto/gusto-python-client/blob/main/gusto_embedded/docs/sdks/companies/README.md#create_partner_managed)
2. [View](https://flows.gusto.com/terms) and [Accept](https://github.com/Gusto/gusto-python-client/blob/main/gusto_embedded/docs/sdks/companies/README.md#accept_terms_of_service) Terms of Service]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link for accept looks weird. Did you mean:

[Accept](https://github.com/Gusto/gusto-python-client/blob/main/gusto_embedded/docs/sdks/companies/README.md#accept_terms_of_service)] Terms of Service

Comment thread gusto_embedded/README.md Outdated
<!-- End SDK Example Usage [usage] -->

### Common workflows
A common workflow, as documented [here](https://docs.gusto.com/embedded-payroll/docs/onboard-a-company), is to create a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super-nit: I'd give more context about where the link is pointing to. E.g:

as documented [in our docs](https://docs.gusto.com/embedded-payroll/docs/onboard-a-company)

@azrosen92
azrosen92 requested a review from satanas February 20, 2025 16:24
@azrosen92
azrosen92 force-pushed the ar/readme-customizations branch from 80825ae to 8a2bb4e Compare February 20, 2025 16:26

@satanas satanas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@azrosen92
azrosen92 merged commit bef19e4 into main Feb 20, 2025
@azrosen92
azrosen92 deleted the ar/readme-customizations branch February 20, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants