Skip to content

Commit 4165309

Browse files
committed
Merge branch 'main' into DOC-4805
2 parents 213ae3e + 1d4c7ee commit 4165309

File tree

955 files changed

+53704
-6355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

955 files changed

+53704
-6355
lines changed

.github/workflows/redisvl_docs_sync.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
3535
# Get latest release
3636
latest_release=$(gh release -R redis/redis-vl-python list --json name,isLatest --jq '.[] | select(.isLatest)|.name')
37-
git checkout "tags/${latest_release}"
37+
git checkout "tags/${latest_release}" || git checkout "tags/v${latest_release}"
3838
pip3 install -e .
3939
4040
popd
@@ -107,13 +107,15 @@ jobs:
107107
108108
# Convert jupyter notebooks to markdown
109109
jupyter nbconvert --to markdown build/jupyter_execute/user_guide/*.ipynb --output-dir redis_vl_hugo/user_guide/ 2>/dev/null
110+
jupyter nbconvert --to markdown build/jupyter_execute/user_guide/release_guide/*.ipynb --output-dir redis_vl_hugo/user_guide/release_guide/ 2>/dev/null
110111
jupyter nbconvert --to markdown build/jupyter_execute/overview/cli.ipynb --output-dir redis_vl_hugo/overview/ 2>/dev/null
111112
112113
# Prepare markdown files
113114
rsync -a ./build/markdown/api/ ./redis_vl_hugo/api/ --exclude=index.md
114115
cp ./build/markdown/overview/installation.md ./redis_vl_hugo/overview/installation.md
115116
116117
# Format markdown files
118+
shopt -s globstar
117119
markdown_pages=(./redis_vl_hugo/**/*.md)
118120
119121
for markdown_page in "${markdown_pages[@]}"; do
@@ -208,19 +210,21 @@ jobs:
208210
# Format _index.md pages
209211
cp ./build/markdown/api/index.md ./redis_vl_hugo/api/_index.md
210212
cp ./build/markdown/user_guide/index.md ./redis_vl_hugo/user_guide/_index.md
213+
cp ./build/markdown/user_guide/release_guide/index.md ./redis_vl_hugo/user_guide/release_guide/_index.md
211214
cp ./build/markdown/overview/index.md ./redis_vl_hugo/overview/_index.md
212215
213216
index_markdown_pages=(
214217
./redis_vl_hugo/api/_index.md
215218
./redis_vl_hugo/user_guide/_index.md
219+
./redis_vl_hugo/user_guide/release_guide/_index.md
216220
./redis_vl_hugo/overview/_index.md
217221
)
218222
219223
for index_markdown_page in "${index_markdown_pages[@]}"; do
220224
format "${index_markdown_page}"
221225
222226
# Fix relrefs by removing .md extension and references to numbered pages
223-
sed -E -i 's/\.md/\//g; s/\([0-9]+_/\(/g' "${index_markdown_page}"
227+
sed -E -i 's/\.md/\//g; s/\([0-9]{2}_/\(/g; s/\/index\//\//g' "${index_markdown_page}"
224228
done
225229
226230
# Rename user guides to strip leading numbers from filename

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The `filename` property value can be any file name path which is relative to the
102102
We added a new property `class` which allows you to override the CSS class of the image. Images have by default a `block` display in Tailwind. You can change this by setting the class property to `inline`. The following example shows two images that are in a single line:
103103

104104
```
105-
{{< image filename="/images/rc/icon-database-update-status-pending.png#no-click" alt="Pending database status" class="inline" >}} &nbsp; {{< image filename="/images/rc/icon-database-update-status-active.png#no-click" alt="Active database status" class="inline" >}}
105+
{{< image filename="/images/rc/icon-database-update-status-pending.png#no-click" alt="Pending database status" class="inline" >}} &nbsp; {{< image filename="/images/rc/icon-database-status-active.png#no-click" alt="Active database status" class="inline" >}}
106106
```
107107

108108
### Templating

