From 186b5bf6efacbaa032b4ad133e4c1d63e1380218 Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Thu, 15 Aug 2024 13:59:01 -0400 Subject: [PATCH] Remove files redundant with workflow repo, update doxy fil Signed-off-by: Sara Damiano --- .../beautify_arduino_lint_log.py | 42 -------- .../build-install-doxygen.sh | 61 ----------- docs/Doxyfile | 7 +- docs/copyFunctions.py | 101 ------------------ docs/mcss-Doxyfile | 8 +- 5 files changed, 10 insertions(+), 209 deletions(-) delete mode 100644 continuous_integration/beautify_arduino_lint_log.py delete mode 100644 continuous_integration/build-install-doxygen.sh delete mode 100644 docs/copyFunctions.py diff --git a/continuous_integration/beautify_arduino_lint_log.py b/continuous_integration/beautify_arduino_lint_log.py deleted file mode 100644 index 726f573bc..000000000 --- a/continuous_integration/beautify_arduino_lint_log.py +++ /dev/null @@ -1,42 +0,0 @@ -#%% -import json -import os - -in_json = open(os.environ["GITHUB_WORKSPACE"] + "/arduino_lint.json") -arduino_lint_results = json.load(in_json) - -out_md = open(os.environ["GITHUB_WORKSPACE"] + "/arduino_lint.md", "w+") - -out_md.write("## Results of testing examples\n\n") -out_md.write(" | Path | Project Type | Result | Problems | \n") -out_md.write(" | --- | --- | --- | --- | \n") -for project in arduino_lint_results["projects"]: - fail_list = "" - out_md.write( - " | {} | {} | {} | {} | \n".format( - project["path"] - .replace(os.environ.get("GITHUB_WORKSPACE"), "") - .replace("examples\\", ""), - project["projectType"], - ":white_check_mark:" if project["summary"]["pass"] else ":x:", - fail_list, - ) - ) - -#%% diff --git a/continuous_integration/build-install-doxygen.sh b/continuous_integration/build-install-doxygen.sh deleted file mode 100644 index f67d8cd51..000000000 --- a/continuous_integration/build-install-doxygen.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# Makes the bash script print out every command before it is executed, except echo -trap '[[ $BASH_COMMAND != echo* ]] && echo $BASH_COMMAND' DEBUG - -# Exit with nonzero exit code if anything fails -set -e - -# install all the dependencies for make for Doxygen and m.css -sudo apt-get update -sudo apt-get -y install build-essential -sudo apt-get -y install flex -sudo apt-get -y install bison - -# install TeX Live for LaTeX formula rendering -sudo apt-get -y install texlive-base -sudo apt-get -y install texlive-latex-extra -sudo apt-get -y install texlive-fonts-extra -sudo apt-get -y install texlive-fonts-recommended - -echo "\e[32m\n\n\nCurrent TeX version...\e[0m" -tex --version -echo "\n\n\n" - -# install Graphviz for DOT class diagrams -sudo apt-get -y install graphviz - -echo "\e[32m\n\n\nCurrent graphviz version...\e[0m" -dot -v -echo "\n\n\n" - -cd $GITHUB_WORKSPACE - -if [ ! -f $GITHUB_WORKSPACE/doxygen-src/build/bin/doxygen ]; then - - # Build instructions from: https://www.stack.nl/~dimitri/doxygen/download.html - echo "\e[32mCloning doxygen repository...\e[0m" - git clone https://github.com/doxygen/doxygen.git doxygen-src --branch $DOXYGEN_VERSION --depth 1 - - cd doxygen-src - - echo "\e[32mCreate build folder...\e[0m" - mkdir build - cd build - - echo "\e[32mMake...\e[0m" - cmake -G "Unix Makefiles" .. - make - echo "\e[32mDone building doxygen.\e[0m" - echo "\e[32mdoxygen path: \e[0m" $(pwd) -fi - -echo "\e[32m\n\n\nCurrent Doxygen version...\e[0m" -$GITHUB_WORKSPACE/doxygen-src/build/bin/doxygen -v -echo "\n\n\n" - -# echo "\e[32mMove Doxygen to working directory" -# cp $GITHUB_WORKSPACE/doxygen-src/build/bin/* $GITHUB_WORKSPACE/code_docs/ModularSensors -# #make install - -cd $GITHUB_WORKSPACE/code_docs/ModularSensors diff --git a/docs/Doxyfile b/docs/Doxyfile index cd9b07517..f1c5914d1 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -74,7 +74,7 @@ PROJECT_ICON = enviroDIY_Favicon.png # entered, it will be relative to the location where Doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = ../../ModularSensorsDoxygen +OUTPUT_DIRECTORY = ../../ModularSensors_Doxygen # If the CREATE_SUBDIRS tag is set to YES then Doxygen will create up to 4096 # sub-directories (in 2 levels) under the output directory of each output format @@ -1064,7 +1064,8 @@ EXCLUDE = ../src/ReadMe.md \ ../src/sensors/table.md \ ../lib \ ../boards \ - ../variants + ../variants \ + ../continuous_integration_artifacts # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -1347,7 +1348,7 @@ IGNORE_PREFIX = # If the GENERATE_HTML tag is set to YES, Doxygen will generate HTML output # The default value is: YES. -GENERATE_HTML = NO +GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of diff --git a/docs/copyFunctions.py b/docs/copyFunctions.py deleted file mode 100644 index 3e0c64f56..000000000 --- a/docs/copyFunctions.py +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env python -import fileinput -import re -import os -import glob -import xml.etree.ElementTree as ET -from html.parser import HTMLParser -from bs4 import BeautifulSoup - -fileDir = os.path.dirname(os.path.realpath("__file__")) -# print("Program Directory: {}".format(fileDir)) -relative_dir = "../../ModularSensorsDoxygen/m.css/" -abs_file_path = os.path.join(fileDir, relative_dir) -abs_file_path = os.path.abspath(os.path.realpath(abs_file_path)) -# print("XML Directory: {}".format(fileDir)) - -all_files = [ - f - for f in os.listdir(abs_file_path) - if os.path.isfile(os.path.join(abs_file_path, f)) - and f.endswith(".html") - and not f.endswith("fixed") -] - - -def get_section_to_paste(match: re.Match) -> str: - source_file = match.group("copy_source_file") - # print(source_file) - source_section = match.group("copy_section_id") - # print(source_section) - with open(os.path.join(abs_file_path, source_file), encoding="utf8") as fp: - soup = BeautifulSoup(fp, "html.parser") - details = soup.find(id=source_section) - # print("Details:", details, "\n\n") - link = details.find("a", class_="m-doc-self") - # print("Link:", link, "\n\n") - link["href"] = source_file + "#" + source_section - # print("Link:", link, "\n\n") - # print("Details:", details, "\n\n") - return str(details) - - # tree = ET.parse() - # root = tree.getroot() - - # for definition in root.iter("compounddef"): - # # print(definition.attrib) - # compound_id = definition.attrib["id"] - # # print(compound_id) - # # print("---") - - -# {{ AOSongAM2315_Humidity::AOSongAM2315_Humidity }} -files_to_copy_to = [] -for filename in all_files: - abs_in = os.path.join(abs_file_path, filename) - abs_out = os.path.join(abs_file_path, filename + "_fixed") - copy_paste_needed = False - # with open(os.path.join(abs_file_path, filename)) as fp: - # soup = BeautifulSoup(fp, "html.parser") - # for find in soup.find_all(string=[re.compile("\{\{")]): - # print(find.find_parent("p").a.get("href")) - - with open(abs_in, "r", encoding="utf8") as in_file: # open in readonly mode - lines = in_file.readlines() - i = 0 - new_lines = [] - for line in lines: - i += 1 - new_line = line - match = re.search( - r'{{ @endxmlonly" \ "m_enum_values_as_keywords=@xmlonly@endxmlonly" \ "m_since{2}=@since @m_class{m-label m-success m-flat} @ref changelog-\1-\2 \"since v\1.\2\"" \ - "m_deprecated_since{3}=@since deprecated in v\1.\2.\3 @deprecated" \ No newline at end of file + "m_deprecated_since{3}=@since deprecated in v\1.\2.\3 @deprecated" + +HAVE_DOT = NO +DOT_FONTNAME = Source Sans Pro +DOT_FONTSIZE = 16