Skip to content

Adding docs for docstrings and typehints - #19267

Merged
Sean Kane (seankane-msft) merged 8 commits into
Azure:mainfrom
seankane-msft:docs-sphinx
Jul 6, 2021
Merged

Adding docs for docstrings and typehints#19267
Sean Kane (seankane-msft) merged 8 commits into
Azure:mainfrom
seankane-msft:docs-sphinx

Conversation

@seankane-msft

Copy link
Copy Markdown
Contributor

No description provided.

@seankane-msft Sean Kane (seankane-msft) changed the title updates for docstrings/typehints Adding docs for docstrings and typehints Jun 15, 2021
@check-enforcer

Copy link
Copy Markdown

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run python - [service] - ci

Comment thread doc/dev/docstring_typehint.md Outdated
Comment thread doc/dev/docstring_typehint.md Outdated
will also need to be included when searching for content to be preprocessed. Not supported if
training with labels.
:keyword str model_name: An optional, user-defined name to associate with your model.
:keyword str continuation_token: A continuation token to restart a poller from a saved state.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should have an example with inline type and clarify that for keyword you then need to use paramtype, while a regular param should be type

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You say that later, but still this overview should show it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Half use inline type, half use paramtype.

Comment thread doc/dev/docstring_typehint.md Outdated
Comment thread doc/dev/docstring_typehint.md Outdated
Comment thread doc/dev/docstring_typehint.md Outdated
Comment thread doc/dev/README.md Outdated
Comment thread doc/dev/README.md Outdated
Comment thread doc/dev/docstring_typehint.md Outdated
Comment thread doc/dev/docstring_typehint.md Outdated
Comment thread doc/dev/docstring_typehint.md Outdated
Comment thread doc/dev/docstring_typehint.md Outdated
Comment thread doc/dev/docstring_typehint.md

### Model and Client Docstrings

For documenting the properties of a model or client, include a docstring right after the `__init__` method or immediately after the class declaration

@kristapratico Krista Pratico (kristapratico) Jun 18, 2021

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.

Models that are used in requests often need to have more than just the ivars documented. Wondering if we should include an example for that as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could you provide a hint for me on that and I can include it?

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.

Comment thread doc/dev/docstring_typehint.md Outdated
Comment thread doc/dev/docstring_typehint.md Outdated
Co-authored-by: Krista Pratico <krpratic@microsoft.com>

@laiapat Laia Patiño (laiapat) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As usual, just a nitpicking comment from me. Looks good!

Comment thread doc/dev/README.md Outdated
@seankane-msft

Copy link
Copy Markdown
Contributor Author

/check-enforcer override

@seankane-msft
Sean Kane (seankane-msft) merged commit 6753efd into Azure:main Jul 6, 2021
@seankane-msft
Sean Kane (seankane-msft) deleted the docs-sphinx branch July 6, 2021 19:16
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.

4 participants