Contributing
Repositories¶
- Model source: github.com/swat-model/swatplus, with issues, pull requests and releases.
- This documentation: github.com/swat-model/swatplus-documentation.
Questions about using the model are best asked through the SWAT support page.
Reporting a problem¶
Open an issue with:
- the SWAT+ version (shown in the banner at start-up and in the executable name);
- the operating system and, for your own builds, the compiler;
- a project that shows the problem, as small as possible (one of the
refdatadatasets with the changes that cause it is ideal); simulation.outanddiagnostics.outfrom the run.
Contributing code¶
- Fork
swat-model/swatplusand create a branch frommainwith a descriptive name (fix-aquifer-init,add-soil-temp-output). - Build and run your change on the reference datasets before opening a pull request. See Build with CMake and Testing.
- Open a pull request against
main. Describe what the change does and why, which datasets you ran and how their outputs changed, and any change to input or output files. - Answer review comments on the same branch.
Reviewers look for:
- a clean build with gfortran and the Intel compilers;
- unchanged outputs for parts of the model the change does not touch;
- defaults for new parameters that keep existing results when the parameter is not set;
- input file changes matched by a SWAT+ Editor change or a note on how to update existing projects;
- code that follows the coding conventions.
Contributing to the documentation¶
The documentation is a MkDocs site in the swatplus-documentation repository. Each page states the SWAT+ commit it was checked against in its front matter (verified_at_commit), and every statement about model behaviour should come from the source at that commit. Page bodies are written for model users; source file names and variable names go in the collapsed Sources block at the end of each page (??? quote "Sources").
To check a change locally:
The site is versioned with mike. Pushing a tag to the documentation repository, named after the SWAT+ version the pages describe (for example 62.0.1), publishes that version and moves the latest alias to it. Earlier versions stay available from the version selector.
Sources
- CI:
.github/workflows/test.ymland.github/workflows/build.ymlin the source repository. - Documentation build and deployment:
mkdocs.yml,requirements.txtand.github/workflows/deploy.ymlin the documentation repository.