Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 79 additions & 55 deletions _data/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,39 +57,6 @@ apis:
legacy: 1
stable: 1
nightly: 1
cuspatial:
name: cuSpatial
path: cuspatial
desc: 'cuSpatial is a GPU-accelerated vector GIS library including binary predicates (DE-9IM), point-in-polygon, spatial join, distances, and trajectory analysis.'
ghlink: https://github.com/rapidsai/cuspatial
cllink: https://github.com/rapidsai/cuspatial/blob/main/CHANGELOG.md
versions:
# enable or disable links; 0 = disabled, 1 = enabled
legacy: 1
stable: 0
nightly: 0
cuproj:
name: cuProj
path: cuProj
desc: 'cuProj is a GPU-accelerated geographic and geodetic coordinate transformation library which supports projecting coordinates between coordinate reference systems (CRSes), compatible with PyProj.'
ghlink: https://github.com/rapidsai/cuspatial/tree/main/python/cuproj
cllink: https://github.com/rapidsai/cuspatial/blob/main/CHANGELOG.md # cuProj is housed within cuSpatial so updates remain in the cuSpatial changelog
versions:
# enable or disable links; 0 = disabled, 1 = enabled
legacy: 1
stable: 0
nightly: 0
cusignal:
name: cusignal
path: cusignal
desc: 'cuSignal functionality has been moved to CuPy. Please see the CuPy documentation for more information.'
ghlink: https://github.com/cupy/cupy
cllink: https://docs.cupy.dev/en/latest/reference/scipy_signal.html
versions:
# enable or disable links; 0 = disabled, 1 = enabled
legacy: 0
stable: 0
nightly: 0
cudf-java:
name: 'Java + cuDF'
path: cudf-java
Expand Down Expand Up @@ -205,28 +172,6 @@ libs:
legacy: 1
stable: 1
nightly: 1
libcuspatial:
name: libcuspatial
path: libcuspatial
desc: 'libcuspatial is a GPU-accelerated header-only C++ vector GIS library including binary predicates (DE-9IM), point-in-polygon, spatial join, distances, and trajectory analysis.'
ghlink: https://github.com/rapidsai/cuspatial
cllink: https://github.com/rapidsai/cuspatial/blob/main/CHANGELOG.md
versions:
# enable or disable links; 0 = disabled, 1 = enabled
legacy: 1
stable: 0
nightly: 0
libcuproj:
name: libcuproj
path: libcuproj
desc: 'libcuproj is a C++ header-only library for GPU-accelerated geographic and geodetic coordinate transformation library which supports projecting coordinates between coordinate reference systems (CRSes), similar to PROJ.'
ghlink: https://github.com/rapidsai/cuspatial/tree/main/cpp/cuproj
cllink: https://github.com/rapidsai/cuspatial/blob/main/CHANGELOG.md # Shares a changelog with cuSpatial
versions:
# enable or disable links; 0 = disabled, 1 = enabled
legacy: 1
stable: 0
nightly: 0
libcuml:
name: libcuml
path: libcuml
Expand Down Expand Up @@ -270,3 +215,82 @@ libs:
legacy: 1
stable: 1
nightly: 1

