Skip to content

Commit

Permalink
Merge pull request #1594 from MODFLOW-USGS/v6.4.3
Browse files Browse the repository at this point in the history
Release 6.4.3
  • Loading branch information
wpbonelli authored Feb 7, 2024
2 parents 43f6198 + 196bb42 commit be6d39f
Show file tree
Hide file tree
Showing 657 changed files with 49,590 additions and 33,708 deletions.
2 changes: 1 addition & 1 deletion .build_rtd_docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ PROJECT_NAME = "MODFLOW 6"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "version 6.2.2"
PROJECT_NUMBER = "version 6.5.0.dev0"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
17 changes: 12 additions & 5 deletions .build_rtd_docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@
# copy the file
shutil.copy(src, dst)

# -- copy deprecations markdown ---------------------------------------------
print("Copy the deprecations table")
dstdir = "_mf6run"
fpth = "deprecations.md"
src = os.path.join("..", "doc", "mf6io", "mf6ivar", "md", fpth)
dst = os.path.join(dstdir, fpth)
# copy the file
shutil.copy(src, dst)

# -- build the mf6io markdown files -----------------------------------------
print("Build the mf6io markdown files")
pth = os.path.join("..", "doc", "mf6io", "mf6ivar")
Expand Down Expand Up @@ -140,11 +149,9 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

html_context = {
"css_files": [
"_static/theme_overrides.css", # override wide tables in RTD theme
],
}
html_css_files = [
"_static/theme_overrides.css", # override wide tables in RTD theme
]

# html_theme_options = {
# "github_url": "https://github.com/MODFLOW-USGS/modflow6",
Expand Down
1 change: 1 addition & 0 deletions .build_rtd_docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ Contents:
MODFLOW 6 Source Code Documentation <https://modflow-usgs.github.io/modflow6/>
mf6io
_mf6run/run-time-comparison.md
_mf6run/deprecations.md

3 changes: 2 additions & 1 deletion .build_rtd_docs/requirements.rtd.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
numpy
bmipy
sphinx>=4
sphinx_markdown_tables
nbsphinx
nbsphinx_link
ipython
ipykernel
rtds_action
myst-parser
sphinx_rtd_theme
sphinx_rtd_theme>=1
pytest
filelock
modflow-devtools
7 changes: 3 additions & 4 deletions .doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,13 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

html_context = {
"github_repo": "modflow6",
"doc_path": ".doc",
"css_files": [
"_static/theme_overrides.css", # override wide tables in RTD theme
],
}
html_css_files = [
"_static/theme_overrides.css", # override wide tables in RTD theme
]

html_theme_options = {}

Expand Down
3 changes: 2 additions & 1 deletion .doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ sphinx_markdown_tables
ipython
ipykernel
rtds_action
sphinx_rtd_theme
sphinx>=4
sphinx_rtd_theme>=1
myst-parser
2 changes: 1 addition & 1 deletion .fprettify.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MODFLOW 6 configuration for fprettify
# run from root directory using
# fprettify -c distribution/.fprettify.yaml SRC
# fprettify -c .fprettify.yaml SRC
whitespace-plusminus: 1
whitespace-multdiv: 1
line-length: 82
Expand Down
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@
*.png binary
*.jpg binary
*.pdf binary

