Skip to content

Commit

Permalink
DOC-594 refactor new API docs (#26296)
Browse files Browse the repository at this point in the history
## Summary & Motivation

Copy API docs to /api/python-api instead of /api to give us space in the
/api docs section for narrative docs.

## How I Tested These Changes

Staging build -- I was unable to build API docs locally.

## Changelog

> Insert changelog entry or delete this section.

---------

Signed-off-by: nikki everett <[email protected]>
  • Loading branch information
neverett authored Dec 5, 2024
1 parent 5da96ff commit 5425862
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ mdx:
tox -e sphinx-mdx

mdx_copy:
cp -rf sphinx/_build/mdx/sections/api/apidocs/* docs-beta/docs/api/
cp -rf sphinx/_build/mdx/sections/api/apidocs/* docs-beta/docs/api/python-api/
2 changes: 1 addition & 1 deletion docs/docs-beta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ API documentation is built in Vercel by overriding the _Build Command_ to the fo
yarn sync-api-docs && yarn build
```

This runs the `scripts/vercel-sync-api-docs.sh` script which builds the MDX files using the custom `sphinx-mdx-builder`, and copies the resulting MDX files to `docs/api`.
This runs the `scripts/vercel-sync-api-docs.sh` script which builds the MDX files using the custom `sphinx-mdx-builder`, and copies the resulting MDX files to `docs/api/python-api`.

## Search

Expand Down
1 change: 0 additions & 1 deletion docs/docs-beta/docs/api/.gitignore

This file was deleted.

Empty file removed docs/docs-beta/docs/api/.gitkeep
Empty file.
File renamed without changes.
5 changes: 2 additions & 3 deletions docs/docs-beta/docs/api/index.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
sidebar_class_name: hidden
title: API reference
---

import DocCardList from '@theme/DocCardList';
These docs aim to cover the entire public surface of the core dagster APIs, as well as public APIs from all provided libraries.

<DocCardList />
Dagster follows [semantic versioning](https://semver.org/). We attempt to isolate breaking changes to the public APIs to minor versions on a roughly 12-week cadence, and will announce deprecations in Slack and in the release notes to patch versions on a roughly weekly cadence.
2 changes: 2 additions & 0 deletions docs/docs-beta/docs/api/python-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/*.mdx
!index.mdx
8 changes: 8 additions & 0 deletions docs/docs-beta/docs/api/python-api/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
sidebar_class_name: hidden
title: API reference
---

import DocCardList from '@theme/DocCardList';

<DocCardList />
7 changes: 4 additions & 3 deletions docs/docs-beta/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,17 @@ const sidebars: SidebarsConfig = {
},
],
api: [
'reference/api-lifecycle',
'api/index',
'api/api-lifecycle',
{
type: 'category',
label: 'Python API',
collapsed: false,
link: {type: 'doc', id: 'api/index'},
link: {type: 'doc', id: 'api/python-api/index'},
items: [
{
type: 'autogenerated',
dirName: 'api',
dirName: 'api/python-api',
},
],
}
Expand Down
6 changes: 3 additions & 3 deletions docs/sphinx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ install:
uv pip install -e _ext/sphinx-mdx-builder

mdx_copy:
rm -rf ../docs-beta/docs/api/libraries
find ../docs-beta/docs/api/*.mdx ! -name index.mdx -exec rm {} +
cp -rf _build/mdx/sections/api/apidocs/* ../docs-beta/docs/api/
rm -rf ../docs-beta/docs/api/python-api/libraries
find ../docs-beta/docs/api/python-api/*.mdx ! -name index.mdx -exec rm {} +
cp -rf _build/mdx/sections/api/apidocs/* ../docs-beta/docs/api/python-api/

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down

2 comments on commit 5425862

@github-actions
Copy link

Choose a reason for hiding this comment

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

Deploy preview for dagster-docs ready!

✅ Preview
https://dagster-docs-2o2esblre-elementl.vercel.app
https://master.dagster.dagster-docs.io

Built with commit 5425862.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link

@github-actions github-actions bot commented on 5425862 Dec 5, 2024

Choose a reason for hiding this comment

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

Deploy preview for dagster-docs-beta ready!

✅ Preview
https://dagster-docs-beta-s7y9ks1sf-elementl.vercel.app

Built with commit 5425862.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.