diff --git a/README.md b/README.md index 57a7ab3c..e3f37117 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,18 @@ Below is a high-level overview of the project structure and capabilities we are ![Project Overview](resources/images/aqnwb_objective_500px.png) + +## Requirements + +- **Minimum Requirements:** + - A C++17-compliant compiler + - [CMake >= 3.15](https://cmake.org) + - [HDF5 >= 1.10](https://github.com/HDFGroup/hdf5) + - [Boost](https://www.boost.org/) +- **Documentation:** Additional requirements for building the documentation (optional) + - [Doxygen](https://www.doxygen.nl/) + - [Graphviz](https://graphviz.org/) +- **For Developers:** Additional requirements for developers (mode `dev`) + - cppcheck + - clang-format (optional, required for ``target=format-check``, ``target=format-fix``) + - codespell (optional, required for ``target=spell-check``, ``target=spell-fix``) diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index cb13342e..23395980 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -14,6 +14,9 @@ EXTRACT_ALL = YES RECURSIVE = YES OUTPUT_DIRECTORY = "@DOXYGEN_OUTPUT_DIRECTORY@" +# Enable Markdown support +MARKDOWN_SUPPORT = YES + # Use the README as a main page USE_MDFILE_AS_MAINPAGE = "@PROJECT_SOURCE_DIR@/README.md" diff --git a/docs/pages/2_devdocs.dox b/docs/pages/2_devdocs.dox index 30ed6283..357392f2 100644 --- a/docs/pages/2_devdocs.dox +++ b/docs/pages/2_devdocs.dox @@ -3,7 +3,7 @@ * * This documentation is intended for developers of AqNWB. * - * - \ref install_page (part of the \ref userdocs docs) + * - @subpage dev_install_page * - @subpage testing * - @subpage code_of_conduct_page * - @subpage license_page diff --git a/docs/pages/devdocs/install.dox b/docs/pages/devdocs/install.dox new file mode 100644 index 00000000..ac96f398 --- /dev/null +++ b/docs/pages/devdocs/install.dox @@ -0,0 +1,97 @@ +/** + * @page dev_install_page Installation & Setup + * + * \section dev_requirements_sec Requirements + * + * Please ensure that the required libraries described in the + * \ref requirements "Requirements" section are installed. For developers we recommend + * to also install optional dependencies to ease development. + * + * \section devbuild_sec Developer Build + * + * Build system targets that are only useful for developers of AqNWB are + * hidden if the `aq-nwb_DEVELOPER_MODE` option is disabled. Enabling this + * option makes \ref testing "tests" and other developer targets and options available. You can enable + * the option when configuring the build by adding `-Daq-nwb_DEVELOPER_MODE=ON`, e.g., + * + * \code{.sh} + * cmake -S . -B build -Daq-nwb_DEVELOPER_MODE=ON + * \endcode + * + * \note + * If you are using custom installations of **HDF5** or **BOOST** that are not being detected + * automatically by cmake, you can specify `HDF5_ROOT` and `BOOST_ROOT` environment variables to + * point to install directories of HDF5 and BOOST respectively. + * + * \section devbuild_presets_subsec Developer Presets + * + * As a developer, you can create your own dev preset by making a `CMakeUserPresets.json` file at the root of + * the project: + * + * \code{.json} + * { + * "version": 2, + * "cmakeMinimumRequired": { + * "major": 3, + * "minor": 15, + * "patch": 0 + * }, + * "configurePresets": [ + * { + * "name": "dev", + * "binaryDir": "${sourceDir}/build/dev", + * "inherits": ["dev-mode", "ci-"], + * "cacheVariables": { + * "CMAKE_BUILD_TYPE": "Debug" + * } + * } + * ], + * "buildPresets": [ + * { + * "name": "dev", + * "configurePreset": "dev", + * "configuration": "Debug" + * } + * ], + * "testPresets": [ + * { + * "name": "dev", + * "configurePreset": "dev", + * "configuration": "Debug", + * "output": { + * "outputOnFailure": true + * } + * } + * ] + * } + * \endcode + * Replace `` in the `CMakeUserPresets.json` file with the name of + * the operating system you have (`win64`, `linux` or `darwin`). + * + * \subsection configure_build_test Configure, Build and Test + * + * You can configure, build and test the project respectively with the following commands from the project root on + * any operating system with any build system: + * + * \code{.sh} + * cmake --preset=dev + * cmake --build --preset=dev + * ctest --preset=dev + * \endcode + * + * \section devbuild_dev_mode_targets_subsec Developer Mode Targets + * + * Additional targets can be invoked when in development mode using the commands below + * + * \code{.sh} + * cmake --build --preset=dev --target= + * \endcode + * + * \subsubsection devbuild_target_options_subsubsec Target options + * - `format-check`: run the `clang-format` tool on the codebase to check for formatting errors + * - `format-fix` : run the `clang-format` tool on the codebase with `FIX=YES` to both check and automatically fix for formatting errors + * - `spell-check`: run the `codespell` tool on the codebase to check for common spelling errors + * - `spell-fix` : run the `codespell` tool on the codebase with `FIX=YES` to both check and automatically fix common spelling errors + * - `docs` : builds the documentation using Doxygen. (Note: run `cmake --preset=dev -DBUILD_DOCS=ON` before building to add docs target) + */ + diff --git a/docs/pages/userdocs/install.dox b/docs/pages/userdocs/install.dox index 655b6fa5..8fc41c83 100644 --- a/docs/pages/userdocs/install.dox +++ b/docs/pages/userdocs/install.dox @@ -1,22 +1,12 @@ /** * @page install_page Installing AqNWB * - * \section requirements Requirements - * - A C++17-compliant compiler - * - CMake >= 3.15 - * - HDF5 >= 1.10 - * - Boost - * - Additional requirements for building the documentation (optional) - * - Doxygen - * - Graphviz - * - Additional requirements for developers (mode `dev`) - * - cppcheck - * - clang-format - * - codespell (optional, required for ``target=spell-check``) + * \section user_requirements_sec Requirements * - * \section userbuild_sec User Build + * Please ensure that the required libraries described in the + * \ref requirements "Requirements" section are installed. * - * \subsection userbuild_build_subsec Build + * \section userbuild_build_sec Build * * Here are the steps for building in release mode with a multi-configuration generator: * @@ -30,7 +20,7 @@ * automatically by cmake, you can specify `HDF5_ROOT` and `BOOST_ROOT` environment variables to * point to install directories of HDF5 and BOOST respectively. * - * \subsection userbuild_install_subsec Install + * \section userbuild_install_sec Install * * Here is the command for installing the release mode artifacts with a * multi-configuration generator: @@ -39,89 +29,6 @@ * cmake --install build --config Release * \endcode * - * - * - * \section devbuild_sec Developer Build - * - * Build system targets that are only useful for developers of AqNWB are - * hidden if the `aq-nwb_DEVELOPER_MODE` option is disabled. Enabling this - * option makes tests and other developer targets and options available. You can enable - * the option when configuring the build by adding `-Daq-nwb_DEVELOPER_MODE=ON`, e.g., - * - * \code{.sh} - * cmake -S . -B build -Daq-nwb_DEVELOPER_MODE=ON - * \endcode - * - * \subsection devbuild_presets_subsec Presets - * - * As a developer, you can create your own dev preset by making a `CMakeUserPresets.json` file at the root of - * the project: - * - * \code{.json} - * { - * "version": 2, - * "cmakeMinimumRequired": { - * "major": 3, - * "minor": 15, - * "patch": 0 - * }, - * "configurePresets": [ - * { - * "name": "dev", - * "binaryDir": "${sourceDir}/build/dev", - * "inherits": ["dev-mode", "ci-"], - * "cacheVariables": { - * "CMAKE_BUILD_TYPE": "Debug" - * } - * } - * ], - * "buildPresets": [ - * { - * "name": "dev", - * "configurePreset": "dev", - * "configuration": "Debug" - * } - * ], - * "testPresets": [ - * { - * "name": "dev", - * "configurePreset": "dev", - * "configuration": "Debug", - * "output": { - * "outputOnFailure": true - * } - * } - * ] - * } - * \endcode - * Replace `` in the `CMakeUserPresets.json` file with the name of - * the operating system you have (`win64`, `linux` or `darwin`). - * - * \subsection configure_build_test Configure, build and test - * - * You can configure, build and test the project respectively with the following commands from the project root on - * any operating system with any build system: - * - * \code{.sh} - * cmake --preset=dev - * cmake --build --preset=dev - * ctest --preset=dev - * \endcode - * - * \subsection devbuild_dev_mode_targets_subsec Developer mode targets - * - * Additional targets can be invoked when in development mode using the commands below - * - * \code{.sh} - * cmake --build --preset=dev --target= - * \endcode - * - * \subsubsection devbuild_target_options_subsubsec Target options - * - `format-check`: run the `clang-format` tool on the codebase to check for formatting errors - * - `format-fix` : run the `clang-format` tool on the codebase with `FIX=YES` to both check and automatically fix for formatting errors - * - `spell-check`: run the `codespell` tool on the codebase to check for common spelling errors - * - `spell-fix` : run the `codespell` tool on the codebase with `FIX=YES` to both check and automatically fix common spelling errors - * - `docs` : builds the documentation using Doxygen. (Note: run `cmake --preset=dev -DBUILD_DOCS=ON` before building to add docs target) */