Skip to content

Commit f3facc3

Browse files
committed
Merge branch 'main' into DOC-4886
2 parents dc52bdc + cad3b13 commit f3facc3

File tree

410 files changed

+5690
-4802
lines changed

Some content is hidden

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

410 files changed

+5690
-4802
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

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 = "v1.6.7"
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/hsetex/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Set the value of one or more fields of a given hash key, and optionally set thei
111111

112112
## Options
113113

114-
The `HGETEX` command supports a set of options:
114+
The `HSETEX` command supports a set of options:
115115

116116
* `FNX` -- Only set the fields if none of them already exist.
117117
* `FXX` -- Only set the fields if all of them already exist.

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/clients/dotnet/condexec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ categories:
1212
description: Understand how `NRedisStack` uses conditional execution
1313
linkTitle: Conditional execution
1414
title: Conditional execution
15-
weight: 6
15+
weight: 60
1616
---
1717

1818
Most Redis client libraries use transactions with the

content/develop/clients/dotnet/connect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ categories:
1212
description: Connect your .NET application to a Redis database
1313
linkTitle: Connect
1414
title: Connect to the server
15-
weight: 2
15+
weight: 20
1616
---
1717

1818
## Basic connection

0 commit comments

Comments
 (0)