# "inactive" RAPIDS projects, where docs links are preserved indefinitely but not
# expected to be get new releases
inactive-projects:
cuproj:
name: cuProj
path: cuProj
desc: 'cuProj is a GPU-accelerated geographic and geodetic coordinate transformation library which supports projecting coordinates between coordinate reference systems (CRSes), compatible with PyProj.'
ghlink: https://github.com/rapidsai/cuspatial/tree/main/python/cuproj
cllink: https://github.com/rapidsai/cuspatial/blob/main/CHANGELOG.md # cuProj is housed within cuSpatial so updates remain in the cuSpatial changelog
versions:
# enable or disable links; 0 = disabled, 1 = enabled
legacy: 1
stable: 1
nightly: 0
# always use these specific versions for these specific paths, regardless
# of the current state of RAPIDS
version-overrides:
legacy: "25.02"
stable: "25.04"
cusignal:
name: cusignal
path: cusignal
desc: 'cuSignal functionality has been moved to CuPy. Please see the CuPy documentation for more information.'
ghlink: https://github.com/cupy/cupy
cllink: https://docs.cupy.dev/en/latest/reference/scipy_signal.html
versions:
# enable or disable links; 0 = disabled, 1 = enabled
legacy: 0
stable: 0
nightly: 0
cuspatial:
name: cuSpatial
path: cuspatial
desc: 'cuSpatial is a GPU-accelerated vector GIS library including binary predicates (DE-9IM), point-in-polygon, spatial join, distances, and trajectory analysis.'
ghlink: https://github.com/rapidsai/cuspatial
cllink: https://github.com/rapidsai/cuspatial/blob/main/CHANGELOG.md
versions:
# enable or disable links; 0 = disabled, 1 = enabled
legacy: 1
stable: 1
nightly: 0
# always use these specific versions for these specific paths, regardless
# of the current state of RAPIDS
version-overrides:
legacy: "25.02"
stable: "25.04"
libcuproj:
name: libcuproj
path: libcuproj
desc: 'libcuproj is a C++ header-only library for GPU-accelerated geographic and geodetic coordinate transformation library which supports projecting coordinates between coordinate reference systems (CRSes), similar to PROJ.'
ghlink: https://github.com/rapidsai/cuspatial/tree/main/cpp/cuproj
cllink: https://github.com/rapidsai/cuspatial/blob/main/CHANGELOG.md # Shares a changelog with cuSpatial
versions:
# enable or disable links; 0 = disabled, 1 = enabled
legacy: 1
stable: 1
nightly: 0
# always use these specific versions for these specific paths, regardless
# of the current state of RAPIDS
version-overrides:
legacy: "25.02"
stable: "25.04"
libcuspatial:
name: libcuspatial
path: libcuspatial
desc: 'libcuspatial is a GPU-accelerated header-only C++ vector GIS library including binary predicates (DE-9IM), point-in-polygon, spatial join, distances, and trajectory analysis.'
ghlink: https://github.com/rapidsai/cuspatial
cllink: https://github.com/rapidsai/cuspatial/blob/main/CHANGELOG.md
versions:
# enable or disable links; 0 = disabled, 1 = enabled
legacy: 1
stable: 1
nightly: 0
# always use these specific versions for these specific paths, regardless
# of the current state of RAPIDS
version-overrides:
legacy: "25.02"
stable: "25.04"
12 changes: 11 additions & 1 deletion _includes/api-docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@
{% assign versions = api.versions | sort | where_exp: "item", "item[1] == 1" | join: "" | split: "1" | reverse %}
### {{ api.name }}
{{ api.desc }}
#### DOCS {% for version_name in versions %} {% if api.name == "libucxx" %} **[{{ version_name }} ({{ site.data.releases[version_name].ucxx_version }})](/api/{{ api.path }}/{{ version_name }})** {% else %} **[{{ version_name }} ({{ site.data.releases[version_name].version }})](/api/{{ api.path }}/{{ version_name }})** {% endif %} {% unless forloop.last %}|{% endunless %} {% endfor %}
#### DOCS {% for version_name in versions -%}
{%- if api.version-overrides -%}
**[{{ version_name }} ({{ api.version-overrides[version_name] }})](/api/{{ api.path }}/{{ version_name }})**
Comment on lines +12 to +13
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 lines are the only new logic. Basically, "if the entry in _data/docs.yml explicitly specifies versions, just use those directly instead of looking up versions in the data from _data/releases.json".

The rest of the diff here is just expanding this out to multiple lines with indentation, to make it easier to read. This doesn't introduce any visual artifacts like weird spacing or line breaks because I've also introduced a lot more whitespace stripping, via {%- and -%}.

For details on how that works in Liquid, see https://shopify.github.io/liquid/basics/whitespace/

{%- elsif api.name == "libucxx" -%}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check this? elsif seems unusual.

Suggested change
{%- elsif api.name == "libucxx" -%}
{%- elif api.name == "libucxx" -%}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was as surprised as you are to learn that in Liquid, it's literally spelled elsif 😅

https://shopify.github.io/liquid/tags/control-flow/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's... not Jinja. My bad.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha no problem, I only just learned that recently through this work.

**[{{ version_name }} ({{ site.data.releases[version_name].ucxx_version }})](/api/{{ api.path }}/{{ version_name }})**
{%- else -%}
**[{{ version_name }} ({{ site.data.releases[version_name].version }})](/api/{{ api.path }}/{{ version_name }})**
{%- endif -%}
{%- unless forloop.last %} | {% endunless -%}
{%- endfor %}

#### LINKS {% if api.cllink %} **[changelog]({{ api.cllink }}){:target="_blank"}** | {% endif %} **[github]({{ api.ghlink }}){:target="_blank"}**
{: .mb-7 }
{% endif %}
Expand Down
4 changes: 4 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ select the docs that fit your needs.
## RAPIDS Libraries

