Page MenuHomePhabricator

Uses comment markers instead of line numbers.
ClosedPublic

Authored by bob on Fri, Oct 9, 6:53 PM.

Details

Summary

Some code snippets were rendering incorrectly in docs.dagster.io.

It seems that using literalinclude with line numbers will break due to line number drift (i.e. the file is modified without updating line number references in the docs).

Python comment markers are more robust to future changes in doc snippets. We should encourage usage of comment markers (instead of line numbers) for future literalincludes.

Example of incorrectly rendered doc snippet (due to drifting of line numbers)
View on docs.dagster.io

Test Plan

render the docs website locally && buildkite

Diff Detail

Repository
R1 dagster
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bob edited the summary of this revision. (Show Details)
bob requested review of this revision.Fri, Oct 9, 7:10 PM
sashank edited reviewers, added: cdecarolis; removed: sashank.

Looks good. Thanks for catching!

This revision is now accepted and ready to land.Mon, Oct 12, 4:56 PM
This revision was automatically updated to reflect the committed changes.