assets/css/index.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,4 +1073,25 @@ a[href*="#no-click"], img[src*="#no-click"] {
10731073

10741074
.dd-item .highlight:hover {
10751075
color: #5961ff;
1076+
}
1077+
1078+
.copy-button {
1079+
background-color: #eee;
1080+
border: none;
1081+
padding: 4px;
1082+
cursor: pointer;
1083+
border-radius: 4px;
1084+
display: flex;
1085+
align-items: center;
1086+
justify-content: center;
1087+
}
1088+
1089+
.copy-button svg {
1090+
width: 16px;
1091+
height: 16px;
1092+
fill: #333;
1093+
}
1094+
1095+
.copy-button:hover {
1096+
background-color: #ddd;
10761097
}

build/image_report.py

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
import os
88

99

10-
def scan_file(path: str) -> int:
10+
def scan_file(path: str, verbose: bool = True) -> list:
1111
"""Scans a file for all `image` shortcodes.
1212
1313
Args:
1414
path (str): Path to file.
15+
verbose (bool, optional): If True, prints the shortcodes found. Defaults to True.
1516
1617
Returns:
17-
(int) Number of shortcodes found.
18+
(list) A list of all image shortcodes found.
1819
"""
1920

2021
img_list = []
22+
img_names = []
2123

2224
with open(path, encoding="utf_8") as md_file:
2325
text = md_file.read()
@@ -26,16 +28,18 @@ def scan_file(path: str) -> int:
2628
text, lambda t: t.tag == "image"
2729
):
2830
img_list.append((img, pos_info))
31+
img_names.append(img.named_params["filename"])
2932

30-
if len(img_list) > 0:
33+
if len(img_list) > 0 and verbose:
3134
print(f"File '{path}':")
3235

3336
for img in img_list:
3437
print(
3538
f" Line {img[1].line}: '{img[0].named_params['filename']}'"
3639
)
3740

38-
return len(img_list)
41+
# return len(img_list)
42+
return img_names
3943

4044

4145
parser = argparse.ArgumentParser(
@@ -44,20 +48,50 @@ def scan_file(path: str) -> int:
4448
)
4549

4650
parser.add_argument("pathname", help="Path of the folder to scan")
51+
parser.add_argument("--find-unused", nargs=1, help="Prints out all images in IMAGEFOLDER that are not found in pathname. Set pathname to the top content folder to scan all content for images.", metavar="IMAGEFOLDER")
4752

4853
args = parser.parse_args()
4954

5055
print(f"Scanning '{args.pathname}'")
5156

5257
num_found = 0
58+
all_images_found = []
5359

5460
for root, dirs, files in os.walk(args.pathname):
5561
for file in files:
5662
if file.endswith(".md"):
5763
fullpath = os.path.join(root, file)
58-
num_found += scan_file(fullpath)
64+
images_found = scan_file(fullpath, verbose=args.find_unused is None)
65+
num_found += len(images_found)
66+
all_images_found.extend(images_found)
5967

6068
if num_found == 0:
6169
print(f"No image shortcodes found in '{args.pathname}'")
6270
else:
6371
print(f"Found {num_found} image shortcodes.")
72+
73+
if args.find_unused and num_found > 0:
74+
unique_images = list(set(all_images_found))
75+
print(f"Found {len(unique_images)} unique images in '{args.pathname}'.")
76+
print(f"Checking for images not found in '{args.pathname}' that are in '{args.find_unused[0]}'")
77+
78+
unused_images = []
79+
total_images = 0
80+
81+
for root, dirs, files in os.walk(args.find_unused[0]):
82+
for file in files:
83+
if (file.endswith(".png") or file.endswith(".jpg") or file.endswith(".webp")):
84+
total_images += 1
85+
if not any(file in img for img in unique_images):
86+
img_filepath = os.path.join(root, file)
87+
print(f" Image '{img_filepath}' not found in '{args.pathname}'")
88+
unused_images.append(img_filepath)
89+
90+
print(f"Found {len(unused_images)} unused images out of {total_images} images in '{args.find_unused[0]}.'")
91+
92+
if len(unused_images) > 0:
93+
print("Do you want to remove these images? (y/n) (DO NOT DO ON MAIN BRANCH!)")
94+
if input().lower() == "y":
95+
for img in unused_images:
96+
os.remove(img)
97+
print(f"Removed '{img}'")

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ rdi_redis_gears_version = "1.2.6"
5555
rdi_debezium_server_version = "2.3.0.Final"
5656
rdi_db_types = "cassandra|mysql|oracle|postgresql|sqlserver"
5757
rdi_cli_latest = "latest"
58-
rdi_current_version = "v1.6.6"
58+
rdi_current_version = "1.8.0"
5959

