Skip to content

Commit 83fe998

Browse files
committed
:docs: display run launcher and executor config fields docs
1 parent 5d0c98d commit 83fe998

8 files changed

Lines changed: 687 additions & 3 deletions

File tree

docs/api/core.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ The `LocalRay` can be used to connect to a local Ray cluster.
2626

2727
::: dagster_ray.core.run_launcher.RayRunLauncher
2828
options:
29-
members:
30-
- "__init__"
29+
members: true
3130

3231
---
3332

docs/assets/stylesheets/extra.css

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,128 @@ h3[id$="-functions"]::before {
140140
h3[id$="-functions"] .headerlink {
141141
visibility: visible;
142142
}
143+
144+
/* Configuration schema list styling */
145+
.config-schema {
146+
margin: 1.5rem 0;
147+
padding: 1rem;
148+
border-radius: 0.3rem;
149+
border: 1px solid var(--md-default-fg-color--lightest);
150+
background-color: var(--md-code-bg-color);
151+
}
152+
153+
.config-param-list {
154+
list-style: none;
155+
padding: 0;
156+
margin: 1rem 0;
157+
}
158+
159+
.config-param-item {
160+
margin-bottom: 1.2rem;
161+
padding: 1rem;
162+
border: 1px solid var(--md-default-fg-color--lightest);
163+
border-radius: 0.3rem;
164+
background-color: var(--md-default-bg-color);
165+
}
166+
167+
.param-header {
168+
display: flex;
169+
align-items: center;
170+
gap: 0.5rem;
171+
margin-bottom: 0.5rem;
172+
flex-wrap: wrap;
173+
}
174+
175+
.param-name {
176+
font-weight: 600;
177+
color: var(--md-primary-fg-color);
178+
background-color: var(--md-default-fg-color--lightest);
179+
padding: 0.2rem 0.5rem;
180+
border-radius: 0.2rem;
181+
font-size: 0.9em;
182+
}
183+
184+
.param-type code {
185+
background-color: var(--md-accent-fg-color--transparent);
186+
color: var(--md-accent-fg-color);
187+
padding: 0.2rem 0.4rem;
188+
border-radius: 0.2rem;
189+
font-size: 0.85em;
190+
}
191+
192+
.param-required {
193+
background-color: #f56565;
194+
color: white;
195+
padding: 0.15rem 0.4rem;
196+
border-radius: 0.2rem;
197+
font-size: 0.7em;
198+
font-weight: 600;
199+
text-transform: uppercase;
200+
}
201+
202+
.param-optional {
203+
background-color: #68d391;
204+
color: white;
205+
padding: 0.15rem 0.4rem;
206+
border-radius: 0.2rem;
207+
font-size: 0.7em;
208+
font-weight: 600;
209+
text-transform: uppercase;
210+
}
211+
212+
.param-description {
213+
color: var(--md-default-fg-color--light);
214+
margin: 0.5rem 0;
215+
line-height: 1.5;
216+
}
217+
218+
.param-default {
219+
color: var(--md-default-fg-color--light);
220+
font-size: 0.9em;
221+
margin-top: 0.5rem;
222+
}
223+
224+
.param-default code {
225+
background-color: var(--md-default-fg-color--lightest);
226+
padding: 0.2rem 0.4rem;
227+
border-radius: 0.2rem;
228+
font-size: 0.85em;
229+
}
230+
231+
/* Responsive config list */
232+
@media screen and (max-width: 768px) {
233+
.param-header {
234+
flex-direction: column;
235+
align-items: flex-start;
236+
gap: 0.3rem;
237+
}
238+
239+
.config-param-item {
240+
padding: 0.8rem;
241+
}
242+
}
243+
244+
/* JSON schema details styling */
245+
.config-schema details {
246+
margin-top: 1rem;
247+
border: 1px solid var(--md-default-fg-color--lightest);
248+
border-radius: 0.2rem;
249+
}
250+
251+
.config-schema details summary {
252+
padding: 0.5rem;
253+
background-color: var(--md-default-fg-color--lightest);
254+
cursor: pointer;
255+
font-weight: 500;
256+
}
257+
258+
.config-schema details[open] summary {
259+
border-bottom: 1px solid var(--md-default-fg-color--lightest);
260+
}
261+
262+
.config-schema details pre {
263+
margin: 0;
264+
padding: 1rem;
265+
max-height: 400px;
266+
overflow: auto;
267+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% extends "_base/class.html.jinja" %}
2+
3+
{# Template now only extends base - configuration is displayed via members #}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% extends "_base/function.html.jinja" %}
2+
3+
{# Template now only extends base - configuration is displayed via members #}

mkdocs.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,15 @@ plugins:
6565
# - awesome-nav
6666
- mkdocstrings:
6767
enable_inventory: true
68+
custom_templates: docs/templates
6869
handlers:
6970
python:
7071
paths: ["src"]
72+
import:
73+
- https://docs.python.org/3/objects.inv
74+
- https://docs.dagster.io/objects.inv
75+
- https://docs.pydantic.dev/latest/objects.inv
76+
- https://docs.ray.io/en/latest/objects.inv
7177
options:
7278
filters: ["!^_[^_]"]
7379
heading_level: 3
@@ -91,7 +97,7 @@ plugins:
9197
members_order: source
9298
show_submodules: false
9399
members: false
94-
inherited_members: true
100+
inherited_members: false
95101
show_bases: true
96102
show_signature: true
97103
signature_crossrefs: true
@@ -107,6 +113,7 @@ plugins:
107113
- dg.Config
108114
- dagster.Config
109115
- dagster.ConfigurableResource
116+
- dagster_ray.griffe_extensions:ConfigSchemaExtension
110117
extra:
111118
enable_autorefs: true
112119
inventories:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ docs = [
8888
"mkdocs-material>=9.6.20",
8989
"mkdocs-section-index>=0.3.10",
9090
"mkdocstrings[python]>=0.30.0",
91+
"pygments>=2.19.1",
9192
]
9293

9394

0 commit comments

Comments
 (0)