Skip to content

Restructured CONTRIBUTING.md into a real contributing guide & applied its convention to the code-base - #757

Open
jbigot wants to merge 2 commits into
mainfrom
improve_contributing
Open

jbigot wants to merge 2 commits into
mainfrom
improve_contributing

Conversation

@jbigot

@jbigot jbigot commented Sep 4, 2026

Copy link
Copy Markdown
Member

Restructured CONTRIBUTING.md into a real contributing guide

  • 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.

Apply the CONTRIBUTING conventions to the code base

  • 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
    and includes it needs for reference_wrapper and
    shared_ptr, dropped the unused , 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 #264
Fixes #755

List of things to check before making a PR

Before merging your code, please check the following:

  • you have added a line describing your changes to the Changelog;
  • you have added unit tests for any new or improved feature;
  • in case you updated dependencies, you have checked pdi/docs/CheckList.md;
  • in case of a change in pdi.h, this same change must be reflected in mock_pdi/pdi.h;
  • in case of a new plugin, make sure the plugin issues the corresponding timer events;
  • you have checked your code format:
    • you have checked that you respect all conventions specified in CONTRIBUTING.md;
    • you have checked that the indentation and formatting conforms to the .clang-format;
    • you have documented with doxygen any new or changed function / class;
  • you have correctly updated the copyright headers:
    • your institution is in the copyright header of every file you (substantially) modified;
    • you have checked that the end-year of the copyright there is the current one;
  • you have updated the AUTHORS file:
    • you have added yourself to the AUTHORS file;
    • if this is a new contribution, you have added it to the AUTHORS file;
  • you have added everything to the user documentation:
    • any new CMake configuration option;
    • any change in the yaml config;
    • any change to the public or plugin API;
    • any other new or changed user-facing feature;
    • any change to the dependencies;
  • you have correctly linked your MR to one or more issues:
    • your MR solves an identified issue;
    • your commit contain the Fix #issue keyword to autoclose the issue when merged.

* 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
@jbigot
jbigot requested review from a team September 4, 2026 20:53
Comment thread pdi/include/pdi/python/python_ref_wrapper.h
* THE SOFTWARE.
******************************************************************************/

#include "config.h"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this header file?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As stated in contributing. It imports the configuration set by cmake and should be included in all cxx from pdi core

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should be further coded inside this config?
For now, I see some lines regarding Fortran type size and the plugin path.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the things generated at configure time by cmake. The less, the better

Comment thread pdi/tests/PDI_data_descriptor.cxx
@@ -4,25 +4,25 @@ Before merging your code, please check the following:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about added a line about the warning compiler message? @pdidev/pdi-owners

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean exactly?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would be nice. You can make a suggestion in this PR or make a new one on top.

Comment thread CONTRIBUTING.md
`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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.build is a cached directory.
suggestion: change to build_pdi

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A few names from the public plugin API violate the CONTRIBUTING naming convention Describe camel case unit test naming in CONTRIBUTING.md

3 participants