Skip to content

Update Contribution guidelines #214

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

Open
8 tasks done
shakedregev opened this issue Jan 9, 2025 · 2 comments
Open
8 tasks done

Update Contribution guidelines #214

shakedregev opened this issue Jan 9, 2025 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@shakedregev
Copy link
Collaborator

shakedregev commented Jan 9, 2025

Document implicit guidelines for contributing:

  • - Use squash merge when merging a feature to a main development branch and edit the commit message to describe relevant details.
  • - Do not include words like "function" or "class" in function or class names. It is clear what they are based on the naming conventions.
  • - ReSolve should always be capitalized in this manner, regardless of naming conventions. There may be additional words where capitalization is important and it is preserved similarly.
  • - When writing a function header over multiple lines, indenting of subsequent variables should mimic the first variable.
  • - Add Doxygen comments for class member functions in source files. Add Doxygen comments for classes in their header files.
  • - Doxygen: explain which parameters are in, out or in,out using @param[in], @param[out] , @param[in,out]
  • - Doxygen: Write a one line explanation using @brief, add a longer explanation below if necessary
  • - Do not leave commented out code
@pelesh pelesh added this to the Release 0.99.2 milestone Feb 5, 2025
@pelesh pelesh added the documentation Improvements or additions to documentation label Feb 5, 2025
@shakedregev
Copy link
Collaborator Author

shakedregev commented Feb 25, 2025

@pelesh - addressed in #242.

@pelesh
Copy link
Collaborator

pelesh commented Mar 8, 2025

I would suggest following amendment to item 5 in your list: "Add Doxygen comments for class member functions in source files. Add Doxygen comments for classes in their header files."

We could also put @brief stanzas for member functions in header files and everything else in source files.

// Gmres.hpp

/**
 * @brief Generalized minimum residual (GMRES) solver.
 *
 * Long description of Gmres class ...
 * 
 * @note MatrixHandler and VectorHandler objects are inherited from
 * LinSolver base class.
 */
class Gmres
{
  Gmres();
  ~Gmres();

  /// @brief Runs iterative solver
  int solve(vector_type x);
};

The source file would then have something like this:

// Gmres.cpp

// some code

/**
 *
 * Long description explaining what `solve` function does ...
 *  
 * @pre The solver `setup` function has been successful and the pointer to system
 * matrix has been set.
 */
int Gmres::solve(vector_type x)
{
  // some code
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants