-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mf6): fixes gfortran-8 contiguous issue
* Initial changes to address #36. Still need to test and perform clean up. * Updates to OBS to deallocate internal members with gfortran-8. Clean up of constants specified in code (DZERO and DONE) instead of relying on constants module. * Cleanup of variable definitions. Still more cleaning required. * Fixed compile issue with mf5to6...added contiguous to vectors/arrays allocated using the memory manager. Also fixed issue with SEGFAULT in mf5to6 that was related to a pointer in ChdPackageWriter that was not pointed to null (=> null()) in definition. * Proposed fix for denormal results occurring with gfortran-8 and test016_Keating_disu_250. * Proposed fix for denormal results occurring with gfortran-8 and test016_Keating_disu_250. (2) * Additional cleanup of variable definitions. Modified .travis.yml to require successful testing of gfortran-7 and gfortran-8 environments. * docs(ReleaseNotes): Updated release notes Added section for current release and added header for 6.0.3 version changes. * docs: updates and additions Updated CONTRIBUTING.md and added DEVELOPER.md. DEVELOPER.md probably still needs additional work. Closes #36
- Loading branch information
1 parent
7f2cfc5
commit 4bb9b65
Showing
77 changed files
with
1,720 additions
and
1,277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,222 @@ | ||
Contributing | ||
============ | ||
|
||
Contributions are welcome from the community. Questions can be asked on the | ||
[issues page][1]. Before creating a new issue, please take a moment to search | ||
and make sure a similar issue does not already exist. If one does exist, you | ||
can comment (most simply even with just a `:+1:`) to show your support for that | ||
issue. | ||
Contributions to MODFLOW 6 are welcome from the community. As a contributor, here are the guidelines we would like you to follow: | ||
|
||
If you have direct contributions you would like considered for incorporation | ||
into the project you can [fork this repository][2] and | ||
[submit a pull request][3] for review. | ||
- [Code of Conduct](#coc) | ||
- [Question or Problem?](#question) | ||
- [Issues and Bugs](#issue) | ||
- [Feature Requests](#feature) | ||
- [Submission Guidelines](#submit) | ||
- [Coding Rules](#rules) | ||
- [Commit Message Guidelines](#commit) | ||
|
||
## <a name="coc"></a> Code of Conduct | ||
Help us keep MODFLOW 6 open and inclusive. Please read and follow our [Code of Conduct][coc]. | ||
|
||
## <a name="question"></a> Got a Question or Problem? | ||
|
||
[1]: https://github.com/MODFLOW-USGS/modflow6/issues | ||
[2]: https://help.github.com/articles/fork-a-repo/ | ||
[3]: https://help.github.com/articles/about-pull-requests/ | ||
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [Stack Overflow](https://stackoverflow.com/questions/tagged/modflow6) where the questions should be tagged with tag `modflow6`. | ||
|
||
Stack Overflow is a much better place to ask questions since: | ||
|
||
- there are thousands of people willing to help on Stack Overflow | ||
- questions and answers stay available for public viewing so your question / answer might help someone else | ||
- Stack Overflow's voting system assures that the best answers are prominently visible. | ||
|
||
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow. | ||
|
||
## <a name="issue"></a> Found a Bug? | ||
If you find a bug in the source code, you can help us by | ||
[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can [submit a Pull Request](#submit-pr) with a fix. | ||
|
||
## <a name="feature"></a> Missing a Feature? | ||
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub Repository. If you would like to *implement* a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it. Please consider what kind of change it is: | ||
|
||
* For a **Major Feature**, first open an issue and outline your proposal so that it can be | ||
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, | ||
and help you to craft the change so that it is successfully accepted into the project. | ||
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). | ||
|
||
## <a name="submit"></a> Submission Guidelines | ||
|
||
### <a name="submit-issue"></a> Submitting an Issue | ||
|
||
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available. | ||
|
||
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal, complete, and verifiable example. Having a minimal, complete, and verifiable example gives us a wealth of important information without going back & forth to you with additional questions like: | ||
|
||
- version of MODFLOW 6 used | ||
- and most importantly - a use-case that fails (ideally an example that uses flopy to generate MODFLOW 6 input files - see test_gwf* python scripts in the `autotest/` directory) | ||
|
||
We will be insisting on a minimal minimal, complete, and verifiable example in order to save maintainers time and ultimately be able to fix more bugs. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it. | ||
|
||
Unfortunately, we are not able to investigate / fix bugs without a minimal, complete, and verifiable example, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced. | ||
|
||
You can file new issues by filling out our [new issue form](https://github.com/MODFLOW-USGS/modflow6/issues/new). | ||
|
||
|
||
### <a name="submit-pr"></a> Submitting a Pull Request (PR) | ||
Before you submit your Pull Request (PR) consider the following guidelines: | ||
|
||
1. Search [GitHub](https://github.com/MODFLOW-USGS/modflow6/pulls) for an open or closed PR that relates to your submission. You don't want to duplicate effort. | ||
1. Fork the MODFLOW-USGS/modflow6 repo. | ||
1. Make your changes in a new git branch: | ||
|
||
```shell | ||
git checkout -b my-fix-branch develop | ||
``` | ||
|
||
1. Create your patch, **including appropriate test cases**. | ||
1. Follow our [Coding Rules](#rules). | ||
1. Run the full modflow6 test suite, as described in the [developer documentation][dev-doc], | ||
and ensure that all tests pass. | ||
1. Commit your changes using a descriptive commit message that follows our | ||
[commit message conventions](#commit). Adherence to these conventions | ||
is necessary because release notes are automatically generated from these messages. | ||
|
||
```shell | ||
git commit -a | ||
``` | ||
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files. | ||
|
||
1. Push your branch to GitHub: | ||
|
||
```shell | ||
git push origin my-fix-branch | ||
``` | ||
|
||
1. In GitHub, send a pull request to `modflow6:develop`. | ||
* If we suggest changes then: | ||
* Make the required updates. | ||
* Re-run the MODFLOW 6 test suites, in the autotest directory, to ensure tests are still passing. The test suites are run using python nosetests and require [flopy](https://github.com/modflowpy/flopy) and [pymake](https://github.com/modflowpy/pymake). | ||
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request): | ||
|
||
```shell | ||
git rebase develop -i | ||
git push -f | ||
``` | ||
|
||
That's it! Thank you for your contribution! | ||
#### After your pull request is merged | ||
After your pull request is merged, you can safely delete your branch and pull the changes | ||
from the main (upstream) repository: | ||
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: | ||
```shell | ||
git push origin --delete my-fix-branch | ||
``` | ||
* Check out the develop branch: | ||
```shell | ||
git checkout develop -f | ||
``` | ||
* Delete the local branch: | ||
```shell | ||
git branch -D my-fix-branch | ||
``` | ||
* Update your develop with the latest upstream version: | ||
```shell | ||
git pull --ff upstream develop | ||
``` | ||
## <a name="rules"></a> Coding Rules | ||
To ensure consistency throughout the source code, keep these rules in mind as you are working: | ||
* All features or bug fixes **must be tested** by one or more specs (unit-tests). | ||
## <a name="commit"></a> Commit Message Guidelines | ||
We have very precise rules over how our git commit messages can be formatted. This leads to **more | ||
readable messages** that are easy to follow when looking through the **project history**. But also, | ||
we use the git commit messages to **generate the MODFLOW 6 change log**. | ||
### Commit Message Format | ||
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special | ||
format that includes a **type**, a **scope** and a **subject**: | ||
``` | ||
<type>(<scope>): <subject> | ||
<BLANK LINE> | ||
<body> | ||
<BLANK LINE> | ||
<footer> | ||
``` | ||
The **header** is mandatory and the **scope** of the header is optional. | ||
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier | ||
to read on GitHub as well as in various git tools. | ||
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any. | ||
Samples: (even more [samples](https://github.com/MODFLOW-USGS/modflow6/commits/develop)) | ||
``` | ||
docs(changelog): update changelog to beta.5 | ||
``` | ||
``` | ||
fix(release): need to depend alslkj askjalj lhjfjepo kjpodep | ||
The version in our lakjoifejw jiej kdjijeqw kjdwjopj lkl kopfcqiw cakd kjkfje mmsm. | ||
``` | ||
### Revert | ||
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted. | ||
### Type | ||
Must be one of the following: | ||
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) | ||
* **docs**: Documentation only changes | ||
* **feat**: A new feature | ||
* **fix**: A bug fix | ||
* **perf**: A code change that improves performance | ||
* **refactor**: A code change that neither fixes a bug nor adds a feature | ||
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | ||
* **test**: Adding missing tests or correcting existing tests | ||
### Scope | ||
The scope should be the name of the MODFLOW 6 module/class affected (as perceived by the person reading the changelog generated from commit messages. | ||
There are currently a few exceptions to the "use module/class name" rule: | ||
* **packaging**: used for changes that change the npm package layout in all of our packages, e.g. | ||
public path changes, package.json changes done to all packages, d.ts file/format changes, changes | ||
to bundles, etc. | ||
* **releasenotes**: used for updating the release notes | ||
* **readme**: used for updating the release notes in README.md | ||
* **changelog**: used for updating the release notes in CHANGELOG.md | ||
* none/empty string: useful for `style`, `test` and `refactor` changes that are done across all | ||
packages (e.g. `style: add missing semicolons`) and for docs changes that are not related to a | ||
specific package (e.g. `docs: fix typo in tutorial`). | ||
### Subject | ||
The subject contains a succinct description of the change: | ||
* use the imperative, present tense: "change" not "changed" nor "changes" | ||
* don't capitalize the first letter | ||
* no dot (.) at the end | ||
|
||
### Body | ||
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes". | ||
The body should include the motivation for the change and contrast this with previous behavior. | ||
|
||
### Footer | ||
The footer should contain any information about **Breaking Changes** and is also the place to reference GitHub issues that this commit **Closes**. | ||
|
||
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this. | ||
|
||
|
||
[coc]: https://github.com/MODFLOW-USGS/modflow6/blob/develop/CODE_OF_CONDUCT.md | ||
[dev-doc]: https://github.com/MODFLOW-USGS/modflow6/blob/develop/DEVELOPER.md | ||
[github]: https://github.com/MODFLOW-USGS/modflow6 | ||
[stackoverflow]: http://stackoverflow.com/questions/tagged/modflow6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# Building and Testing MODFLOW 6 | ||
|
||
This document describes how to set up your development environment to build and test MODFLOW 6. | ||
It also explains the basic mechanics of using `git`. | ||
|
||
* [Prerequisite Software](#prerequisite-software) | ||
* [Getting the Sources](#getting-the-sources) | ||
* [Installing NPM Modules](#installing-npm-modules) | ||
* [Building](#building) | ||
* [Running Tests Locally](#running-tests-locally) | ||
|
||
See the [contribution guidelines](https://github.com/MODFLOW-USGS/modflow6/blob/develop/CONTRIBUTING.md) | ||
if you'd like to contribute to MODFLOW 6. | ||
|
||
## Prerequisite Software | ||
|
||
Before you can build and test MODFLOW 6, you must install and configure the | ||
following products on your development machine: | ||
|
||
* [Git](https://git-scm.com) and/or the **GitHub app** (for [Mac](https://mac.github.com) or | ||
[Windows](https://windows.github.com)); [GitHub's Guide to Installing | ||
Git](https://help.github.com/articles/set-up-git) is a good source of information. | ||
|
||
* [gfortran](https://gcc.gnu.org/wiki/GFortran), (version 4.9 to 8) which is used to compile MODFLOW 6 and associated utilities and generate distributable files. | ||
|
||
* (Optional) [Intel Fortran](https://software.intel.com/en-us/fortran-compilers) which is used to compile MODFLOW 6 and associated utilities and generate distributable files (if not using gfortran). | ||
|
||
* [python](https://www.python.org/) which is used to run MODFLOW 6 autotests (suggest using an Anaconda python distribution). | ||
|
||
* [flopy](https://github.com/modflowpy/flopy) which is used to run MODFLOW 6 autotests. | ||
|
||
* [pymake](https://github.com/modflowpy/pymake) which is used to run MODFLOW 6 autotests. | ||
|
||
* (Optional) [LaTeX](https://www.latex-project.org/) which is used to generate the MODFLOW 6 Input/Output document (docs/mf6io/mf6io.nightlybuild). | ||
|
||
## Getting the Sources | ||
|
||
Fork and clone the MODFLOW 6 repository: | ||
|
||
1. Login to your GitHub account or create one by following the instructions given | ||
[here](https://github.com/signup/free). | ||
2. [Fork](http://help.github.com/forking) the [main MODFLOW 6](https://github.com/MODFLOW-USGS/modflow6). | ||
3. Clone your fork of the MODFLOW 6 repository and define an `upstream` remote pointing back to the MODFLOW 6 repository that you forked in the first place. | ||
|
||
```shell | ||
# Clone your GitHub repository: | ||
git clone git@github.com:<github username>/modflow6.git | ||
|
||
# Go to the MODFLOW 6 directory: | ||
cd modflow6 | ||
|
||
# Add the main MODFLOW 6 repository as an upstream remote to your repository: | ||
git remote add upstream https://github.com/MODFLOW-USGS/modflow6.git | ||
``` | ||
|
||
## Building | ||
|
||
To build MODFLOW 6 run: | ||
|
||
```shell | ||
# Go to the pymake directory | ||
cd modflow6/pymake | ||
|
||
# run the modflow6 pymake build script | ||
python makebin.py -mc ../src/ ../bin/mf6 | ||
``` | ||
|
||
* Results are put in the bin folder. | ||
|
||
## Running Tests Locally | ||
|
||
(Optional) For complete testing as done on Travis, clone the modflow6-examples repository: | ||
|
||
```shell | ||
# Clone your GitHub repository: | ||
git clone git@github.com:<github username>/modflow6-examples.git | ||
``` | ||
* The modflow6-examples repository must be cloned in the same directory that contains the modflow6 repository. | ||
|
||
To run tests: | ||
|
||
```shell | ||
# Go to the autotest directory | ||
cd modflow6/autotests | ||
|
||
# Run all modflow6 tests (including building executables and the mfio documentation - requires installation of LaTeX | ||
nosetests -v | ||
|
||
# Build MODFLOW 6, MODFLOW 6 utilities, and all versions of MODFLOW used in comparison tests | ||
nosetests -v test000_setup.py | ||
|
||
# Build MODFLOW 6 tests generated using flopy | ||
nosetests -v test_* | ||
|
||
# Build MODFLOW 6 example tests | ||
nosetests -v test_z01_nightly_build_examples.py | ||
|
||
# Build MODFLOW 5 to 6 converter xample tests | ||
nosetests -v test_z02_nightly_build_mf5to6.py | ||
``` | ||
|
||
You should execute the test suites before submitting a PR to github. | ||
|
||
|
||
All the tests are executed on our Continuous Integration infrastructure and a PR could only be merged once the tests pass. | ||
|
||
- Travis CI fails if any of the test suites described above fails. | ||
|
||
## <a name="clang-format"></a> Formatting your source code | ||
|
||
Add some guidelines | ||
|
||
## Linting/verifying your source code | ||
|
||
Fortran linting? |
Oops, something went wrong.