Documentation style guide
Organizationâ
Within the table of contents, each section has specific role to play. Broadly speaking, we follow Divioâs excellent Documentation System, with the caveat that our âCore concepts section is their âExplanationâ section, and our API Referenceâ section is their âReference sectionâ.
Introduction explains the Why of Great Expectations, so that potential users can quickly decide whether or not the library can help them.
Getting Started with Great Expectations help users and contributors get started quickly. Along the way they orient new users to concepts that will be important to know later.
How-to guides help users accomplish specific goals that go beyond the generic tutorials. Article titles within this section always start with âHow toâ: âHow to create custom Expectationsâ. They often reference specific tools or infrastructure: âHow to validate Expectations from within a notebookâ, âHow to build Data Docs in S3.â For additional information, please see How to write a how-to-guide.
Reference Architectures explains how to deploy Great Expectations alongside other data tools.
Reference articles explain the architecture of Great Expectations. Within this section, Core Concepts articles explain the essential elements of the project, discuss alternatives and options, and provide context, history, and direction for the project. Reference articles avoid giving specific technical advice. They also avoid implementation details that can be captured in docstrings instead. Docstrings themselves are surfaced in the API Reference.
Community resources helps expand the Great Expectations community by explaining how to get in touch to ask questions, make contributions, etc.
Contributing is all about how to improve Great Expectations as a contributor.
Changelog contains the changelog for the project.
General conventionsâ
Note
This style guide will be enforced for all incoming PRs. However, certain legacy areas within the repo do not yet fully adhere to the style guide. We welcome PRs to bring these areas up to code.
The project name âGreat Expectationsâ is always spaced and capitalized. Good: âGreat Expectationsâ. Bad: âgreat_expectationsâ, âgreat expectationsâ, âGE.â
We refer to ourselves in the first person plural. Good: âweâ, âourâ. Bad: âIâ. This helps us avoid awkward passive sentences. Occasionally, we refer to ourselves as âthe Great Expectations teamâ (or community) for clarity.
We refer to developers and users as âyouâ. Good: âyou can,â âyou might want to.â
We reserve the word âshouldâ for strong directives, not just helpful guidance.
Titlesâ
Titles and headers are capitalized like sentences.
- Yep: âInstalling within a project.â
- Nope: âInstalling Within a Project.â
For sections within âhow toâ-type guides, titles should be short, imperative sentences.
Avoid extra words. Good: âConfigure data documentationâ. Nope: âConfiguring data documentationâ. Avoid: âConfigure documentation for your dataâ
Core concepts and classesâ
Core concepts are always capitalized, and always are linked on first reference within each page.
If it's important enough to show up in the Core Concepts section, it should be capitalized when it occurs in text. Pretend the docs are a fantasy novel, and core concepts are magic.
- Wrong: âYou can create expectation suites as followsâŠâ
- Better: âYou can create Expectation Suites as followsâŠâ
- Avoid: âYou can create suites of Expectations as followsâŠâ
Class names are written in upper camel case, and always linked on first reference.
- Good: âValidationOperator.â
- Bad: âvalidationOperatorâ, âvalidation operatorâ.
If a word is both a core concept and a class name, prefer the core concept unless the text refers specifically to the class.
Core concepts and class names are always linked on first reference within each pageâexcept within the Getting Started guides.
The first time a given core concept or class name shows up on any given page, it should be linked to the appropriate page. Additional references within that page should not be linked, unless the point of the text is specifically to link to the concept.
Within the Getting Started section, we make an exception for this rule, to avoid distracting new users with many extraneous links.