Skip to content

Latest commit

 

History

History
71 lines (70 loc) · 5.51 KB

File metadata and controls

71 lines (70 loc) · 5.51 KB

This is an explanation of the file structure that the cookiecutter generated for you:

  • C++ source files:
    • include/agent/agent.hpp is the main C++ header that declares the interface of your library.
    • src/agent.cpp is the main file that implements this library.
    • app/agent_app.cpp is an executable that uses the library. This can e.g. be used to provide a command line interface for your project.
    • tests/agent_t.cpp contains the unit tests for the library. The unit tests are written using Catch2. For further reading on what can be achieved with Catch2, we recommend their tutorial.
    • tests/tests.cpp is the Catch2 testing driver. You do not need to change this. Placing this in a separate compilation unit than the unit test implementation decreases the compilation time of the test suite.
    • python/agent_python.cpp is the source file that contains the Pybind11 code to generate the Python package.
  • CMake build system files
    • CMakeLists.txt describes the CMake configuration script. You can find such files in many directories. When CMake runs, the CMakeLists.txt from the top-level directory executes top to bottom. Whenever a command add_subdirectory(<dir>) is executed, the CMakeLists.txt file from the directory <dir> is immediately executed. A comprehensive reference of CMake's capabilities can be found in the official CMake docs. A well-written, opinionated book for beginners and experts is Modern CMake.
  • The ext directory contains any submodules that were added by the cookiecutter.
  • Documentation configuration files
    • The Doxygen documentation is configured directly from doc/CMakeLists.txt. To further configure the build, you can check the Doxygen Configuration Manual for available options and add them with set(DOXYGEN_<param> <value>) before the call to doxygen_add_docs.
    • doc/index.rst contains the actual text of the Sphinx documentation. It is written in reStructuredText, which is described in the Sphinx documentation.
    • doc/conf.py configures the Sphinx documentation that is build for readthedocs. The file contains the default configuration of Sphinx that can be adapted according to their Configuration Guide. Additionally, the file contains build logic for readthedocs that integrates Doxygen output through breathe. For information on what is possible with breathe, check the Breathe documentation.
    • doc/requirements-rtd.txt collect a list of dependencies that need to be installed on the Readthedocs build servers.
  • Configuration for CI/Code analysis/Documentation services
  • Markdown files with meta information on the project. Markdown is a good language for these files, as it is easy to write and rendered into something beautiful by your git repository hosting provider.
    • README.md is the file that users will typically see first when discovering your project.
    • COPYING.md provides a list of copyright holders.
    • LICENSE.md contains the license you selected.
    • TODO.md contains a list of TODOs after running the cookiecutter. Following the instructions in that file will give you a fully functional repository with a lot of integration into useful web services activated and running.
    • FILESTRUCTURE.md describes the generated files. Feel free to remove this from the repository if you do not need it.
  • Other files
    • .gitignore contains a default selection of files to omit from version control.
    • .gitmodules tracks the state of added submodules
    • setup.py describes the Python package build process. This file enables you to also install your software using e.g. pip.Additionally, this file is needed for the automated release process to PyPI.
    • .github/workflows/pypi.yml defines the workflow that deploys to PyPI.
    • python/tests/test_python_bindings.py and python/pytest.ini define a simple unit test suite for the Python bindings that is based on Pytest. requirements-dev.txt collects the required Python packages for running this test suite, they can be installed with python -m pip install -r requirements-dev.txt.