Skip to content
Open
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
2 changes: 1 addition & 1 deletion documentation/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You may also add new `toctree` elements and new `index.md` file as needed.

### Inline images
Images can be referenced with their URL in markdown, but this can delay their presentation in the page.
Another option is to store the images in the [RTK collection](https://data.kitware.com/?#collection/5a7706878d777f0649e04776/folder/5eaeaa2f9014a6d84e47adb3) on data.kitware.com and to push their content file (SHA512) to the RTK source tree.
Another option is to store the images in the [RTK collection](https://data.kitware.com/?#collection/5a7706878d777f0649e04776/folder/5eaeaa2f9014a6d84e47adb3) on data.kitware.com and to push their content file (CID) to the RTK source tree.
Such images will be automatically downloaded when building the documentation and served as static files when navigating.
To add a new image:
1. Go to the [RTKDocumentationData](https://data.kitware.com/?#collection/5a7706878d777f0649e04776/folder/5eaeaa2f9014a6d84e47adb3) folder on data.kitware.com
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/copy_and_fetch_sphinx_doc_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ endforeach()
if(POLICY CMP0009)
cmake_policy(SET CMP0009 NEW)
endif()
set(link_content sha512)
set(link_content cid)
file(GLOB_RECURSE content_files "${RTK_DOC_OUTPUT_DIR}/*${link_content}")
foreach(content_file ${content_files})
file(
Expand Down
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ function(rtk_add_cuda_test testname testfile)
endif()
endfunction()

# Use sha512 algorithm to generate content link
# Use cid algorithm to generate content link
if(NOT ITK_SOURCE_DIR)
set(ExternalData_LINK_CONTENT SHA512)
set(ExternalData_LINK_CONTENT CID)
endif()

rtk_add_test(rtkFDKTest rtkfdktest.cxx)
Expand Down
8 changes: 4 additions & 4 deletions utilities/UploadTestData.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _uploadContentLinkItem(
:param dryRun: Do not actually upload any content.
"""
test_folder = os.path.normpath(test_folder)
name = os.path.splitext(content_link)[0] # remove .sha512 extension
name = os.path.splitext(content_link)[0] # remove .cid extension

if dryRun:
# create a dryRun placeholder
Expand All @@ -71,11 +71,11 @@ def _uploadContentLinkItem(

content_link = os.path.join(workDir, content_link)

if os.path.isfile(content_link) and fnmatch.fnmatch(content_link, "*.sha512"):
if os.path.isfile(content_link) and fnmatch.fnmatch(content_link, "*.cid"):
with open(content_link) as fp:
hash_value = fp.readline().strip()

content_file = os.path.join(workDir, ".ExternalData_SHA512_" + hash_value)
content_file = os.path.join(workDir, ".ExternalData_CID_" + hash_value)
if os.path.isfile(content_file):
print("\n Found content file: " + content_file)

Expand Down Expand Up @@ -113,7 +113,7 @@ def main():
parser.add_argument(
"--content-link",
required=True,
help="name of the content-link .sha512 file. (eg: Test.png.sha512)",
help="name of the content-link .cid file. (eg: Test.png.cid)",
)
parser.add_argument(
"--test-folder",
Expand Down
Loading