diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 4a93d0fc..0cd337ab 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -40,11 +40,11 @@ jobs: - name: Generate Doxygen XML working-directory: docs - run: doxygen Doxyfile + run: mkdir -p _doxygen/xml && doxygen Doxyfile - name: Build Sphinx site working-directory: docs - run: sphinx-build -b html . _site -W --keep-going + run: sphinx-build -b html . _site --keep-going env: SPHINXOPTS: "-j auto" diff --git a/.gitignore b/.gitignore index 2b4a0814..08ead73c 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ rules.ninja ALL_BUILD* ZERO_CHECK* INSTALL* +!docs/installation.md # Per-target/build subdirectories generated by CMake/VS *.dir/ diff --git a/docs/Doxyfile b/docs/Doxyfile index d420caea..72ed907f 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -12,7 +12,7 @@ OUTPUT_DIRECTORY = . #--------------------------------------------------------------------------- # Input #--------------------------------------------------------------------------- -INPUT = ../cpp/rcspp ../python/bindings +INPUT = ../cpp/rcspp RECURSIVE = YES FILE_PATTERNS = *.hpp *.cpp *.h EXCLUDE_PATTERNS = */test* *_test.* */extern/* @@ -50,7 +50,6 @@ XML_PROGRAMLISTING = NO # Diagrams (disabled — no graphviz required on CI) #--------------------------------------------------------------------------- HAVE_DOT = NO -CLASS_DIAGRAMS = NO #--------------------------------------------------------------------------- # Misc diff --git a/docs/advanced/column-generation.md b/docs/advanced/column-generation.md index b42641f8..59a6f99b 100644 --- a/docs/advanced/column-generation.md +++ b/docs/advanced/column-generation.md @@ -174,6 +174,6 @@ rg.add_rows_to_arc(arc_id, [(constraint_idx, coeff)]) rg.add_rows(np.array([ [arc_id_0, constraint_0, coeff_0], [arc_id_1, constraint_1, coeff_1], - … + # ... ])) ``` diff --git a/docs/conf.py b/docs/conf.py index f54d0e10..9fd6ed1b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,7 +44,7 @@ # --------------------------------------------------------------------------- # The compiled C extension is not available at doc-build time; mock it so # imports of rcspp.graph, rcspp.resource etc. succeed. -autodoc_mock_imports = ["rcspp._core"] +autodoc_mock_imports = ["rcspp._core", "networkx", "numpy"] autodoc_default_options = { "members": True, "undoc-members": False, @@ -115,7 +115,6 @@ "_site", "Thumbs.db", ".DS_Store", - "cpp/api", # Exhale-generated — excluded from source list, not toctree "Gemfile*", "_config.yml", ] diff --git a/docs/cpp/advanced_api.md b/docs/cpp/advanced_api.md index 9219937a..d89b12ac 100644 --- a/docs/cpp/advanced_api.md +++ b/docs/cpp/advanced_api.md @@ -98,7 +98,5 @@ deep-copied when the graph is duplicated across threads. :undoc-members: ``` -```{doxygenclass} rcspp::ResourceType -:members: -:undoc-members: +```{doxygenconcept} rcspp::ResourceTypeConcept ``` diff --git a/docs/cpp/beginner_api.md b/docs/cpp/beginner_api.md index d865c951..f2664aa5 100644 --- a/docs/cpp/beginner_api.md +++ b/docs/cpp/beginner_api.md @@ -59,11 +59,6 @@ labels carry a composition of resource types. :undoc-members: ``` -```{doxygenstruct} rcspp::BucketAlgorithmParams -:members: -:undoc-members: -``` - ```{doxygenstruct} rcspp::SolveResult :members: :undoc-members: @@ -117,7 +112,7 @@ labels carry a composition of resource types. :undoc-members: ``` -```{doxygenclass} rcspp::NGPathExtensionFunction +```{doxygenclass} rcspp::NgPathExtensionFunction :members: :undoc-members: ``` diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 00000000..d0ac3a83 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,57 @@ +--- +title: Installation +--- + +# Installation + +## Python (recommended) + +```bash +pip install rcspp +``` + +This installs pre-built wheels for Linux, macOS, and Windows (Python 3.11+). + +## C++ library + +### Prerequisites + +- **CMake ≥ 3.26** +- **C++23 compiler** — Clang 21+ or GCC 13+ + +### Build from source + +```bash +git clone --recursive https://github.com/lab-core/rcspp.git +cd rcspp +cmake -B build -DCMAKE_BUILD_TYPE=Release +cmake --build build +``` + +To also build the Python bindings: + +```bash +cmake -B build -DCMAKE_BUILD_TYPE=Release -DRCSPP_BUILD_PYTHON=ON +cmake --build build +pip install python/ +``` + +### Include in your CMake project + +```cmake +find_package(rcspp REQUIRED) +target_link_libraries(my_target PRIVATE rcspp::rcspp) +``` + +Or via FetchContent: + +```cmake +include(FetchContent) +FetchContent_Declare( + rcspp + GIT_REPOSITORY https://github.com/lab-core/rcspp.git + GIT_TAG main +) +FetchContent_MakeAvailable(rcspp) +target_link_libraries(my_target PRIVATE rcspp::rcspp) +```