Some ideas on software infrastructure improvement #10
Replies: 3 comments 3 replies
-
@faisal-bhuiyan I definitely agree with adopting a version number, and a C++ style guide. For Doxygen documentation, I would advocate only using that for public APIs, not for every function/class in the project. It can be useful for users, but not as much for internal developers. For developers, the best documentation regarding how anything works, is the unit-tests. Also, you always know that unit-tests are up-to-date if they are building and passing. Doxygen documentation often falls out of date. I agree that logging can be useful, although it also has the risk of falling out of date. developers need to be diligent about logging things. Also, generally it needs to be turned on or off at compile time in order to not hurt performance. |
Beta Was this translation helpful? Give feedback.
-
@faisal-bhuiyan In response to the versioning, it's worth noting the current system. The main CMakeList calls the cmake macro
Note this is copied from a comment in #9 since its more appropriate to discuss the design of this system. |
Beta Was this translation helpful? Give feedback.
-
In addition to the above, I propose the usage of
will be replaced by simply adding: This appears to be the common practice and more efficient to achieve the same result, i.e. compile a header file only once. Let me know if I am missing something here. |
Beta Was this translation helpful? Give feedback.
-
I am proposing the following enhancements to the OpenTurbine SW infrastructure:
Create API documentation via Doxygen - Use of doxygen specific annotation embedded within C++ source code is pretty common to generate API documentation with minimal effort, e.g. in AMR wind.
Adopt a version number for project in CMakeLists.txt - we might consider adopting a version number for OpenTurbine using CMake. We could use the version number along with a log file (discussed below) to quickly check the build version for development as well as for releases.
Create a logging utility - a logging utility for recording log messages to files (alongside the console) should be a very useful development tool and the first point of debugging whenever necessary. Various open-source libraries are available for this such as spdlog, however, we could just implement our own basic logging utility with minimal effort.
Adopt a C++ Style guide - We are currently using the C++ style guide in the form of a
clang-format
as recommended in amr-wind. However, having a descriptive style guide helps to know about the thought process behind the choices made. The Google C++ style guide might be a good candidate to this end, of course with a few modifications of our own, e.g., increasing the line length from 80 characters to a more reasonable value such as 120.I appreciate your valuable feedback on the above items and looking forward to a productive discussion. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions