Conversation
* Added an introduction that covers what a newcomer cannot guess: that this is a superbuild of independent CMake projects, that most functionality lives in plugins, and that the Fortran bindings are generated from .zpp sources. * Added sections on setting up a development build, running the tests, the project structure, making a change and submitting it, and reordered the file so that the coding style comes last, as a reference to consult while working. * Documented the changelog conventions, including requirements previously only stated in the pull request template. * Added a Namespaces section covering `using namespace`, the private `PDI::impl` namespace, the per-plugin namespaces and the specialisation of standard templates in `std`. * Documented conventions that were already applied but written down nowhere: the include guard naming, the `_f` suffix for function pointer typedefs, the backslash form of the doxygen commands, and that only the public API is exported while `src/` classes are `PDI_NO_EXPORT`. * Added the `config.h` include rule. * Described the quote/bracket include convention as the code actually applies it: quotes for the headers of the component being compiled, brackets otherwise. * Resolved the contradiction in the auto rule. * Excepted templates from the no-implementation-in-headers rule. * Fixed a minor typo that was talking about `pdi/fwd.h` instead of `pdi/pdi_fwd.h`, a file that does not exist. * Fixed the path to `CONTRIBUTING.md`, at the root and not in `pdi/`, in `pdi/docs/CheckList.md`. * Documented what goes into `.gitignore` and what goes into `.git/info/exclude`. * Updated `README.md`: its content list named the removed `plugins/test/` and omitted `plugins/json/` and `plugins/timer/`, `mock_pdi/` had no description, and the distribution file list was incomplete. Added the Contributing and License sections a newcomer looks for, and fixed a typo. * Documented the gtest naming convention for test code. * Merged `pdi/docs/CheckList.md` into `CONTRIBUTING.md`. Fixed minor issues in `README.md` and `.github/pull_request_template.md`. Fixes #264
* Renamed the PDI::impl mixins `what_impl` and `status_impl` to `What_impl` and `Status_impl` so that they follow the class naming rule. * Replaced `using namespace std;` with per-symbol using declarations in the nine unit tests that pulled in the whole of `std`. * Dropped an unused `using std::cerr;` from the pycall plugin. * Added the missing "config.h" to the eleven implementation files of the library that lacked it. * Switched the three files that referred to the library's own headers with brackets to the quote notation the others use. * Moved `Logger`'s defaulted constructor out of line, added the missing <functional> and <memory> includes it needs for `reference_wrapper` and `shared_ptr`, dropped the unused <utility>, and removed a comment about a C++17 change in a code base that is now C++20. * Fixed the include guards: `PDI_PLUGIN_LOADER_H_` was left over from a rename, `mapping.h` claimed to be `MAPPING_LITERAL`, `PDI_PYTHON_REF_WRAPPER` was missing its `_H_` suffix, and `fmt.h` had no guard at all. * Added missing public forward declarations to `pdi/pdi_fwd.h`. * Renamed `TimerEventHandler` to `Timer_event_handler` to follow the class naming rule, keeping the former name as a deprecated alias so that existing plugins keep building, and updated the six plugin files that use it. Moved its implementation out of the header, documented it and forward-declared it. * Added the PDI prefix to the `PLUGIN_API_VERSION*` macros, again keeping the unprefixed names as deprecated aliases since the `PDI_PLUGIN` macro expands to them in plugin code. * Fixed the test suites that did not follow gtest naming conventions. * Added __pycache__ to .gitignore Fixes #755
| * THE SOFTWARE. | ||
| ******************************************************************************/ | ||
|
|
||
| #include "config.h" |
There was a problem hiding this comment.
Why do you need this header file?
There was a problem hiding this comment.
As stated in contributing. It imports the configuration set by cmake and should be included in all cxx from pdi core
There was a problem hiding this comment.
What should be further coded inside this config?
For now, I see some lines regarding Fortran type size and the plugin path.
There was a problem hiding this comment.
Only the things generated at configure time by cmake. The less, the better
| @@ -4,25 +4,25 @@ Before merging your code, please check the following: | |||
|
|
|||
There was a problem hiding this comment.
What do you think about added a line about the warning compiler message? @pdidev/pdi-owners
There was a problem hiding this comment.
What do you mean exactly?
There was a problem hiding this comment.
Recently, a issue #716 is open to fix a warning.
The warning can be removed easily in this case.
It would be nice that the developer check the new warning message generated in the compilation step (in each images of CI). And remove them that corresponds to a possible error.
The checking line can be viewed at a friendly reminder
There was a problem hiding this comment.
Yes, that would be nice. You can make a suggestion in this PR or make a new one on top.
| `DIST_PROFILE` is the switch that distinguishes a developer build from a user build. | ||
| Setting it to `Devel` turns on `BUILD_TESTING`, `BUILD_DOCUMENTATION` and `BUILD_UNSTABLE`, and | ||
| defaults the build type to `Debug`. | ||
| `<build>` denotes your build directory throughout this guide; the examples use `.build`, but you |
There was a problem hiding this comment.
.build is a cached directory.
suggestion: change to build_pdi
There was a problem hiding this comment.
Yes, that was the point. To use a hidden directory and not something that clutters ones repo. Do you think it's really better to use a normal directory? In that case, I'd go for just build
Restructured CONTRIBUTING.md into a real contributing guide
a superbuild of independent CMake projects, that most functionality lives in
plugins, and that the Fortran bindings are generated from .zpp sources.
project structure, making a change and submitting it, and reordered the file
so that the coding style comes last, as a reference to consult while working.
stated in the pull request template.
using namespace, the privatePDI::implnamespace, the per-plugin namespaces and the specialisation ofstandard templates in
std.the include guard naming, the
_fsuffix for function pointer typedefs, thebackslash form of the doxygen commands, and that only the public API is
exported while
src/classes arePDI_NO_EXPORT.config.hinclude rule.it: quotes for the headers of the component being compiled, brackets
otherwise.
pdi/fwd.hinstead ofpdi/pdi_fwd.h, a file that does not exist.CONTRIBUTING.md, at the root and not inpdi/, inpdi/docs/CheckList.md..gitignoreand what goes into.git/info/exclude.README.md: its content list named the removedplugins/test/andomitted
plugins/json/andplugins/timer/,mock_pdi/had nodescription, and the distribution file list was incomplete. Added the
Contributing and License sections a newcomer looks for, and fixed a typo.
pdi/docs/CheckList.mdintoCONTRIBUTING.md.Fixed minor issues in
README.mdand.github/pull_request_template.md.Apply the CONTRIBUTING conventions to the code base
what_implandstatus_impltoWhat_impland
Status_implso that they follow the class naming rule.using namespace std;with per-symbol using declarations in thenine unit tests that pulled in the whole of
std.using std::cerr;from the pycall plugin.library that lacked it.
brackets to the quote notation the others use.
Logger's defaulted constructor out of line, added the missingand includes it needs for
reference_wrapperandshared_ptr, dropped the unused , and removed a comment about aC++17 change in a code base that is now C++20.
PDI_PLUGIN_LOADER_H_was left over from arename,
mapping.hclaimed to beMAPPING_LITERAL,PDI_PYTHON_REF_WRAPPERwas missing its_H_suffix, andfmt.hhad noguard at all.
pdi/pdi_fwd.h.TimerEventHandlertoTimer_event_handlerto follow the classnaming rule, keeping the former name as a deprecated alias so that existing
plugins keep building, and updated the six plugin files that use it. Moved
its implementation out of the header, documented it and forward-declared it.
PLUGIN_API_VERSION*macros, again keeping theunprefixed names as deprecated aliases since the
PDI_PLUGINmacro expandsto them in plugin code.
Fixes #264
Fixes #755
List of things to check before making a PR
Before merging your code, please check the following:
.clang-format;Fix #issuekeyword to autoclose the issue when merged.