Skip to content
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

docs(api): Fix various documentation formatting problems #8444

Merged
merged 16 commits into from
Oct 1, 2021

Conversation

SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Sep 30, 2021

Overview

On the road to #6135, this PR resolves an assortment of Sphinx warnings. Some were benign, but others were causing the documentation to render incorrectly.

Changelog

This is really a whole bunch of little things, so it's probably easiest to just scan through the diff.

Common themes:

  • Correcting mis-indentation
  • Correcting uses of single backticks, which Sphinx uses specifically for cross-references, that should have been double-backticks

Also of note:

Risk assessment and review requests

Low risk. I've been checking the rendered output, so I think we just have to make sure this passes CI and make sure the "code" changes look good.

This didn't work (it got rendered as the literal text `protocol-api-deck-coords`, I think because we're building the HAPI docs as a totally separate thing from the PAPI docs. We can probably fix this, but for now, I'm just removing the link.
These were giving warnings like:

WARNING: Error in "code-block" directive: maximum 1 argument(s) allowed, 2 supplied.
This should use "+" to match the "Skipping Wells" heading, which is at the same level of nesting.
`ModuleContext` is not something that appears in our documentation (nor IMO should it be), so there's nowhere for these cross-references to go.

Instead, link individually to the `.load_labware()` methods of `ThermocyclerContext`, `TemperatureModuleContext`, and `MagneticModuleContext`. Where this would be very clunky, just use the literal text `module.load_labware()` without a link.
@SyntaxColoring SyntaxColoring added api Affects the `api` project docs labels Sep 30, 2021
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner September 30, 2021 22:51
@SyntaxColoring SyntaxColoring added the Robot Tech Debt For review in robot guild meetings label Sep 30, 2021
@codecov
Copy link

codecov bot commented Sep 30, 2021

Codecov Report

Merging #8444 (a120638) into edge (be5a764) will increase coverage by 0.23%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #8444      +/-   ##
==========================================
+ Coverage   74.24%   74.48%   +0.23%     
==========================================
  Files        1670     1672       +2     
  Lines       45059    45518     +459     
  Branches     4595     4595              
==========================================
+ Hits        33456    33903     +447     
- Misses      10810    10822      +12     
  Partials      793      793              
Flag Coverage Δ
api 84.84% <ø> (+0.32%) ⬆️
robot-server 93.72% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
api/src/opentrons/hardware_control/api.py 84.05% <ø> (ø)
...i/src/opentrons/protocol_api/instrument_context.py 88.80% <ø> (ø)
api/src/opentrons/protocol_api/labware.py 89.78% <ø> (ø)
api/src/opentrons/protocol_api/protocol_context.py 89.09% <ø> (ø)
api/src/opentrons/simulate.py 63.79% <ø> (ø)
...obot-server/robot_server/sessions/schema_models.py 100.00% <0.00%> (ø)
...i/src/opentrons/protocol_runner/legacy_wrappers.py 100.00% <0.00%> (ø)
...src/opentrons/protocol_engine/commands/__init__.py 100.00% <0.00%> (ø)
...opentrons/protocol_runner/legacy_context_plugin.py 100.00% <0.00%> (ø)
...entrons/protocol_engine/commands/command_unions.py 100.00% <0.00%> (ø)
... and 4 more

Copy link
Member

@sanni-t sanni-t left a comment

Choose a reason for hiding this comment

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

Great finds!

Just a few nitpicks

api/docs/v2/new_modules.rst Show resolved Hide resolved
api/docs/v2/new_modules.rst Show resolved Hide resolved
api/docs/v2/new_modules.rst Show resolved Hide resolved
api/src/opentrons/protocol_api/instrument_context.py Outdated Show resolved Hide resolved
api/src/opentrons/simulate.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Affects the `api` project docs Robot Tech Debt For review in robot guild meetings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: In APIv2 docs, code block "Running A Previously-Written Protocol" is not rendered
2 participants