From 8f3c304c65e061e9d67e4618a750909b0acc9bd1 Mon Sep 17 00:00:00 2001 From: Dave Amiana Date: Sun, 12 Jul 2026 22:30:39 +0800 Subject: [PATCH 1/4] setting linting rules and core-guidelines enforcements --- .clang-tidy | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index fb1aae1..e2655e4 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,3 +1,17 @@ -Checks: "clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-*,-extra-arg=-std=c++17, modernize-use-trailing-return-type" +Checks: > + clang-diagnostic-*, + clang-analyzer-*, + cppcoreguidelines-*, + modernize-use-trailing-return-type, + modernize-use-auto, + modernize-use-nullptr, + modernize-use-override, + modernize-loop-convert, + readability-implicit-bool-conversion, + readability-braces-around-statements, + readability-redundant-smartptr-get, + readability-identifier-naming WarningsAsErrors: true AnalyzeTemporaryDtors: false +ExtraArgs: + - -std=c++17 From 85a2cd56e51a6d39055b7ed6c05ca2a33b8fea3b Mon Sep 17 00:00:00 2001 From: Dave Amiana Date: Sun, 12 Jul 2026 22:32:13 +0800 Subject: [PATCH 2/4] configured cmake build conf to include googletest and compilerflags as well as routine for building the docs --- CMakeLists.txt | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3dac35..776e7b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,25 +14,29 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) # Set compiler flags for debug and release versions -set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra -pedantic") -set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -Wextra -pedantic") +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64") + set(CMAKE_OSX_ARCHITECTURES "arm64") + message("macOS detected " ${CMAKE_OSX_ARCHITECTURES}) + + set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra -pedantic -Xclang -DDEBUG") + set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -Wextra -pedantic -Xclang") +else() + set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra -pedantic -DDEBUG") + set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -Wextra -pedantic -ffast-math -march=native -ftree-vectorize") +endif() # Add source and include directories file(GLOB_RECURSE SRC_FILES src/*.cpp) +file(GLOB_RECURSE INC_FILES include/*.hpp) add_executable(${PROJECT_NAME} ${SRC_FILES}) target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) +set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) # Fetch GTest library set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib/googletest) find_package(GTest REQUIRED CONFIG) -include(FetchContent) -FetchContent_Declare( - googletest - URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip -) - if(WIN32) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) @@ -48,10 +52,26 @@ include(GoogleTest) gtest_discover_tests(unittest) # Specify the packaging information -set(CPACK_PACKAGE_NAME "my_project") +set(CPACK_PACKAGE_NAME "TreeSet") set(CPACK_PACKAGE_VERSION "1.0.0") set(CPACK_GENERATOR "ZIP") include(CPack) # Documentation -add_subdirectory("docs") \ No newline at end of file +find_package(Doxygen) + +if(DOXYGEN_FOUND) + set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/docs_doxy/Doxyfile.in) + set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.out) + + configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY) + message("Doxygen build started") + + add_custom_target(docs + COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen" + VERBATIM) +else(DOXYGEN_FOUND) + message("Doxygen need to be installed to generate the doxygen documentation") +endif(DOXYGEN_FOUND) \ No newline at end of file From 2641dfb176ed33d74e642df6f1f6e41ed81568f0 Mon Sep 17 00:00:00 2001 From: Dave Amiana Date: Sun, 12 Jul 2026 22:35:15 +0800 Subject: [PATCH 3/4] configuration of doxy files for make build and sphinx rendering --- docs_doxy/Doxyfile.in | 150 ++++++++++++++++++++ docs_sphinx/Doxyfile.in | 186 +++++++++++++++++++++++++ docs_sphinx/Makefile | 20 +++ docs_sphinx/api/cpp_doxygen_sphinx.rst | 6 + docs_sphinx/api/index.rst | 11 ++ docs_sphinx/conf.py | 99 +++++++++++++ docs_sphinx/index.rst | 26 ++++ docs_sphinx/make.bat | 35 +++++ 8 files changed, 533 insertions(+) create mode 100644 docs_doxy/Doxyfile.in create mode 100644 docs_sphinx/Doxyfile.in create mode 100644 docs_sphinx/Makefile create mode 100644 docs_sphinx/api/cpp_doxygen_sphinx.rst create mode 100644 docs_sphinx/api/index.rst create mode 100644 docs_sphinx/conf.py create mode 100644 docs_sphinx/index.rst create mode 100644 docs_sphinx/make.bat diff --git a/docs_doxy/Doxyfile.in b/docs_doxy/Doxyfile.in new file mode 100644 index 0000000..8446f6c --- /dev/null +++ b/docs_doxy/Doxyfile.in @@ -0,0 +1,150 @@ +# Doxyfile 1.11.0 + +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "TreeSet" +PROJECT_NUMBER = +PROJECT_BRIEF = +PROJECT_LOGO = +PROJECT_ICON = +OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/docs_doxy +CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +JAVADOC_BANNER = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +PYTHON_DOCSTRING = YES +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 4 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +OPTIMIZE_OUTPUT_SLICE = NO +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES +TOC_INCLUDE_HEADINGS = 6 +MARKDOWN_ID_STYLE = DOXYGEN +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 +NUM_PROC_THREADS = 1 +TIMESTAMP = NO + +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_PRIV_VIRTUAL = NO +EXTRACT_PACKAGE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +RESOLVE_UNNAMED_PARAMS = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = SYSTEM +HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO +SHOW_HEADERFILE = YES +SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +CITE_BIB_FILES = + +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_IF_INCOMPLETE_DOC = YES +WARN_NO_PARAMDOC = NO +WARN_IF_UNDOC_ENUM_VAL = NO +WARN_AS_ERROR = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LINE_FORMAT = "at line $line of file $file" +WARN_LOGFILE = + +INPUT = "../include" +INPUT_ENCODING = UTF-8 +INPUT_FILE_ENCODING = +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cxxm \ + *.cpp \ + *.cppm \ + *.ccm \ + *.c++ \ + *.c++m \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.ixx +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = +FORTRAN_COMMENT_AFTER = 72 diff --git a/docs_sphinx/Doxyfile.in b/docs_sphinx/Doxyfile.in new file mode 100644 index 0000000..6a146a5 --- /dev/null +++ b/docs_sphinx/Doxyfile.in @@ -0,0 +1,186 @@ +# Doxyfile 1.11.0 + +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "TreeSet" +PROJECT_NUMBER = +PROJECT_BRIEF = +PROJECT_LOGO = +PROJECT_ICON = +OUTPUT_DIRECTORY = "_build" +CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +JAVADOC_BANNER = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +PYTHON_DOCSTRING = YES +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 4 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +OPTIMIZE_OUTPUT_SLICE = NO +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES +TOC_INCLUDE_HEADINGS = 6 +MARKDOWN_ID_STYLE = DOXYGEN +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 +NUM_PROC_THREADS = 1 +TIMESTAMP = NO + +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_PRIV_VIRTUAL = NO +EXTRACT_PACKAGE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +RESOLVE_UNNAMED_PARAMS = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = SYSTEM +HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO +SHOW_HEADERFILE = YES +SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +CITE_BIB_FILES = + +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_IF_INCOMPLETE_DOC = YES +WARN_NO_PARAMDOC = NO +WARN_IF_UNDOC_ENUM_VAL = NO +WARN_AS_ERROR = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LINE_FORMAT = "at line $line of file $file" +WARN_LOGFILE = + +INPUT = "../include" +INPUT_ENCODING = UTF-8 +INPUT_FILE_ENCODING = +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cxxm \ + *.cpp \ + *.cppm \ + *.ccm \ + *.c++ \ + *.c++m \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.ixx \ + *.l \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f18 \ + *.f \ + *.for \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf \ + *.ice +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = +FORTRAN_COMMENT_AFTER = 72 diff --git a/docs_sphinx/Makefile b/docs_sphinx/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/docs_sphinx/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs_sphinx/api/cpp_doxygen_sphinx.rst b/docs_sphinx/api/cpp_doxygen_sphinx.rst new file mode 100644 index 0000000..e7b1310 --- /dev/null +++ b/docs_sphinx/api/cpp_doxygen_sphinx.rst @@ -0,0 +1,6 @@ +.. _api_treeset: + +TreeSet API +============= +.. doxygenfile:: TreeSet.hpp + :project: C++ Sphinx Doxygen Breathe diff --git a/docs_sphinx/api/index.rst b/docs_sphinx/api/index.rst new file mode 100644 index 0000000..154e5d7 --- /dev/null +++ b/docs_sphinx/api/index.rst @@ -0,0 +1,11 @@ +.. _api: + +API +=== + +.. toctree:: + + :maxdepth: 2 + :glob: + + * diff --git a/docs_sphinx/conf.py b/docs_sphinx/conf.py new file mode 100644 index 0000000..b0f46a2 --- /dev/null +++ b/docs_sphinx/conf.py @@ -0,0 +1,99 @@ + +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) +from sphinx.builders.html import StandaloneHTMLBuilder +import subprocess +import os + +# Doxygen +subprocess.call('doxygen Doxyfile.in', shell=True) + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'TreeSet' +copyright = '2024, ddamiana' +author = 'ddamiana' +release = '0.0.1' + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.intersphinx', + 'sphinx.ext.autosectionlabel', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', + 'sphinx_sitemap', + 'sphinx.ext.inheritance_diagram', + 'breathe' +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +highlight_language = 'c++' + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'pydata_sphinx_theme' +html_theme_options = { + 'canonical_url': '', + 'analytics_id': '', # Provided by Google in your dashboard + 'display_version': True, + 'prev_next_buttons_location': 'bottom', + 'style_external_links': False, + + 'logo_only': False, + + # Toc options + 'collapse_navigation': True, + 'sticky_navigation': True, + 'navigation_depth': 4, + 'includehidden': True, + 'titles_only': False +} + +# html_logo = '' +# github_url = '' +# html_baseurl = '' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# -- Breathe configuration ------------------------------------------------- + +breathe_projects = { + "C++ Sphinx Doxygen Breathe": "_build/xml/" +} +breathe_default_project = "C++ Sphinx Doxygen Breathe" +breathe_default_members = ('members', 'undoc-members') diff --git a/docs_sphinx/index.rst b/docs_sphinx/index.rst new file mode 100644 index 0000000..2a0f256 --- /dev/null +++ b/docs_sphinx/index.rst @@ -0,0 +1,26 @@ +.. TreeSet documentation master file, created by + sphinx-quickstart. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to TreeSet's documentation! +==================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + +.. image:: ../img/TreeSetLogo.png + :alt: logo + :align: center + +About TreeSet +*************** +This project contains a Red-Black Tree (RBT) implementation of the Set data structure in C++. The Red-Black Tree is a self-balancing binary search tree that guarantees O(log n) time complexity for insert, delete, and search operations. + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`search` diff --git a/docs_sphinx/make.bat b/docs_sphinx/make.bat new file mode 100644 index 0000000..954237b --- /dev/null +++ b/docs_sphinx/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd From f50ec3fd6f17fd19251f0cfeb06979baf4be720e Mon Sep 17 00:00:00 2001 From: Dave Amiana Date: Sun, 12 Jul 2026 22:37:54 +0800 Subject: [PATCH 4/4] ci workflow to build docs and run tests --- .github/workflows/cpp.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index 53cedf2..858e34c 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -14,7 +14,12 @@ jobs: - name: git run: git --version - name: configure - run: sudo apt-get install make cmake build-essential + run: | + sudo apt-get install make cmake build-essential libomp-dev doxygen + pip3 install sphinx + pip3 install breathe + pip3 install pydata-sphinx-theme + pip3 install sphinx-sitemap - name: gtest run: | sudo apt-get install libgtest-dev @@ -38,3 +43,18 @@ jobs: run: | cd ${{github.workspace}}/build ctest --output-on-failure + - name: checkout repo + uses: actions/checkout@1.0.0 + - name: build docs + run: | + cd docs_sphinx + doxygen Doxyfile.in + make html + cd _build/html + touch .nojekyll + - name: deploy docs + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: docs_sphinx/_build/html