Skip to content

Commit 8ef3897

Browse files
Merge branch 'main' into home-page-reskin
2 parents 063bc5f + 8a287bf commit 8ef3897

File tree

227 files changed

+50881
-25184
lines changed

Some content is hidden

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

227 files changed

+50881
-25184
lines changed

.github/workflows/main-staging.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ jobs:
6565
kubernetes_versions=($(find content/operate/kubernetes/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6666
rs_versions=($(find content/operate/rs/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6767
rdi_versions=($(find content/integrate/redis-data-integration/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
68+
redisvl_versions=($(find content/develop/ai/redisvl/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
69+
70+
printf "%s\n" "${kubernetes_versions[@]}" > kubernetes-versions
71+
printf "%s\n" "${rs_versions[@]}" > rs-versions
72+
printf "%s\n" "${rdi_versions[@]}" > rdi-versions
73+
printf "%s\n" "${redisvl_versions[@]}" > redisvl-versions
6874
6975
# build latest
7076
for version in "${kubernetes_versions[@]}"; do
@@ -76,6 +82,9 @@ jobs:
7682
for version in "${rdi_versions[@]}"; do
7783
rm -r "content/integrate/redis-data-integration/${version}"
7884
done
85+
for version in "${redisvl_versions[@]}"; do
86+
rm -r "content/develop/ai/redisvl/${version}"
87+
done
7988
make all
8089
8190
git checkout .
@@ -162,6 +171,33 @@ jobs:
162171
git checkout .
163172
done
164173
174+
for version in "${redisvl_versions[@]}"; do
175+
176+
setBaseUrl
177+
178+
# for each version, remove all other versions before building
179+
versions_to_remove=($(echo "${redisvl_versions[@]}" "${version}" | tr ' ' '\n' | sort | uniq -u))
180+
for version_to_remove in "${versions_to_remove[@]}"; do
181+
rm -r "content/develop/ai/redisvl/${version_to_remove}"
182+
done
183+
184+
# relrefs should not include version
185+
find "content/develop/ai/redisvl/${version}" -type f | while read file; do
186+
awk '{gsub(/\(\{\{< ?relref "\/develop\/ai\/redisvl\/'${version}'/, "({{< relref \"/develop/ai/redisvl") }1' "$file" > tmpfile && mv tmpfile "$file"
187+
done
188+
189+
rsync -a --delete-after "content/develop/ai/redisvl/${version}"/ content/develop/ai/redisvl/
190+
sed -i 's/id="versionSelectorRedisvlValue" class="version-selector-control">latest/id="versionSelectorRedisvlValue" class="version-selector-control">v'"${version}"'/' layouts/partials/docs-nav.html
191+
sed -i 's/linkTitle: '"${version}"'/linkTitle: RedisVL/' content/develop/ai/redisvl/_index.md
192+
193+
# inject replace command in meta-links to make sure editURL and issuesURL point to right version
194+
sed -i "12i \{\{ \$gh_path = replaceRE \`\^develop\/ai\/redisvl\/\` \"develop\/ai\/redisvl\/$version\/\" \$gh_path }}" layouts/partials/meta-links.html
195+
196+
hugo -d "redisvl-${version}"
197+
198+
git checkout .
199+
done
200+
165201
- name: List client examples
166202
run: ls "${{ github.workspace }}/examples"
167203
- name: List files to be published
@@ -201,6 +237,8 @@ jobs:
201237
product=$(awk 'BEGIN{FS=OFS="-"}{NF--; print}' <<< $versioned_build)
202238
if [[ "${product}" == "redis-data-integration" ]]; then
203239
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}/" "gs://${BUCKET}/${bucket_path}/${versioned_build}/integrate/${product}"
240+
elif [[ "${product}" == "redisvl" ]]; then
241+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/develop/ai/${product}/" "gs://${BUCKET}/${bucket_path}/${versioned_build}/develop/ai/${product}"
204242
else
205243
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}/" "gs://${BUCKET}/${bucket_path}/${versioned_build}/operate/${product}"
206244
fi

.github/workflows/main.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ jobs:
6565
kubernetes_versions=($(find content/operate/kubernetes/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6666
rs_versions=($(find content/operate/rs/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6767
rdi_versions=($(find content/integrate/redis-data-integration/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
68+
redisvl_versions=($(find content/develop/ai/redisvl/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
69+
70+
printf "%s\n" "${kubernetes_versions[@]}" > kubernetes-versions
71+
printf "%s\n" "${rs_versions[@]}" > rs-versions
72+
printf "%s\n" "${rdi_versions[@]}" > rdi-versions
73+
printf "%s\n" "${redisvl_versions[@]}" > redisvl-versions
6874
6975
# build latest
7076
for version in "${kubernetes_versions[@]}"; do
@@ -76,6 +82,9 @@ jobs:
7682
for version in "${rdi_versions[@]}"; do
7783
rm -r "content/integrate/redis-data-integration/${version}"
7884
done
85+
for version in "${redisvl_versions[@]}"; do
86+
rm -r "content/develop/ai/redisvl/${version}"
87+
done
7988
make all
8089
8190
git checkout .
@@ -162,6 +171,33 @@ jobs:
162171
git checkout .
163172
done
164173
174+
for version in "${redisvl_versions[@]}"; do
175+
176+
setBaseUrl
177+
178+
# for each version, remove all other versions before building
179+
versions_to_remove=($(echo "${redisvl_versions[@]}" "${version}" | tr ' ' '\n' | sort | uniq -u))
180+
for version_to_remove in "${versions_to_remove[@]}"; do
181+
rm -r "content/develop/ai/redisvl/${version_to_remove}"
182+
done
183+
184+
# relrefs should not include version
185+
find "content/develop/ai/redisvl/${version}" -type f | while read file; do
186+
awk '{gsub(/\(\{\{< ?relref "\/develop\/ai\/redisvl\/'${version}'/, "({{< relref \"/develop/ai/redisvl") }1' "$file" > tmpfile && mv tmpfile "$file"
187+
done
188+
189+
rsync -a --delete-after "content/develop/ai/redisvl/${version}"/ content/develop/ai/redisvl/
190+
sed -i 's/id="versionSelectorRedisvlValue" class="version-selector-control">latest/id="versionSelectorRedisvlValue" class="version-selector-control">v'"${version}"'/' layouts/partials/docs-nav.html
191+
sed -i 's/linkTitle: '"${version}"'/linkTitle: RedisVL/' content/develop/ai/redisvl/_index.md
192+
193+
# inject replace command in meta-links to make sure editURL and issuesURL point to right version
194+
sed -i "12i \{\{ \$gh_path = replaceRE \`\^develop\/ai\/redisvl\/\` \"develop\/ai\/redisvl\/$version\/\" \$gh_path }}" layouts/partials/meta-links.html
195+
196+
hugo -d "redisvl-${version}"
197+
198+
git checkout .
199+
done
200+
165201
- name: List client examples
166202
run: ls "${{ github.workspace }}/examples"
167203
- name: List files to be published
@@ -207,6 +243,9 @@ jobs:
207243
if [[ "${product}" == "redis-data-integration" ]]; then
208244
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}" "gs://${BUCKET}/${versioned_build}/integrate/${product}"
209245
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}/${version}" "gs://${BUCKET}/docs/$bucket_path/integrate/${product}/${version}"
246+
elif [[ "${product}" == "redisvl" ]]; then
247+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/develop/ai/${product}" "gs://${BUCKET}/${versioned_build}/develop/ai/${product}"
248+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/develop/ai/${product}/${version}" "gs://${BUCKET}/docs/$bucket_path/develop/ai/${product}/${version}"
210249
else
211250
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${versioned_build}/operate/${product}"
212251
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}/${version}" "gs://${BUCKET}/docs/$bucket_path/operate/${product}/${version}"
@@ -231,6 +270,9 @@ jobs:
231270
if [[ "${product}" == "redis-data-integration" ]]; then
232271
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}" "gs://${BUCKET}/${bucket_path}/${versioned_build}/integrate/${product}"
233272
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}/${version}" "gs://${BUCKET}/docs/${bucket_path}/integrate/${product}/${version}"
273+
elif [[ "${product}" == "redisvl" ]]; then
274+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/develop/ai/${product}" "gs://${BUCKET}/${bucket_path}/${versioned_build}/develop/ai/${product}"
275+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/develop/ai/${product}/${version}" "gs://${BUCKET}/docs/${bucket_path}/develop/ai/${product}/${version}"
234276
else
235277
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${bucket_path}/${versioned_build}/operate/${product}"
236278
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}/${version}" "gs://${BUCKET}/docs/${bucket_path}/operate/${product}/${version}"

.github/workflows/redisvl_docs_sync.yaml

Lines changed: 67 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,30 @@ on:
66
workflow_dispatch: # or run on manual trigger
77

88
jobs:
9+
define-version-matrix:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
matrix: ${{ steps.set-matrix.outputs.matrix }}
13+
steps:
14+
- id: set-matrix
15+
env:
16+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
run: |
18+
OLDEST_SUPPORTED_VERSION="0.6.0"
19+
versions=$(gh release -R redis/redis-vl-python list --json name,isLatest \
20+
| jq -r '.[] | [.name, .isLatest] | @tsv' \
21+
| sed "/${OLDEST_SUPPORTED_VERSION}/q" \
22+
| jq -Rnc '{include: [inputs | split("\t") | {version: .[0], isLatest: .[1]}]}')
23+
24+
echo "${versions}"
25+
echo "matrix=${versions}" >> "$GITHUB_OUTPUT"
26+
927
redisvl_docs_sync:
1028
runs-on: ubuntu-latest
29+
needs: define-version-matrix
30+
strategy:
31+
matrix: ${{ fromJSON(needs['define-version-matrix'].outputs.matrix) }}
32+
fail-fast: false
1133
permissions:
1234
contents: write
1335
pull-requests: write
@@ -30,20 +52,25 @@ jobs:
3052
env:
3153
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3254
run: |
33-
pushd redis-vl-python
55+
version="${{ matrix.version }}"
56+
isLatest="${{ matrix.isLatest }}"
3457
35-
# Get latest release
36-
latest_release=$(gh release -R redis/redis-vl-python list --json name,isLatest --jq '.[] | select(.isLatest)|.name')
37-
git checkout "tags/${latest_release}" || git checkout "tags/v${latest_release}"
58+
pushd redis-vl-python
59+
git checkout "tags/${version}" || git checkout "tags/v${version}"
3860
pip3 install -e .
39-
4061
popd
41-
sphinx-build -M markdown ./redis-vl-python/docs ./build
42-
43-
echo "release=${latest_release}" >> "$GITHUB_OUTPUT"
62+
63+
if [ ${isLatest} = true ]; then
64+
sphinx-build -M markdown ./redis-vl-python/docs ./build-latest
65+
else
66+
sphinx-build -M markdown ./redis-vl-python/docs ./build-${version}
67+
fi
4468
4569
- name: 'Format markdown files for hugo compatibility'
4670
run: |
71+
version="${{ matrix.version }}"
72+
isLatest="${{ matrix.isLatest }}"
73+
4774
#!/bin/bash
4875
mkdir -p redis_vl_hugo/user_guide/
4976
mkdir redis_vl_hugo/overview/
@@ -65,13 +92,22 @@ jobs:
6592
alias=$(echo ${src} | sed -E 's|./redis_vl_hugo/|/integrate/redisvl/| ; s|\.md$|| ; s|\/_index$||')
6693
6794
# Inject frontmatter in destination file
95+
if [ ${isLatest} = true ]; then
6896
cat >_tmp <<EOL
6997
---
7098
linkTitle: ${linkTitle}
7199
title: ${title}
72100
aliases:
73101
- ${alias}
74102
EOL
103+
else
104+
cat >_tmp <<EOL
105+
---
106+
linkTitle: ${linkTitle}
107+
title: ${title}
108+
EOL
109+
fi
110+
75111
76112
# Inject weight property for index pages to preserve order
77113
case "${title}" in
@@ -110,12 +146,13 @@ jobs:
110146
}
111147
112148
# Convert jupyter notebooks to markdown
113-
jupyter nbconvert --to markdown build/jupyter_execute/user_guide/*.ipynb --output-dir redis_vl_hugo/user_guide/ 2>/dev/null
114-
jupyter nbconvert --to markdown build/jupyter_execute/overview/cli.ipynb --output-dir redis_vl_hugo/overview/ 2>/dev/null
149+
build_folder=$(echo build-*)
150+
jupyter nbconvert --to markdown ${build_folder}/jupyter_execute/user_guide/*.ipynb --output-dir redis_vl_hugo/user_guide/ 2>/dev/null
151+
jupyter nbconvert --to markdown ${build_folder}/jupyter_execute/overview/cli.ipynb --output-dir redis_vl_hugo/overview/ 2>/dev/null
115152
116153
# Prepare markdown files
117-
rsync -a ./build/markdown/api/ ./redis_vl_hugo/api/ --exclude=index.md
118-
cp ./build/markdown/overview/installation.md ./redis_vl_hugo/overview/installation.md
154+
rsync -a ./${build_folder}/markdown/api/ ./redis_vl_hugo/api/ --exclude=index.md
155+
cp ./${build_folder}/markdown/overview/installation.md ./redis_vl_hugo/overview/installation.md
119156
120157
# Format markdown files
121158
shopt -s globstar
@@ -211,9 +248,9 @@ jobs:
211248
done
212249
213250
# Format _index.md pages
214-
cp ./build/markdown/api/index.md ./redis_vl_hugo/api/_index.md
215-
cp ./build/markdown/user_guide/index.md ./redis_vl_hugo/user_guide/_index.md
216-
cp ./build/markdown/overview/index.md ./redis_vl_hugo/overview/_index.md
251+
cp ./${build_folder}/markdown/api/index.md ./redis_vl_hugo/api/_index.md
252+
cp ./${build_folder}/markdown/user_guide/index.md ./redis_vl_hugo/user_guide/_index.md
253+
cp ./${build_folder}/markdown/overview/index.md ./redis_vl_hugo/overview/_index.md
217254
218255
index_markdown_pages=(
219256
./redis_vl_hugo/api/_index.md
@@ -237,13 +274,21 @@ jobs:
237274
fi
238275
done
239276
240-
cp -r redis_vl_hugo/* content/develop/ai/redisvl/
277+
if [ ${isLatest} = true ]; then
278+
cp -r redis_vl_hugo/* content/develop/ai/redisvl/
279+
else
280+
mkdir -p content/develop/ai/redisvl/${version}/
281+
cp -r redis_vl_hugo/* content/develop/ai/redisvl/${version}/
282+
cp content/develop/ai/redisvl/_index.md content/develop/ai/redisvl/${version}/_index.md
283+
cp content/develop/ai/redisvl/install.md content/develop/ai/redisvl/${version}/install.md
284+
python3 build/version_archiver.py redisvl ${version} --skip-archive
285+
fi
241286
242287
- name: 'Create pull request if necessary'
243288
env:
244289
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
245290
run: |
246-
release="${{ steps.sphinx.outputs.release }}"
291+
release="${{ matrix.version }}"
247292
branch="redisvl_docs_sync_${release}"
248293
redisvl_change=false
249294
@@ -254,7 +299,7 @@ jobs:
254299
if [ "$?" -eq 0 ]; then
255300
set -e
256301
# if it does, create local branch off existing remote branch
257-
git checkout -b "${branch}" "origin/${branch}"
302+
git checkout -f -b "${branch}" "origin/${branch}"
258303
git branch --set-upstream-to="origin/${branch}" "${branch}"
259304
git pull
260305
else
@@ -263,9 +308,11 @@ jobs:
263308
git checkout -b "${branch}"
264309
fi
265310
266-
redisvl_is_different=$(git diff content/develop/ai/redisvl/)
311+
set +e
312+
latest_redisvl_release_is_different=$(git diff content/develop/ai/redisvl/)
313+
new_release=$(git ls-files --others --directory | grep content/develop/ai/redisvl/${release})
267314
268-
if [[ ! -z $redisvl_is_different ]]; then
315+
if [[ -n "$latest_redisvl_release_is_different" || -n "$new_release" ]]; then
269316
redisvl_change=true
270317
271318
git add "content/develop/ai/redisvl/"

assets/css/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ html {
701701

702702
/* Names - Red (NameNamespace) */
703703
.chroma .nn {
704-
@apply text-red-400;
704+
@apply text-blue-400;
705705
}
706706

707707
/* Names - Green (NameTag) */

build/version_archiver.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ def __init__(self, product, version):
88

99
if self.product in ("kubernetes", "rs"):
1010
self.prefix = "operate"
11-
else:
11+
elif self.product in ("redis-data-integration"):
1212
self.prefix = "integrate"
13+
elif self.product in ("redisvl"):
14+
self.prefix = "develop/ai"
1315
self.new_directory = os.path.join("content",self.prefix,self.product,self.new_version)
1416
self.latest = os.path.join("content",self.prefix,self.product)
1517

@@ -179,9 +181,9 @@ def inject_url_frontmatter(self):
179181

180182
def validate_product(value):
181183
"""Custom validator for product argument to allow only 'rs' or 'kubernetes'"""
182-
if value not in ["rs", "kubernetes", "redis-data-integration"]:
184+
if value not in ["rs", "kubernetes", "redis-data-integration", "redisvl"]:
183185
raise argparse.ArgumentTypeError(
184-
"Product must be either 'rs' or 'kubernetes' or 'redis-data-integration'."
186+
"Product must be either 'rs' or 'kubernetes' or 'redis-data-integration' or 'redisvl'. "
185187
)
186188
return value
187189

@@ -204,16 +206,24 @@ def validate_version(value):
204206
parser.add_argument(
205207
"product",
206208
type=validate_product,
207-
help="The name of the product (e.g., rs, kubernetes, redis-data-integration)",
209+
help="The name of the product (e.g., rs, kubernetes, redis-data-integration, redisvl)",
208210
)
209211
parser.add_argument(
210212
"version",
211213
type=validate_version,
212214
help="The release version (e.g., 7, 7.1, 7.1.11)",
213215
)
216+
parser.add_argument(
217+
"--skip-archive",
218+
action="store_true",
219+
default=False,
220+
help="Only update relrefs and inject URL frontmatter"
221+
)
214222
args = parser.parse_args()
215223

216224
r = VersionArchiver(args.product, args.version)
217-
r.archive_version()
225+
if not args.skip_archive:
226+
r.archive_version()
227+
218228
r.version_relrefs()
219229
r.inject_url_frontmatter()

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 = "1.12.3"
58+
rdi_current_version = "1.14.0"
5959

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

content/commands/acl-list.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ configuration file if you wish (but make sure to check [`ACL SAVE`]({{< relref "
4444
2) "user default on nopass ~* &* +@all"
4545
```
4646

47+
{{< note >}}
48+
In some cases, you might see `allchannels` instead of `&*` and `allkeys` instead of `~*` in the output. This is because `allchannels` and `allkeys` are aliases for `&*` and `~*` respectively.
49+
{{< /note>}}
50+
4751
## Return information
4852

4953
{{< multitabs id="acl-list-return-info"

0 commit comments

Comments
 (0)