Copyright 2017-2024 Fluid Numerics LLC
- Find an issue that you are interested in addressing or a feature that you would like to add.
- Fork the repository associated with the issue to your local GitHub organization. This means that you will have a copy of the repository under your-GitHub-username/SELF.
- Clone the repository to your local machine using git clone https://github.com/github-username/SELF.git.
- Create a new branch for your contribution. To help maintainers easily determine the type of code contribution, name your branch using bugfix/issue-NN or feature/issue-NN prefixes.
- Make the appropriate changes for the issue you are trying to address or the feature that you want to add.
- When committing your changes, follow the commit guidelines when writing your commit messages.
- You are encouraged to run the SELF tests using
ctest
on your local system before opening a pull request. If you don't have a GPU, that's ok. Your contribution will be fully tested when you open a pull request. - Open a pull request with the upstream SELF repository. In the title, reference the issue number that you worked on. Include a detailed description of the changes you made and why. If you have recommendations for updates to documentation as a result of your changes, please indicate so. If you've added a new routine, you will need to work with the maintainers to develop tests when integrating your new feature in.
Each pull request is checked for formatting before running other tests. The self
project uses fprettify
for formatting fortran source code. We have included a configuration file in the self
repository (fprettify.config
) that can be used for ensuring formatting correctness.
SELF comes with a .pre-commmit-config.yaml
file that can be used with pre-commit
. The benefit of using pre-commit is that this automates applying formatting to all Fortran files in SELF with each commit. To use pre-commit
:
- Install
pre-commit
pip install pre-commit fprettify
- Configure your pre-commit hooks. This command must be run from the root directory of the
self
repository
pre-commit install
You can run the following to format code to conform to the expected format for self
.
fprettify './src/' --config-file ./fprettify.config --recursive --case 1 1 1 1
fprettify './test/' --config-file ./fprettify.config --recursive --case 1 1 1 1
fprettify './examples/' --config-file ./fprettify.config --recursive --case 1 1 1 1