Last active
February 18, 2020 08:34
-
-
Save eseiler/432757ad175f9e06062667d7bc412c05 to your computer and use it in GitHub Desktop.
Build 3.0.1 docs with some cherry picked infrastructure commits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 5ba9423bc52b859ff91f779e4c86ac64f3450acd Mon Sep 17 00:00:00 2001 | |
| From: Enrico Seiler <[email protected]> | |
| Date: Tue, 4 Feb 2020 07:57:26 +0100 | |
| Subject: [PATCH 1/1] [DOC] Build updated 3.0.1 docs with doxygen-1.8.16 | |
| --- | |
| include/seqan3/alphabet/all.hpp | 22 ++++----- | |
| test/documentation/seqan3.css | 24 +++++++--- | |
| test/documentation/seqan3_doxygen_cfg.in | 3 ++ | |
| test/documentation/seqan3_footer.html | 23 +++++++++ | |
| test/documentation/version.js | 59 ++++++++++++++++++++++++ | |
| test/documentation/version.php | 32 +++++++++++++ | |
| 6 files changed, 146 insertions(+), 17 deletions(-) | |
| create mode 100644 test/documentation/seqan3_footer.html | |
| create mode 100644 test/documentation/version.js | |
| create mode 100644 test/documentation/version.php | |
| diff --git a/include/seqan3/alphabet/all.hpp b/include/seqan3/alphabet/all.hpp | |
| index e66ad3e4..0670b098 100644 | |
| --- a/include/seqan3/alphabet/all.hpp | |
| +++ b/include/seqan3/alphabet/all.hpp | |
| @@ -123,17 +123,17 @@ | |
| * seqan3::writable_alphabet whenever the values might be changed. | |
| * Semi-alphabets are less useful in application code. | |
| * | |
| - * | | seqan3::semialphabet | seqan3::writable_semialphabet | seqan3::alphabet | seqan3::writable_alphabet | Aux | | |
| - * |----------------------------------|:--------------------:|:----------------------------:|:----------------:|:------------------------:|:---:| | |
| - * | seqan3::alphabet_size | ✅ | ✅ | ✅ | ✅ | | | |
| - * | seqan3::to_rank | ✅ | ✅ | ✅ | ✅ | | | |
| - * | seqan3::alphabet_rank_t | ✅ | ✅ | ✅ | ✅ | 🔗 | | |
| - * | seqan3::assign_rank_to | | ✅ | | ✅ | | | |
| - * | seqan3::to_char | | | ✅ | ✅ | | | |
| - * | seqan3::alphabet_char_t | | | ✅ | ✅ | 🔗 | | |
| - * | seqan3::assign_char_to | | | | ✅ | | | |
| - * | seqan3::char_is_valid_for | | | | ✅ | | | |
| - * | seqan3::assign_char_strictly_to | | | | ✅ | 🔗 | | |
| + * | | [semialphabet](@ref seqan3::semialphabet) | [writable_semialphabet](@ref seqan3::writable_semialphabet) | [alphabet](@ref seqan3::alphabet) | [writable_alphabet](@ref seqan3::writable_alphabet) | Aux | | |
| + * |-----------------------------------------------------------:|:------------------------------------:|:------------------------------------------------------:|:----------------------------:|:----------------------------------------------:|:---:| | |
| + * | [alphabet_size](@ref seqan3::alphabet_size) | ✅ | ✅ | ✅ | ✅ | | | |
| + * | [to_rank](@ref seqan3::to_rank) | ✅ | ✅ | ✅ | ✅ | | | |
| + * | [alphabet_rank_t](@ref seqan3::alphabet_rank_t) | ✅ | ✅ | ✅ | ✅ | 🔗 | | |
| + * | [assign_rank_to](@ref seqan3::assign_rank_to) | | ✅ | | ✅ | | | |
| + * | [to_char](@ref seqan3::to_char) | | | ✅ | ✅ | | | |
| + * | [alphabet_char_t](@ref seqan3::alphabet_char_t) | | | ✅ | ✅ | 🔗 | | |
| + * | [assign_char_to](@ref seqan3::assign_char_to) | | | | ✅ | | | |
| + * | [char_is_valid_for](@ref seqan3::char_is_valid_for) | | | | ✅ | | | |
| + * | [assign_char_strictly_to](@ref seqan3::assign_char_strictly_to) | | | | ✅ | 🔗 | | |
| * | |
| * The above table shows all alphabet concepts and related functions and type traits. | |
| * The entities marked as "auxiliary" provide shortcuts to the other "essential" entitities. | |
| diff --git a/test/documentation/seqan3.css b/test/documentation/seqan3.css | |
| index 64aaef7e..b517af60 100644 | |
| --- a/test/documentation/seqan3.css | |
| +++ b/test/documentation/seqan3.css | |
| @@ -26,6 +26,17 @@ h1 { | |
| table { | |
| font-size: 12pt; | |
| font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; | |
| + table-layout: auto; | |
| + width: 100%; | |
| +} | |
| + | |
| +.memItemLeft, .memTemplItemLeft { | |
| + white-space: normal; | |
| + width: 30%; | |
| +} | |
| + | |
| +.memItemRight { | |
| + width: 70%; | |
| } | |
| div.contents { | |
| @@ -45,6 +56,7 @@ div.contents { | |
| #projectlogo { | |
| padding: 10px; | |
| + width: 150px; | |
| } | |
| hr.footer { | |
| @@ -109,30 +121,30 @@ hr { | |
| } | |
| /* markdown tables */ | |
| -table.doxtable { | |
| +table.markdownTable { | |
| empty-cells: show; | |
| border: 1px solid #CBCBCB; | |
| } | |
| -table.doxtable caption { | |
| +table.markdownTable caption { | |
| color: #000; | |
| font: italic 85%/1 arial,sans-serif; | |
| padding: 1em 0; | |
| text-align: center; | |
| } | |
| -table.doxtable td:first-child, table.doxtable th:first-child { | |
| +table.markdownTable td:first-child, table.markdownTable th:first-child { | |
| border-left-width: 0; | |
| } | |
| -table.doxtable thead { | |
| +table.markdownTable thead { | |
| background-color: #E0E0E0; | |
| color: #000; | |
| text-align: left; | |
| vertical-align: bottom; | |
| } | |
| -table.doxtable td { | |
| +table.markdownTable td { | |
| background-color: transparent; | |
| border: 0; | |
| border-bottom: 2px solid #CBCBCB; | |
| @@ -143,7 +155,7 @@ table.doxtable td { | |
| padding: .5em 1em; | |
| } | |
| -table.doxtable th { | |
| +table.markdownTable th { | |
| border: 0; | |
| border-width: 0 1 0 0px; | |
| font-size: inherit; | |
| diff --git a/test/documentation/seqan3_doxygen_cfg.in b/test/documentation/seqan3_doxygen_cfg.in | |
| index 69b51c6f..f094d791 100644 | |
| --- a/test/documentation/seqan3_doxygen_cfg.in | |
| +++ b/test/documentation/seqan3_doxygen_cfg.in | |
| @@ -41,6 +41,7 @@ SKIP_FUNCTION_MACROS = NO | |
| SORT_BRIEF_DOCS = YES | |
| TOC_INCLUDE_HEADINGS = 2 | |
| HTML_EXTRA_STYLESHEET = ${SEQAN3_DOXYGEN_SOURCE_DIR}/test/documentation/seqan3.css | |
| +HTML_FOOTER = ${SEQAN3_DOXYGEN_SOURCE_DIR}/test/documentation/seqan3_footer.html | |
| INPUT_ENCODING = UTF-8 | |
| PREDEFINED = "CEREAL_SERIALIZE_FUNCTION_NAME=serialize" \ | |
| @@ -93,3 +94,5 @@ ALIASES += header_file{1}="\htmlonly<b>Header File</b><br><div style='text-inden | |
| ### Extra files that we can link to | |
| HTML_EXTRA_FILES = ${SEQAN3_DOXYGEN_SOURCE_DIR}/doc/tutorial/alignment_file/example.sam | |
| +HTML_EXTRA_FILES += ${SEQAN3_DOXYGEN_SOURCE_DIR}/test/documentation/version.js | |
| +HTML_EXTRA_FILES += ${SEQAN3_DOXYGEN_SOURCE_DIR}/test/documentation/version.php | |
| diff --git a/test/documentation/seqan3_footer.html b/test/documentation/seqan3_footer.html | |
| new file mode 100644 | |
| index 00000000..55cce088 | |
| --- /dev/null | |
| +++ b/test/documentation/seqan3_footer.html | |
| @@ -0,0 +1,23 @@ | |
| +<!-- HTML footer for doxygen 1.8.16--> | |
| +<!-- start footer part --> | |
| +<!--BEGIN GENERATE_TREEVIEW--> | |
| +<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> | |
| + <ul> | |
| + <div id="list_bottom_right" style="text-align:right; float:left; color:black; padding: 0px 0px 0px 10px"></div> | |
| + <script type="text/javascript" charset="utf-8" src="version.js"></script> | |
| + $navpath | |
| + <li class="footer">$generatedby | |
| + <a href="http://www.doxygen.org/index.html"> | |
| + <img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion </li> | |
| + </ul> | |
| +</div> | |
| +<!--END GENERATE_TREEVIEW--> | |
| +<!--BEGIN !GENERATE_TREEVIEW--> | |
| +<hr class="footer"/><address class="footer"><small> | |
| +$generatedby  <a href="http://www.doxygen.org/index.html"> | |
| +<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/> | |
| +</a> $doxygenversion | |
| +</small></address> | |
| +<!--END !GENERATE_TREEVIEW--> | |
| +</body> | |
| +</html> | |
| diff --git a/test/documentation/version.js b/test/documentation/version.js | |
| new file mode 100644 | |
| index 00000000..b216b0ea | |
| --- /dev/null | |
| +++ b/test/documentation/version.js | |
| @@ -0,0 +1,59 @@ | |
| +/* Jongkyu Kim ([email protected]), 2016.01.12 | |
| + Adaptations by Enrico Seiler ([email protected]), 2020 */ | |
| + | |
| +// Get the current script path https://stackoverflow.com/a/710996 | |
| +var scripts = document.getElementsByTagName('script'); | |
| +var lastScript = scripts[scripts.length-1]; | |
| +var scriptName = lastScript.src; | |
| +// Remove the script name (version.js) from the path | |
| +var split = scriptName.split("/"); | |
| +DOCUMENT_URL = split.slice(0, split.length - 2).join("/") + "/"; | |
| + | |
| +VERSION_JSON_URL = "version.php"; | |
| + | |
| +function changeVersion(formid) | |
| +{ | |
| + var frm = document.getElementById(formid); | |
| + window.top.location.href = DOCUMENT_URL + frm.options[frm.selectedIndex].value; | |
| +} | |
| + | |
| +function addVersionSelection(arr) | |
| +{ | |
| + // add HTMLs | |
| + var version_select = document.createElement("select"); | |
| + var version_div = document.createElement("div"); | |
| + | |
| + version_select.setAttribute("id","version_select"); | |
| + version_div.setAttribute("style","vertical-align:middle; text-align:right;"); | |
| + version_div.appendChild(document.createTextNode("Version: ")); | |
| + version_div.appendChild(version_select); | |
| + document.getElementById("list_bottom_right").appendChild(version_div); | |
| + | |
| + version_select.addEventListener("change", function(){changeVersion(this.id);}, false); | |
| + | |
| + // current selection is.. | |
| + cur_sel = window.location.pathname.split("/")[2]; | |
| + | |
| + for(i=0; i < arr.length; ++i) | |
| + { | |
| + var op = document.createElement("option"); | |
| + op.value = arr[i]; | |
| + op.text = arr[i]; | |
| + op.selected = ( arr[i] == cur_sel ) ? true : false; | |
| + version_select.add(op); | |
| + } | |
| +} | |
| + | |
| +// get JSON data & add selection form | |
| +var req = new XMLHttpRequest(); | |
| +req.open("GET", VERSION_JSON_URL, true); | |
| +req.setRequestHeader("Content-type", "application/json"); | |
| +req.onreadystatechange = function() | |
| +{ | |
| + if( req.readyState == 4 && req.status == 200 ) | |
| + { | |
| + var response = JSON.parse(req.responseText); | |
| + addVersionSelection(response); // add selection form | |
| + } | |
| +} | |
| +req.send(); | |
| diff --git a/test/documentation/version.php b/test/documentation/version.php | |
| new file mode 100644 | |
| index 00000000..966f3e37 | |
| --- /dev/null | |
| +++ b/test/documentation/version.php | |
| @@ -0,0 +1,32 @@ | |
| +<?php | |
| +/* Jongkyu Kim([email protected]), 2016.01.12 | |
| + Adaptations by Enrico Seiler ([email protected]), 2020 */ | |
| +$LOCALDIR = "../"; | |
| + | |
| +$files = scandir($LOCALDIR, SCANDIR_SORT_DESCENDING); | |
| +$list = array(); | |
| +foreach( $files as $file ) | |
| +{ | |
| + if( strpos($file, "master_") !== FALSE ) // Skip directories starting with "master_" | |
| + continue; | |
| + if( $file == "master") // Skip SeqAn2 "master" documentation | |
| + continue; | |
| + if( $file == "index.html") // Skip seqan/index.html | |
| + continue; | |
| + if( strpos($file, "develop") !== FALSE ) // Skip SeqAn2 "develop" and "develop_" documentation | |
| + continue; | |
| + if( $file[0] == "1") // Skip SeqAn1 versioned documentation | |
| + continue; | |
| + if( $file[0] == "2") // Skip SeqAn2 versioned documentation | |
| + continue; | |
| + if( strpos($file, "learning-resources") !== FALSE ) // Skip learning resources | |
| + continue; | |
| + if( $file[0] == "." ) // Skip current directory | |
| + continue; | |
| + | |
| + array_push($list, $file); | |
| +} | |
| + | |
| +header("Content-Type: application/json"); | |
| +echo json_encode($list, JSON_PRETTY_PRINT); | |
| +?> | |
| -- | |
| 2.21.1 (Apple Git-122.3) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment