Skip to content

Commit

Permalink
Docs pruning (#5628)
Browse files Browse the repository at this point in the history
* remove unused readthedocs template

* Doxygen API Docs, header and footer, remove depreciated config

* remove old vis

* remove homepage windowing js

* remove feed2js

* remove progtest docs

* remove isishistory and 'documents' structure

* remove old vis (part 2)

* remove unused toc and more unused javascripts

* remove one more utility js reference

* moved one-line files to inline in other files

* menu arrow fix for api docs

* move moon surface banner to be with rest of images

* reorganized images

* use menupath variable in more places

* remove unused blackborderimage css

* js.map files

* favicon

* css category fix

* css category fix part 2

* css category fix part 3
  • Loading branch information
jrcain-usgs authored Oct 8, 2024
1 parent 6e57958 commit aa6a1d1
Show file tree
Hide file tree
Showing 122 changed files with 811 additions and 8,771 deletions.
18 changes: 0 additions & 18 deletions .readthedocs.yaml

This file was deleted.

94 changes: 5 additions & 89 deletions isis/cmake/BuildDocs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,93 +73,14 @@ function(build_upper_level)
# Create the main documentaion page. This is located in the version directory
execute_process(COMMAND ${XALAN} ${XALAN_VALIDATE_OPTION} ${XALAN_PARAM_OPTION} menuPath \"\" ${XALAN_OUTFILE_OPTION} ${docInstallFolder}/${docVersion}/index.html ${XALAN_INFILE_OPTION} ${docBuildFolder}/build/homepage.xml ${XALAN_XSL_OPTION} ${docBuildFolder}/build/main.xsl)

# Copy Favicon
file(COPY ${docBuildFolder}/favicon.ico DESTINATION ${docInstallFolder}/${docVersion}/favicon.ico)

endfunction(build_upper_level)





# Build src/docsys/documents folder.
function(build_documents_folder)

message("Building documents folder...")
message(" Building table of contents XML...")

# Create RealeaseNotes.xml, ApiChanges.xml and ParameterChanges.xml if need-be
if(EXISTS "${docBuildFolder}/documents/ReleaseNotes/ReleaseNotesList.xml")
execute_process(COMMAND ${XALAN} ${XALAN_PARAM_OPTION} dirParam \"ReleaseNotes\" ${XALAN_INFILE_OPTION} ${docBuildFolder}/documents/ReleaseNotes/ReleaseNotesList.xml ${XALAN_XSL_OPTION} ${docBuildFolder}/build/ReleaseNotes.xsl OUTPUT_FILE ${docBuildFolder}/documents/ReleaseNotes/ReleaseNotes.xml)
execute_process(COMMAND ${XALAN} ${XALAN_PARAM_OPTION} dirParam \"ParameterChanges\" ${XALAN_INFILE_OPTION} ${docBuildFolder}/documents/ReleaseNotes/ReleaseNotesList.xml ${XALAN_XSL_OPTION} ${docBuildFolder}/build/ParameterChanges.xsl OUTPUT_FILE ${docBuildFolder}/documents/ParameterChanges/ParameterChanges.xml)
execute_process(COMMAND ${XALAN} ${XALAN_PARAM_OPTION} dirParam \"ApiChanges\" ${XALAN_INFILE_OPTION} ${docBuildFolder}/documents/ReleaseNotes/ReleaseNotesList.xml ${XALAN_XSL_OPTION} ${docBuildFolder}/build/ApiChanges.xsl OUTPUT_FILE ${docBuildFolder}/documents/ApiChanges/ApiChanges.xml)
else()
# Confirm that empty directories are not going to be traversed in loops coming up
message(" ReleaseNotesList.xml does not exist. Removing ReleaseNotes/ ParameterChanges/ and ApiChanges/ directories...")
execute_process(COMMAND rm -rf ${docBuildFolder}/documents/ReleaseNotes ${docBuildFolder}/documents/ParameterChanges ${docBuildFolder}/documents/ApiChanges)
endif()

# Get list of folders of interest
get_subdirectory_list(${docBuildFolder}/documents docFolders)

# Build doctoc.xml, the documents table of contents file.
set(doctocPath ${docBuildFolder}/build/doctoc.xml)
file(REMOVE ${doctocPath})
cat(${docBuildFolder}/build/doctoc_header.xml ${doctocPath})
foreach(f ${docFolders})

# Each folder in documents gets a section added to doctoc
get_filename_component(docName ${f} NAME_WE)

execute_process(COMMAND ${XALAN} ${XALAN_PARAM_OPTION} dirParam \"${docName}\" ${XALAN_INFILE_OPTION} ${f}/${docName}.xml ${XALAN_XSL_OPTION} ${docBuildFolder}/build/IsisDocumentTOCbuild.xsl OUTPUT_VARIABLE result)
file(APPEND ${doctocPath} ${result})

endforeach()
cat(${docBuildFolder}/build/doctoc_footer.xml ${doctocPath})

# Write out a modified .xsl file with the correct location of the Xalan executable.
set(modDocBuildXslFile ${docBuildFolder}/build/IsisInlineDocumentBuild_mod.xsl)
file(READ ${PROJECT_SOURCE_DIR}/scripts/IsisInlineDocumentBuild_mod.xsl xslContents)
string(REPLACE XALAN_BIN_LOCATION ${XALAN} xslContents "${xslContents}")
file(WRITE ${modDocBuildXslFile} "${xslContents}")

# Build individual documents folders
message(" Building individual documents...")
file(MAKE_DIRECTORY ${docInstallFolder}/${docVersion}/documents)
foreach(f ${docFolders})

message("Building documents folder: ${f}")

# Handle paths for this folder
get_filename_component(docName ${f} NAME_WE)
set(thisOutputFolder ${docInstallFolder}/${docVersion}/documents/${docName})
file(MAKE_DIRECTORY ${thisOutputFolder})

# Use Xalan to generate an intermediate makefile, then execute that makefile
# to generate the output documentation files.

set(xalanCommand ${XALAN} ${XALAN_PARAM_OPTION} menuPath "../../" ${XALAN_PARAM_OPTION} dirParam "'${docName}'" ${XALAN_OUTFILE_OPTION} ${f}/Makefile_temp ${XALAN_INFILE_OPTION} ${docName}.xml ${XALAN_XSL_OPTION} ${modDocBuildXslFile})
execute_process(COMMAND ${xalanCommand} WORKING_DIRECTORY ${f})

execute_process(COMMAND make -f Makefile_temp docs WORKING_DIRECTORY ${f})
execute_process(COMMAND rm -f ${f}/Makefile_temp) # Clean up

# Copy all generated html files and any assets to the install folder
file(GLOB htmlFiles ${f}/*.html)
file(COPY ${htmlFiles} DESTINATION ${thisOutputFolder})
if(EXISTS "${f}/assets")
copy_folder(${f}/assets ${thisOutputFolder}/assets)
endif()
if(EXISTS "${f}/images")
copy_folder(${f}/images ${thisOutputFolder}/images)
endif()

endforeach()

endfunction(build_documents_folder)





# Supporting files should already be in /src/docsys/Application
function(build_application_docs)

Expand Down Expand Up @@ -206,7 +127,7 @@ function(build_application_docs)
# Set up the file
set(appTocPath "${CMAKE_INSTALL_PREFIX}/bin/xml/applicationTOC.xml")
file(REMOVE ${appTocPath})
cat(${docBuildFolder}/Application/build/toc_header.xml ${appTocPath})
file(APPEND ${appTocPath} "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><tableofcontents>")
get_subdirectory_list(${appDataFolder} moduleFolders)

# Loop through module folders
Expand All @@ -225,8 +146,8 @@ function(build_application_docs)
endforeach()
endforeach()

# Append the footer to complete the TOC file!
cat(${docBuildFolder}/Application/build/toc_footer.xml ${appTocPath})
# Append closing tag to complete the TOC file
file(APPEND ${appTocPath} "</tableofcontents>")

endfunction(build_application_docs)

Expand Down Expand Up @@ -297,7 +218,6 @@ function(build_object_conf)
file(APPEND ${appsConf} "INPUT = ${PROJECT_SOURCE_DIR}/src/ ${objConfDir}/isisDoxyDefs.doxydef\n")
file(APPEND ${appsConf} "HTML_HEADER = ${objConfDir}/IsisObjectHeader.html\n")
file(APPEND ${appsConf} "HTML_FOOTER = ${objConfDir}/IsisObjectFooter.html\n")
file(APPEND ${appsConf} "PROJECT_LOGO = ${docBuildFolder}/assets/icons/USGS_logo55h.png\n")
file(APPEND ${appsConf} "HTML_OUTPUT = apps\n")

if(NOT ${DOT_PATH} STREQUAL "")
Expand All @@ -314,7 +234,6 @@ function(build_object_conf)
file(APPEND ${programmerConf} "INPUT = ${PROJECT_SOURCE_DIR}/src/ ${objConfDir}/isisDoxyDefs.doxydef\n")
file(APPEND ${programmerConf} "HTML_HEADER = ${objConfDir}/IsisObjectHeader.html\n")
file(APPEND ${programmerConf} "HTML_FOOTER = ${objConfDir}/IsisObjectFooter.html\n")
file(APPEND ${programmerConf} "PROJECT_LOGO = ${docBuildFolder}/assets/icons/USGS_logo55h.png\n")
file(APPEND ${programmerConf} "HTML_OUTPUT = Programmer\n")
file(APPEND ${programmerConf} "IMAGE_PATH = \n")

Expand Down Expand Up @@ -348,7 +267,6 @@ function(build_object_conf)
file(APPEND ${developerConf} "INPUT = ${PROJECT_SOURCE_DIR}/src/ ${objConfDir}/isisDoxyDefs.doxydef\n")
file(APPEND ${developerConf} "HTML_HEADER = ${objConfDir}/IsisObjectHeader.html\n")
file(APPEND ${developerConf} "HTML_FOOTER = ${objConfDir}/IsisObjectFooter.html\n")
file(APPEND ${developerConf} "PROJECT_LOGO = ${docBuildFolder}/assets/icons/USGS_logo55h.png\n")
file(APPEND ${developerConf} "HTML_OUTPUT = Developer\n")
file(APPEND ${developerConf} "IMAGE_PATH = \n")
string(FIND "${MODE}" "LOUD" pos)
Expand Down Expand Up @@ -454,8 +372,6 @@ function(build_docs)
message("Building upper level directories...")
build_upper_level()

build_documents_folder()

message("Building application docs...")
build_application_docs()

Expand Down
6 changes: 0 additions & 6 deletions isis/make/isismake.apps
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ $(BINS): $(UIHEADERS) $(QTRESOURCEFILES) protos $(OBJS)
export PATH="$(CODE_COVERAGE_PATH_DIR):$$PATH"; \
$(CXX) $(ALLINCDIRS) $(ISISCPPFLAGS) $(ISIS_PROTOBUF_FLAGS) -c -o $@ $?

.xml.html :
$(XALAN) $(XALAN_VALIDATE_OPTION) $(XALAN_OUTFILE_OPTION) $@ $(XALAN_INFILE_OPTION) $? $(XALAN_XSL_OPTION) $(ISISROOT)/src/docsys/Application/presentation/ProgTester/IsisApplicationDocStyle.xsl

protos: $(PROTOS:%.proto=%.pb.h) $(PROTOS:%.proto=%.pb.cc)

%.pb.cc %.pb.h: %.proto
Expand Down Expand Up @@ -170,9 +167,6 @@ install: app
fi


validxml:
$(XALAN) $(XALAN_VALIDATE_OPTION) $(XALAN_OUTFILE_OPTION) /dev/null $(XALAN_INFILE_OPTION) $(BINS).xml $(XALAN_XSL_OPTION) $(ISISROOT)/src/docsys/Application/presentation/ProgTester/IsisApplicationDocStyle.xsl;

docs:
mkdir -p $(ISISROOT)/src/docsys/Application/data/`basename $(CURDIR)`
cp -p `basename $(CURDIR)`.xml $(ISISROOT)/src/docsys/Application/data/`basename $(CURDIR)`
Expand Down
3 changes: 0 additions & 3 deletions isis/make/isismake.objs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ help:
echo "make plugin : Builds a plugin object if applicable"
echo "make install : Calls the make target and copies the object and"
echo " plugin to $ISISROOT/..."
echo "make html : Builds the html page for the object"
echo "make clean : Removes the application, *.html and *.o files."
echo " Also cleans the test directories"
echo "make sanitize : Calls the clean target then removes tttt* junk.*"
Expand All @@ -187,8 +186,6 @@ help:
echo "make protos : Builds the object of google protocol buffer(*.proto) files"

TEMPDIR:=${CURDIR}
html: force
(cd $(ISISROOT)/src/docsys/Object/ ; make CURDIR=$(TEMPDIR) doProgTest )

clean: localclean
$(RM) $(OBJS) $(PROTOSGEN) $(MOCGEN) unitTest.o unitTest print.prt \
Expand Down
Loading

0 comments on commit aa6a1d1

Please sign in to comment.