# Configure github-linguist
*.inc linguist-language=Fortran
.build_rtd_docs/** linguist-documentation
.doc/** linguist-documentation
9 changes: 5 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ assignees: ''
**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
**To reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
Expand All @@ -23,6 +23,7 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. macOS, Linux, Windows]
- Version [e.g. 22]
**Environment**
- Operating system (e.g. macOS, Linux, Windows) and version
- MODFLOW 6 version (if installed via distribution)
- Compiler toolchain/version (if built from source)
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Feel free to remove check-list items that aren't relevant to your change.

- [ ] Closes #xxxx
- [ ] Passed autotests
- [ ] Formatted source files with `fprettify`
- [ ] Updated definition (*.dfn) files with new or modified options
- [ ] Described new options, features or behavior changes in release notes
- [ ] Updated meson files, makefiles, and Visual Studio project files if new source files added
8 changes: 4 additions & 4 deletions .github/common/fortran_format_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
]

# Exclude these files from checks
excludefiles = ["src/Utilities/InputOutput.f90"] # excluded until refactored
excludefiles = [] # add excluded files here


class FortranFormatCheck:
"""
Expand Down Expand Up @@ -99,16 +100,15 @@ def _excluded(self, path: Path) -> bool:

return False


if __name__ == "__main__":
parser = argparse.ArgumentParser(
"MODFLOW 6 fortran format source code verification"
)
parser.add_argument(
"-r", "--root", help="path to MODFLOW 6 repository root directory"
)
parser.add_argument(
"-v", "--verbose", action="store_true", help="verbose"
)
parser.add_argument("-v", "--verbose", action="store_true", help="verbose")
args = parser.parse_args()

# set MODFLOW 6 repository root
Expand Down
68 changes: 68 additions & 0 deletions .github/common/msvs_vfproj_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import xml.etree.ElementTree as ET
from pathlib import Path


def get_source_files(src_folder):
p = Path(".")
src_files = []
print(f"Processing {src_folder} folder")
ftypes = ("*.[fF]9[05]", "*.inc")
src_files = []
for ft in ftypes:
src_files.extend(p.glob(f"{src_folder}/**/{ft}"))
return src_files


def get_msvs_files(vfproj_file):
print(f"Processing {vfproj_file}")
tree = ET.parse(vfproj_file)
root = tree.getroot()
msvs_files = []
for f in root.iter("File"):
s = f.attrib["RelativePath"]
s = s.replace("\\", "/")
s = s.replace("../", "")
fpath = Path(s)
msvs_files.append(fpath)
return msvs_files


def check_files(name, src_files, msvs_files):
print(
f"Verifying {name} files referenced in msvs project files are in src folder..."
)
s, m = set(src_files), set(msvs_files)
diff = s ^ m
from pprint import pformat

assert not any(diff), (
f"{name} src files don't match msvs project file\n"
f"=> symmetric difference:\n{pformat(diff)}\n"
f"=> src - msvs:\n{pformat(s - m)}\n"
f"=> msvs - src:\n{pformat(m - s)}\n"
"Check to make sure msvs project file is consistent with source files."
)


def check_mf6():
# get list of source files and files referenced in msvs project files
src_files = get_source_files("src")
msvs_files = []
for vfproj in ["./msvs/mf6core.vfproj", "./msvs/mf6.vfproj"]:
msvs_files.extend(get_msvs_files(vfproj))
check_files("MF6", src_files, msvs_files)


def check_bmi():
# get list of source files and files referenced in msvs project files
src_files = get_source_files("srcbmi")
msvs_files = []
for vfproj in ["./msvs/mf6bmi.vfproj"]:
msvs_files.extend(get_msvs_files(vfproj))
check_files("BMI", src_files, msvs_files)


if __name__ == "__main__":
check_mf6()
check_bmi()
print("msvs project (vfproj) files appear up-to-date...")
35 changes: 35 additions & 0 deletions .github/common/update_compat_tables.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""
Inserts Markdown compatibility tables
between tags in target Markdown file.
"""

import re
import sys
from pathlib import Path

name = sys.argv[1] # name of the table, e.g. "compile", "test"
compat_path = Path(sys.argv[2]) # compatibility table path
update_path = Path(sys.argv[3]) # path to file to update

assert compat_path.is_file()
assert update_path.is_file()

with open(compat_path, "r") as compat:
table = "".join(compat.readlines())
r = re.compile(
r"<!\-\- "
+ name
+ r" compat starts \-\->.*<!\-\- "
+ name
+ r" compat ends \-\->",
re.DOTALL,
)
ct = (
"<!-- "
+ name
+ " compat starts -->{}<!-- ".format("\n{}\n".format(table))
+ name
+ " compat ends -->"
)
readme = update_path.open().read()
update_path.open("w").write(r.sub(ct, readme))
39 changes: 39 additions & 0 deletions .github/common/wide_compat_reports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""
Converts compatibility reports from long to wide format
and makes a markdown table from the wide format report.
"""

