Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preambles in header and source files #908

Open
LorenzE opened this issue Dec 9, 2022 · 0 comments
Open

Preambles in header and source files #908

LorenzE opened this issue Dec 9, 2022 · 0 comments

Comments

@LorenzE
Copy link
Member

LorenzE commented Dec 9, 2022

Based on a discussion in #902 with @gabrielbmotta and @juangpc.

IMO the preamble should only feature the authors and the copyright note. This is similar to what mne-python does (see https://github.com/mne-tools/mne-python/blob/main/mne/decoding/time_delaying_ridge.py) and feels much easier to maintain. I think keeping the authors in cpp and h files is important because this is an open-source project after all. The people who mainly worked on these files should be named here.

Next to the preamble, I also changed the following:

  • Removed all /==== separators as I agree with @juangpc that they do not add much value
  • Removed all docs blocks such as Qt includes, inlines, etc.
  • Used //! for single line comments
  • Formatted the file with clang-format -style=LLVM -I connectivity.h, see Introduce tool for consistent formatting #905 for detailed discussion on clang-format

An example (libraries/connectivity/connectivity.h):

/**
 * @author Lorenz Esch <[email protected]>
 * @copyright BSD-3-Clause license
 */

#ifndef CONNECTIVITY_H
#define CONNECTIVITY_H

#include "connectivity_global.h"

#include <QSharedPointer>

#include <Eigen/Core>

namespace CONNECTIVITYLIB {

class ConnectivitySettings;
class Network;

/**
 * This class handles the incoming settings and computes the actual connectivity
 * estimation.
 */
class CONNECTIVITYSHARED_EXPORT Connectivity {

public:
  //! Shared pointer type for Connectivity
  typedef QSharedPointer<Connectivity> SPtr;
  //! Const shared pointer type for Connectivity
  typedef QSharedPointer<const Connectivity> ConstSPtr;

  //! Ctor
  explicit Connectivity();

  /**
   * Computes the network based on given connvectivty settings
   *
   * @param connectivitySettings  the connectivity settings
   * @return                      Returns the list with calculated networks for
   * each provided method.
   */
  static QList<Network> calculate(ConnectivitySettings &connectivitySettings);
};

} // namespace CONNECTIVITYLIB

#endif // CONNECTIVITY_H
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

No branches or pull requests

1 participant