{% include api-docs.html data=site.data.docs.libs %}

## Inactive Projects

{% include api-docs.html data=site.data.docs.inactive-projects %}
46 changes: 41 additions & 5 deletions ci/download_from_s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,15 @@ aws_cp() {
}

# Downloads the RAPIDS libraries' documentation files from S3 and places them
# into the "_site/api" folder. The versions that should be copied are read from
# "_data/releases.json" and the libraries that should be copied are read from
# "_data/docs.yml".
# into the "_site/api" folder.
#
# The libraries that should be copied are read from "_data/docs.yml".
#
# The versions that should be copied are read from a mix of sources:
#
# - active projects: "_data/releases.json"
# - inactive projects: 'version-overrides' field in entries in "_data/docs.yml"
#
download_lib_docs() {
local DST PROJECT PROJECT_MAP \
SRC VERSION_MAP VERSION_NAME \
Expand All @@ -78,10 +84,11 @@ download_lib_docs() {
"nightly": { "version": .nightly.version, "ucxx_version": .nightly.ucxx_version }
}' _data/releases.json)

echo "--- processing active RAPIDS libraries ---"
PROJECT_MAP=$(yq '.apis + .libs' _data/docs.yml)

for VERSION_NAME in $(jq -r 'keys | .[]' <<< "$VERSION_MAP"); do
for PROJECT in $(yq -r 'keys | .[]' <<< "$PROJECT_MAP"); do
for PROJECT in $(yq -r 'keys | .[]' <<< "$PROJECT_MAP"); do
for VERSION_NAME in $(jq -r 'keys | .[]' <<< "$VERSION_MAP"); do
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching the order of these so that in the logs, all the updates are grouped by library. I personally think it's more common to look at these logs with a question like "which files were copied for cudf?" than "which files were copied for all of the nightlies?".

Happy to switch this back if reviewers disagree, I don't feel strongly.

VERSION_NUMBER=$(jq -r --arg vn "$VERSION_NAME" --arg pr "$PROJECT" '
if ($pr | contains("ucxx")) then
.[$vn].ucxx_version
Expand All @@ -97,7 +104,35 @@ download_lib_docs() {

SRC="s3://${DOCS_BUCKET}/${PROJECT}/html/${VERSION_NUMBER}/"
DST="$(yq -n 'env(GENERATED_DIRS)|.libs')/${PROJECT}/${VERSION_NUMBER}/"
aws_cp "${SRC}" "${DST}"
done
done

# inactive projects (no longer maintained, but we still host the docs)
echo "--- processing inactive projects ---"
INACTIVE_PROJECT_MAP=$(yq '.inactive-projects' _data/docs.yml)

for PROJECT in $(yq -r 'keys | .[]' <<< "$INACTIVE_PROJECT_MAP"); do
for VERSION_NAME in $(jq -r 'keys | .[]' <<< "$VERSION_MAP"); do
# do not attempt updates for any versions where the corresponding key is '0' in docs.yml
INACTIVE_PROJECT_MAP_JSON=$(yq -r -o json '.' <<< "$INACTIVE_PROJECT_MAP")
if [ "$(jq -r --arg pr "$PROJECT" --arg vn "$VERSION_NAME" '.[$pr].versions[$vn]' <<< "$INACTIVE_PROJECT_MAP_JSON")" == "0" ]; then
echo "Skipping: $PROJECT | $VERSION_NAME"
continue
fi

# get the version from the 'version-overrides' field in docs.yml, hard-coded there
# so it doesn't change from release-to-release for inactive projects
VERSION_NUMBER=$(
jq -r \
--arg vn "$VERSION_NAME" \
--arg pr "${PROJECT}" \
'.[$pr]."version-overrides"[$vn]' \
<<< "${INACTIVE_PROJECT_MAP_JSON}"
)

SRC="s3://${DOCS_BUCKET}/${PROJECT}/html/${VERSION_NUMBER}/"
DST="$(yq -n 'env(GENERATED_DIRS)|.libs')/${PROJECT}/${VERSION_NUMBER}/"
aws_cp "${SRC}" "${DST}"
done
done
Expand All @@ -108,6 +143,7 @@ download_lib_docs() {
download_deployment_docs() {
local DST SRC VERSION

echo "--- processing deployment docs ---"
for VERSION in nightly stable; do
SRC="s3://${DOCS_BUCKET}/deployment/html/${VERSION}/"
DST="$(yq -n 'env(GENERATED_DIRS)|.deployment')/${VERSION}/"
Expand Down