from pathlib import Path
import pandas as pd
import sys

ip = Path(sys.argv[1]) # input file path
op = Path(sys.argv[2]) # output file path
assert ip.is_file()
assert ip.suffix == ".csv"
assert op.suffix == ".csv"

# read long CSV
df = pd.read_csv(ip)

# pivot and sort
df = pd.pivot(
df,
index="runner",
columns=["compiler", "version"],
values="support",
).sort_values(by=["runner"])

# write wide CSV
df.to_csv(op)

# write wide markdown table
with open(op.with_suffix(".md"), "w") as file:
file.write(
df.to_markdown()
.replace("nan", "")
.replace("(", "")
.replace(")", "")
.replace(",", "")
.replace("'", "")
)
9 changes: 9 additions & 0 deletions .github/compat/comp.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
compiler,gcc,gcc,gcc,gcc,gcc,gcc,gcc,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel
version,10,11,12,13,7,8,9,2021.1,2021.10,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7,2021.8,2021.9,2021.1,2021.2,2021.4,2022.0,2022.1,2022.2.1,2022.2,2023.0,2023.1,2023.2
runner,,,,,,,,,,,,,,,,,,,,,,,,,,,
macos-11,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,,,,,,,,,,
macos-12,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,,,,,,,,,,
ubuntu-20.04,&check;,&check;,,,&check;,&check;,&check;,&check;,&check;,&check;,,&check;,&check;,&check;,&check;,&check;,&check;,,,,,,&check;,&check;,,,&check;
ubuntu-22.04,&check;,&check;,&check;,&check;,,,&check;,&check;,&check;,&check;,,&check;,&check;,&check;,&check;,&check;,&check;,,,,,,&check;,&check;,,,&check;
windows-2019,&check;,&check;,&check;,&check;,,,&check;,,&check;,,,,,&check;,&check;,&check;,&check;,,,,,,,&check;,,,&check;
windows-2022,&check;,&check;,&check;,&check;,,,&check;,,&check;,,,,,&check;,&check;,&check;,&check;,,,,,,,&check;,,,&check;
9 changes: 9 additions & 0 deletions .github/compat/test.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
compiler,gcc,gcc,gcc,gcc,gcc,gcc,gcc,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel
version,10,11,12,13,7,8,9,2021.1,2021.10,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7,2021.8,2021.9,2021.1,2021.2,2021.4,2022.0,2022.1,2022.2.1,2022.2,2023.0,2023.1,2023.2
runner,,,,,,,,,,,,,,,,,,,,,,,,,,,
macos-11,&check;,&check;,&check;,&check;,&check;,&check;,&check;,&check;,,&check;,&check;,&check;,&check;,&check;,&check;,,,,,,,,,,,,
macos-12,&check;,&check;,&check;,&check;,,,,&check;,,&check;,&check;,&check;,&check;,&check;,&check;,,,,,,,,,,,,
ubuntu-20.04,&check;,&check;,,,&check;,&check;,&check;,&check;,,&check;,,&check;,&check;,&check;,&check;,,,,,,,,,,,,
ubuntu-22.04,&check;,&check;,&check;,&check;,,,&check;,&check;,,&check;,,&check;,&check;,&check;,&check;,,,,,,,,,,,,
windows-2019,,,,&check;,,,,,,,,,,&check;,&check;,,,,,,,,,,,,
windows-2022,&check;,&check;,&check;,&check;,,,&check;,,,,,,,&check;,&check;,,,,,,,,,,,,
Loading

0 comments on commit be6d39f

Please sign in to comment.