6060
[params.clientsConfig]
6161
"Python"={quickstartSlug="redis-py"}

content/commands/client-list/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ Here is the meaning of the fields:
117117
* `rbp`: peak size of the client's read buffer since the client connected. Added in Redis 7.0
118118
* `rbs`: current size of the client's read buffer in bytes. Added in Redis 7.0
119119
* `io-thread`: id of I/O thread assigned to the client. Added in Redis 8.0
120+
* `tot-net-in`: total network input bytes read from this client.
121+
* `tot-net-out`: total network output bytes sent to this client.
122+
* `tot-cmds`: total count of commands this client executed.
120123

121124
The client flags can be a combination of:
122125

content/commands/json.debug-memory/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ title: JSON.DEBUG MEMORY
3535
---
3636
Report a value's memory usage in bytes
3737

38+
{{< warning >}}
39+
The actual total memory consumption by a key could be much lower than the value reported by this command because of an internal JSON string reuse mechanism. For more information, see the [JSON memory usage page]({{< relref "/develop/data-types/json/ram#json-string-reuse-mechanism" >}}).
40+
{{< /warning >}}
41+
3842
[Examples](#examples)
3943

4044
## Required arguments

content/commands/spublish/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ title: SPUBLISH
5252
Posts a message to the given shard channel.
5353

5454
In Redis Cluster, shard channels are assigned to slots by the same algorithm used to assign keys to slots.
55-
A shard message must be sent to a node that own the slot the shard channel is hashed to.
56-
The cluster makes sure that published shard messages are forwarded to all the node in the shard, so clients can subscribe to a shard channel by connecting to any one of the nodes in the shard.
55+
A shard message must be sent to a node that owns the slot the shard channel is hashed to.
56+
The cluster makes sure that published shard messages are forwarded to all the nodes in the shard, so clients can subscribe to a shard channel by connecting to any one of the nodes in the shard.
5757

5858
For more information about sharded pubsub, see [Sharded Pubsub]({{< relref "/develop/interact/pubsub#sharded-pubsub" >}}).
5959

6060
## Examples
6161

62-
For example the following command publish to channel `orders` with a subscriber already waiting for message(s).
62+
For example the following command publishes to the `orders` channel with a subscriber already waiting for message(s).
6363

6464
```
6565
> spublish orders hello

content/develop/_index.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,43 @@
22
title: Develop with Redis
33
description: Learn how to develop with Redis
44
linkTitle: Develop
5+
hideListLinks: true
56
---
7+
8+
Get a Redis server running in minutes with a free trial of
9+
[Redis Cloud]({{< relref "/operate/rc" >}}), or install
10+
[Redis Open Source]({{< relref "/operate/oss_and_stack" >}}) locally
11+
on your machine. Then, explore Redis with your favorite
12+
[programming language]({{< relref "/develop/clients" >}})
13+
or analyze and manage your database with our
14+
[UI tools]({{< relref "/develop/tools" >}}):
15+
16+
| | Get started | Document search | Vector search |
17+
|:----- | :-----: | :-----: | :-----:|
18+
| [Python]({{< relref "/develop/clients/redis-py" >}}) | [See Python examples]({{< relref "/develop/clients/redis-py/connect" >}}) | [See Python examples]({{< relref "/develop/clients/redis-py/queryjson" >}}) | [See Python examples]({{< relref "/develop/clients/redis-py/vecsearch" >}}) |
19+
| [C#/.NET]({{< relref "/develop/clients/dotnet" >}}) | [See C# examples]({{< relref "/develop/clients/dotnet/connect" >}}) | [See C# examples]({{< relref "/develop/clients/dotnet/queryjson" >}}) | [See C# examples]({{< relref "/develop/clients/dotnet/vecsearch" >}}) |
20+
| [Node.js]({{< relref "/develop/clients/nodejs" >}}) | [See JS examples]({{< relref "/develop/clients/nodejs/connect" >}}) | [See JS examples]({{< relref "/develop/clients/nodejs/queryjson" >}}) | [See JS examples]({{< relref "/develop/clients/nodejs/vecsearch" >}}) |
21+
| [Java]({{< relref "/develop/clients/jedis" >}}) | [See Java examples]({{< relref "/develop/clients/jedis/connect" >}}) | [See Java examples]({{< relref "/develop/clients/jedis/queryjson" >}}) | [See Java examples]({{< relref "/develop/clients/jedis/vecsearch" >}}) |
22+
| [Go]({{< relref "/develop/clients/go" >}}) | [See Go examples]({{< relref "/develop/clients/go/connect" >}}) | [See Go examples]({{< relref "/develop/clients/go/queryjson" >}}) | [See Go examples]({{< relref "/develop/clients/go/vecsearch" >}}) |
23+
| [PHP]({{< relref "/develop/clients/php" >}}) | [See PHP examples]({{< relref "/develop/clients/php/connect" >}}) | [See PHP examples]({{< relref "/develop/clients/php/queryjson" >}}) | [See PHP examples]({{< relref "/develop/clients/php/vecsearch" >}}) |
24+
25+
<div class="flex flex-col gap-5">
26+
<div class="flex items-start">
27+
{{< image filename="develop/tools/insight/images/Browser.png" class="w-[300px] mr-4" >}}
28+
<div>
29+
<h3><a href='{{< relref "/develop/tools/insight">}}'>Redis Insight</a></h3>
30+
<p>Visual client tool for creating, managing, and analyzing Redis databases.</p>
31+
</div>
32+
</div>
33+
<div class="flex items-start">
34+
{{< image filename="images/dev/connect/vscode/vscode-cli.png" class="w-[300px] mr-4" >}}
35+
<div>
36+
<h3><a href='{{< relref "/develop/tools/redis-for-vscode" >}}'>Redis for VS Code</a></h3>
37+
<p>Visual client tool for creating, managing, and analyzing Redis databases.</p>
38+
</div>
39+
</div>
40+
</div>
41+
42+
| {{< image filename="images/icon_logo/icon-developers-32-midnight.png" >}} </br>[**Quick start**]({{< relref "/develop/get-started" >}}) | {{< image filename="images/icon_logo/icon-data-structures-32-midnight.png" >}} </br>[**Data types**]({{< relref "/develop/data-types" >}}) | {{< image filename="images/icon_logo/icon-text-search-32-midnight.png" >}} </br>[**Query engine**]({{< relref "/develop/interact/search-and-query" >}}) |
43+
|---|---|---|
44+
| [Vector database]({{< relref "/develop/get-started/vector-database" >}})</br>[Document store]({{< relref "/develop/get-started/document-database" >}})</br>[Data structure store]({{< relref "/develop/get-started/data-store" >}})</br>[RAG with Redis]({{< relref "/develop/get-started/rag" >}})</br>[GenAI]({{< relref "/develop/get-started/redis-in-ai" >}}) | [String]({{< relref "/develop/data-types/strings" >}})</br>[JSON]({{< relref "/develop/data-types/json" >}})</br>[Hash]({{< relref "/develop/data-types/hashes" >}})</br>[Vector set]({{< relref "/develop/data-types/vector-sets" >}})</br>[Probabilistic types]({{< relref "/develop/data-types/probabilistic" >}}) | [Get started]({{< relref "/develop/interact/search-and-query" >}})</br>[Schema field types]({{< relref "/develop/interact/search-and-query/basic-constructs/field-and-type-options" >}})</br>[Indexing]({{< relref "/develop/interact/search-and-query/indexing" >}})</br>[Querying]({{< relref "/develop/interact/search-and-query/query" >}})</br>[Use cases]({{< relref "/develop/interact/search-and-query/query-use-cases" >}})
File renamed without changes.

0 commit comments

Comments
 (0)