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-beta] Add Vale updates #23785

Merged
merged 9 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/build-docs-revamp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ jobs:
- name: Checkout docs/revamp branch
uses: actions/checkout@v4

- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Run Linting
run: |
cd docs/docs-beta
yarn install
yarn run lint

- name: Publish Preview to Vercel
uses: amondnet/vercel-action@v25
with:
Expand Down
46 changes: 27 additions & 19 deletions docs/.vale.ini
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
StylesPath = "vale/styles"
MinAlertLevel = suggestion
########################
# ABOUT #
########################

Packages = Google
Vocab = Dagster
# This file controls the Vale application, specifically what, where, and how it lints.

[*.{md,mdx,rst}]
BasedOnStyles = Vale, Google, Dagster
# Vale config reference: https://vale.sh/docs/topics/config
# INI syntax: https://ini.unknwon.io/docs/intro

; Ignore all :py directives
IgnorePatterns = (:py:[^`]+`[^`]+`)
########################
# CORE SETTINGS #
########################

StylesPath = "vale/styles"
MinAlertLevel = suggestion
Vocab = Dagster

; Error on headings that aren't sentence cased.
Google.Headings = Error
########################
# FORMAT ASSOCIATIONS #
########################

; Google avoids using will, we don't need to check for this
Google.Will = NO
Google.WordList = NO
[formats]
mdx = md

; Exclamation is fine
Google.Exclamation = NO
########################
# FORMAT-SPECIFIC #
########################

; Passive is a bit too noisy
Google.Passive = NO
[*.{md,mdx,rst}]
# Rules in this section are enforced in all md, mdx, and rst files

[*.{md,mdx,rst}]
BasedOnStyles = Dagster, Terms, Vale

[formats]
mdx = md
; Ignore all :py directives
IgnorePatterns = (:py:[^`]+`[^`]+`)
8 changes: 8 additions & 0 deletions docs/docs-beta/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.sqlite

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
6 changes: 2 additions & 4 deletions docs/docs-beta/.remarkrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
plugins: [
'remark-frontmatter',
]
}
plugins: ['remark-frontmatter'],
};
16 changes: 8 additions & 8 deletions docs/docs-beta/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"unifiedjs.vscode-mdx",
"esbenp.prettier-vscode",
"mrmlnc.vscode-remark",
"chrischinchilla.vale-vscode"
]
}
"recommendations": [
"dbaeumer.vscode-eslint",
"unifiedjs.vscode-mdx",
"esbenp.prettier-vscode",
"mrmlnc.vscode-remark",
"chrischinchilla.vale-vscode"
]
}
Binary file added docs/docs-beta/.yarn/install-state.gz
Binary file not shown.
925 changes: 925 additions & 0 deletions docs/docs-beta/.yarn/releases/yarn-4.4.0.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/docs-beta/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.4.0.cjs
24 changes: 11 additions & 13 deletions docs/docs-beta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ The documentation site is built using [Docusaurus](https://docusaurus.io/), a mo

### Installation

The site uses [pnpm](https://pnpm.io/) for package management.
The site uses [yarn](https://yarnpkg.com/) for package management. Run `yarn install` to install dependencies. Note that the yarn binary is checked in, so you do not need to install yarn yourself.

It also uses [vale](https://vale.sh/) to check for issues in the documentation.

Install dependencies with:
Install value with:

```bash
brew install pnpm vale
pnpm install
brew install vale
```

### Overview of the docs
Expand All @@ -21,9 +21,10 @@ Code in `./src` contains custom components, styles, themes, and layouts.
Code `./content-templates` contains the templates for the documentation pages.
Code in `./docs/` is the source of truth for the documentation.

`./docs/code_examples` contains all code examples for the documentation.
`./docs/code_examples` contains all code examples for the documentation.

The docs are broken down into the following sections:

- [Tutorials](./docs/tutorials/)
- [Guides](./docs/guides/)
- [Concepts](./docs/concepts/)
Expand All @@ -35,32 +36,29 @@ The docs are broken down into the following sections:
To start the local development server:

```bash
pnpm start
yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. Access the website at [http://localhost:3050](http://localhost:3050).


To lint the documentation for issues:

```bash
pnpm lint
yarn lint
```

To autofix linting issues and format with prettier:

```bash
pnpm lint:fix
yarn lint:fix
```



### Build

To build the site for production:

```bash
pnpm build
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
This command generates static content into the `build` directory and can be served using any static contents hosting service.
36 changes: 15 additions & 21 deletions docs/docs-beta/content-templates/concept.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,47 @@ description: ''

# [TOPIC]

<!-- This section is an intro that includes:
This section is an intro that includes:

- A brief description of what the topic is,
- An example of how it could be used in the real-world
- What it can do in the UI
-->

---

## Benefits

<!-- This section lists the benefits of using the topic, whatever it is. The items listed here should be solutions to real-world problems that the user cares about, ex:
This section lists the benefits of using the topic, whatever it is. The items listed here should be solutions to real-world problems that the user cares about, ex:

Using schedules helps you:

- Predictably process and deliver data to stakeholders and business-critical applications
- Consistently run data pipelines without the need for manual intervention
- Optimize resource usage by scheduling pipelines to run during off-peak hours
-->

Using [TOPIC] helps you:

<!-- - A benefit of the thing
- A benefit of the thing
- Another benefit
- And one more -->
- And one more

---

## Prerequisites

<!-- This section lists the prerequisites users must complete before they should/can proceed. For concepts, we should list the other concepts they should be familiar with first. -->
This section lists the prerequisites users must complete before they should/can proceed. For concepts, we should list the other concepts they should be familiar with first.

Before continuing, you should be familiar with:

<!-- - Ex: To use asset checks, users should understand Asset definitions first
- Ex: To use asset checks, users should understand Asset definitions first
- Another one
- One more -->
- One more

---

## How it works

<!-- This section provides a high-level overview of how the concept works without getting too into the technical details. Code can be shown here, but this section shouldn't focus on it. The goal is to help the user generally understand how the thing works and what they need to do to get it working without overwhelming them with details.
This section provides a high-level overview of how the concept works without getting too into the technical details. Code can be shown here, but this section shouldn't focus on it. The goal is to help the user generally understand how the thing works and what they need to do to get it working without overwhelming them with details.

For example, this is the How it works for Schedules:

Expand All @@ -57,40 +55,36 @@ Schedules run jobs at fixed time intervals and have two main components:

- A cron expression, which defines when the schedule runs. Simple and complex schedules are supported, allowing you to have fine-grained control over when runs are executed. With cron syntax, you can:

- Create custom schedules like Every hour from 9:00AM - 5:00PM with cron expressions (0 9-17 * * *)
- Quickly create basic schedules like Every day at midnight with predefined cron definitions (@daily, @midnight)
- Create custom schedules like Every hour from 9:00AM - 5:00PM with cron expressions (0 9-17 \* \* \*)
- Quickly create basic schedules like Every day at midnight with predefined cron definitions (@daily, @midnight)

To make creating cron expressions easier, you can use an online tool like Crontab Guru. This tool allows you to create and describe cron expressions in a human-readable format and test the execution dates produced by the expression. Note: While this tool is useful for general cron expression testing, always remember to test your schedules in Dagster to ensure the results are as expected.
To make creating cron expressions easier, you can use an online tool like Crontab Guru. This tool allows you to create and describe cron expressions in a human-readable format and test the execution dates produced by the expression. Note: While this tool is useful for general cron expression testing, always remember to test your schedules in Dagster to ensure the results are as expected.

For a schedule to run, it must be turned on and an active dagster-daemon process must be running. If you used dagster dev to start the Dagster UI/webserver, the daemon process will be automatically launched alongside the webserver.

After these criteria are met, the schedule will run at the interval specified in the cron expression. Schedules will execute in UTC by default, but you can specify a custom timezone.

-->

---

## Getting started

<!-- This section is a list of guides / links to pages to help the user get started using the topic. -->
This section is a list of guides / links to pages to help the user get started using the topic.

Check out these guides to get started with [CONCEPT]:

From here, you can:

<!-- A list of things the user can do once they've got the basics down. These could be links to additional guides, ex:

- Construct schedules to run partitioned jobs
- Execute jobs in specific timezones
- Learn to test your schedules
- Identify and resolve common issues with our troubleshooting guide -->
- Identify and resolve common issues with our troubleshooting guide

### Limitations [and notes]

<!-- This section should describe any known limitations that could impact the user, ex: "Schedules will execute in UTC unless a timezone is specified" -->
This section should describe any known limitations that could impact the user, ex: "Schedules will execute in UTC unless a timezone is specified"

---

## Related

<!-- A list of related links and resources -->
A list of related links and resources
8 changes: 1 addition & 7 deletions docs/docs-beta/content-templates/example-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ This reference contains a variety of examples using Dagster [TOPIC]. Each exampl
- Links to relevant documentation
- A list of the APIs used in the example

---

## [Title of example]

[This example demonstrates [description of what the example accomplishes]

<!-- Example: This example demonstrates how to use resources in schedules. To specify a resource dependency, annotate the resource as a parameter to the schedule's function. -->
Example: This example demonstrates how to use resources in schedules. To specify a resource dependency, annotate the resource as a parameter to the schedule's function.

```python title="my_schedule.py"
@schedule(job=my_job, cron_schedule="* * * * *")
Expand All @@ -27,8 +25,6 @@ def logs_then_skips(context):
return SkipReason("Nothing to do")
```

<!-- We need to fix the base table implemenatation before launch. This is a must. -->

| | |
| -------------------- | --- |
| Notes | |
Expand All @@ -37,8 +33,6 @@ def logs_then_skips(context):

---

<!-- This section lists a few additional sources of inspiration, such as DOP and GitHub discussions. You shouldn't need to change anything here. -->

import InspirationList from '../partials/\_InspirationList.md';

<InspirationList />
8 changes: 4 additions & 4 deletions docs/docs-beta/content-templates/guide-with-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ To follow the steps in this guide, you'll need:

</details>

## Step 1: Title that describes what this step will do {#step-1}
## Step 1: Title that describes what this step will do

For section / step headings:

- Titles should describe an action, ex: "Generate a token"
- Don't use gerunds (-ing) in titles, as it can cause issues with translation + SEO
- Each section heading should have an identifier that includes the word 'step' and the number of the step, ex: {#step-1}
- Each section heading should have an identifier that includes the word 'step' and the number of the step

### Step 1.1: Title that describes a substep {#step-1-1}
### Step 1.1: Title that describes a substep

If a step would benefit by being broken into smaller steps, follow this section's formatting
Each substep should get an H3 and start with Step N., followed by the number of the substep

## Step 2: Another step {#step-2}
## Step 2: Another step

## Next steps

Expand Down
2 changes: 1 addition & 1 deletion docs/docs-beta/docs/concepts/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: Assets

# Assets

## Assets and Ops
## Assets and ops

Assets and ops are two different concepts in Dagster.
4 changes: 2 additions & 2 deletions docs/docs-beta/docs/concepts/assets/thinking-in-assets.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Thinking in assets"
title: "Think in assets"
sidebar_position: 10
---

# Thinking in assets
# Think in assets
8 changes: 3 additions & 5 deletions docs/docs-beta/docs/concepts/io-managers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## =======

## title: "I/O managers"

# I/O managers
---
title: "I/O managers"
---
2 changes: 1 addition & 1 deletion docs/docs-beta/docs/concepts/understanding-assets.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Understanding Assets
title: About assets
description: Understanding the concept of assets in Dagster
last_update:
date: 2024-08-11
Expand Down
4 changes: 2 additions & 2 deletions docs/docs-beta/docs/dagster-plus/access/rbac/teams.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Managing teams"
title: "Team management"
displayed_sidebar: "dagsterPlus"
sidebar_position: 2
---

# Managing teams
# Team management in Dagster+
Loading
Loading