diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index acb122517d..8dc09b284f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -170,6 +170,9 @@ jobs: - name: Install dependencies run: make deps + - name: Generate components + run: make components + - name: Build Kubernetes ${{ matrix.version }} run: | set -x @@ -245,6 +248,9 @@ jobs: - name: Install dependencies run: make deps + - name: Generate components + run: make components + - name: Build RS ${{ matrix.version }} run: | set -x @@ -320,6 +326,9 @@ jobs: - name: Install dependencies run: make deps + - name: Generate components + run: make components + - name: Build RDI ${{ matrix.version }} run: | set -x @@ -395,6 +404,9 @@ jobs: - name: Install dependencies run: make deps + - name: Generate components + run: make components + - name: Build RedisVL ${{ matrix.version }} run: | set -x diff --git a/assets/css/index.css b/assets/css/index.css index dcf0b36290..eeae34fba4 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -513,6 +513,28 @@ select { @apply block; } +/* Jupyter example toggle visibility - same pattern as codetabs */ +/* When aria-expanded is not set (initial state), show all lines at full opacity */ +/* This is the default state showing only the step code */ + +/* When aria-expanded="true", show full file with context lines dimmed */ +.thebe-container > .panel[aria-expanded="true"] .full-file-view .highlight .chroma > code > .line:not(.hl), +.thebe-container > .panel[aria-expanded="true"] .full-file-view .highlight .chroma > .lntable .lntd code > .lnt, +.thebe-container > .panel[aria-expanded="true"] .full-file-view .highlight .chroma > .lntable .lntd code > .line:not(.hl) { + @apply opacity-60; +} + +/* Ensure highlighted lines (current step) have full opacity when expanded */ +.thebe-container > .panel[aria-expanded="true"] .full-file-view .highlight .chroma > code > .hl, +.thebe-container > .panel[aria-expanded="true"] .full-file-view .highlight .chroma > .lntable .lntd code > .hl { + opacity: 1 !important; +} + +.thebe-container > .panel .highlight .chroma > code > .hl, +.thebe-container > .panel .highlight .chroma > .lntable .lntd code > .hl { + @apply bg-inherit; +} + .download-cards { @apply space-y-6 lg:space-y-0 max-w-[47rem] lg:max-w-full mx-auto lg:mx-0 lg:grid grid-cols-2 gap-x-6 items-start mb-[3.25rem]; } diff --git a/content/develop/clients/redis-py/_index.md b/content/develop/clients/redis-py/_index.md index d5f594c0c6..82ab762ae0 100644 --- a/content/develop/clients/redis-py/_index.md +++ b/content/develop/clients/redis-py/_index.md @@ -48,23 +48,19 @@ pip install redis[hiredis] Connect to localhost on port 6379, set a value in Redis, and retrieve it. All responses are returned as bytes in Python. To receive decoded strings, set `decode_responses=True`. For more connection options, see [these examples](https://redis.readthedocs.io/en/stable/examples.html). -{{< clients-example set="landing" step="connect" lang_filter="Python" description="Foundational: Connect to a Redis server and establish a client connection" difficulty="beginner" >}} -{{< /clients-example >}} +{{< jupyter-example set="landing" step="connect" lang_filter="Python" description="Connect to a Redis server and establish a client connection" />}} Store and retrieve a simple string. -{{< clients-example set="landing" step="set_get_string" lang_filter="Python" description="Foundational: Set and retrieve string values using SET and GET commands" difficulty="beginner" >}} -{{< /clients-example >}} +{{< jupyter-example set="landing" step="set_get_string" depends="connect" lang_filter="Python" description="Set and retrieve string values using SET and GET commands" />}} Store and retrieve a dict. -{{< clients-example set="landing" step="hash_operations" lang_filter="Python" description="Foundational: Store and retrieve hash data structures using HSET and HGETALL" difficulty="beginner" >}} -{{< /clients-example >}} +{{< jupyter-example set="landing" step="hash_operations" depends="connect" lang_filter="Python" description="Store and retrieve hash data structures using HSET and HGETALL" />}} Close the connection when you're done. -{{< clients-example set="landing" step="close" lang_filter="Python" description="Foundational: Properly close a Redis client connection to release resources" difficulty="beginner" >}} -{{< /clients-example >}} +{{< jupyter-example set="landing" step="close" depends="connect" lang_filter="Python" description="Close the Redis connection" no_output="true" />}} ## More information diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 6e8ee9aa69..d01308670d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -35,10 +35,6 @@ {{ partial "scss.html" (dict "path" "scss/style.scss") }} {{ partialCached "css.html" . }} - {{ if .Page.Store.Get "hasOtelMetrics" }} - - {{ end }} - {{ block "head" . }}{{ end }} {{ partial "ai-metadata.html" . }} @@ -55,6 +51,16 @@ + {{/* Compatibility fallback: shortcode body render sets these globals after . */}} + {{ $binderRef := .Scratch.Get "binderRef" }} + {{ $kernelName := .Scratch.Get "kernelName" }} + {{ if $binderRef }} + + {{ end }} + {{ partial "segment.html" . }} {{ partial "fullstory.html" . }} @@ -119,14 +125,1746 @@ {{ end }} - - {{ if .Page.Store.Get "hasOtelMetrics" }} - - {{ end }} - {{ if .Page.Store.Get "hasTimeline" }} {{ end }} + + + {{ if .Page.Store.Get "hasThebe" }} + + + + + + + + + + + {{ end }} diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 0a560ea113..7e365a7dac 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -2,10 +2,10 @@ + + {{/* Store line range information for read-only marking */}} + + + + + + + diff --git a/local_examples/client-specific/redis-py/landing.py b/local_examples/client-specific/redis-py/landing.py index 52e342ecd2..afe05b65f4 100644 --- a/local_examples/client-specific/redis-py/landing.py +++ b/local_examples/client-specific/redis-py/landing.py @@ -1,8 +1,9 @@ # EXAMPLE: landing # BINDER_ID python-landing -import redis +# KERNEL_NAME python3 # STEP_START connect +import redis r = redis.Redis(host='localhost', port=6379, decode_responses=True) # STEP_END