diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0cc08080..23a63e6d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,10 +11,10 @@ jobs: uses: actions/checkout@v3.5.2 with: submodules: 'recursive' - - name: Step Python 3.8.12 + - name: Step Python 3.11.9 uses: actions/setup-python@v4.6.0 with: - python-version: '3.8.12' + python-version: '3.11.9' - name: Install OpenMPI for gt4py run: | sudo apt-get install libopenmpi-dev diff --git a/.github/workflows/main_unit_tests.yml b/.github/workflows/main_unit_tests.yml deleted file mode 100644 index 79e745d6..00000000 --- a/.github/workflows/main_unit_tests.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Main unit tests" -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] - -jobs: - main_unit_tests: - runs-on: ubuntu-latest - steps: - - name: Checkout Pace repository - uses: actions/checkout@v3.5.2 - with: - submodules: 'recursive' - - name: Step Python 3.8.12 - uses: actions/setup-python@v4.6.0 - with: - python-version: '3.8.12' - - name: Install OpenMPI & Boost for gt4py - run: | - sudo apt-get install libopenmpi-dev libboost1.74-dev - - name: Install Python packages - run: | - python -m pip install --upgrade pip setuptools wheel - pip install -r requirements_dev.txt -c constraints.txt - - name: Clone datafiles - run: | - mkdir -p tests/main/input && cd tests/main/input - git clone -b store_files https://github.com/mlee03/pace.git tmp && mv tmp/*.nc . && rm -rf tmp - - name: Run all main tests - run: | - python -m pytest -x tests/main diff --git a/.github/workflows/main_unit_tests_mpich.yaml b/.github/workflows/main_unit_tests_mpich.yaml index ee469b7a..9804bc15 100644 --- a/.github/workflows/main_unit_tests_mpich.yaml +++ b/.github/workflows/main_unit_tests_mpich.yaml @@ -12,7 +12,7 @@ jobs: main_unit_tests: runs-on: ubuntu-latest container: - image: ghcr.io/noaa-gfdl/pace_mpich:3.8 + image: ghcr.io/noaa-gfdl/pace_mpich:3.11.9 steps: - name: Checkout Pace repository uses: actions/checkout@v4 diff --git a/.github/workflows/main_unit_tests_openmpi.yaml b/.github/workflows/main_unit_tests_openmpi.yaml index edb9b0f0..fcb19de2 100644 --- a/.github/workflows/main_unit_tests_openmpi.yaml +++ b/.github/workflows/main_unit_tests_openmpi.yaml @@ -12,7 +12,7 @@ jobs: main_unit_tests: runs-on: ubuntu-latest container: - image: ghcr.io/noaa-gfdl/pace_openmpi:3.8 + image: ghcr.io/noaa-gfdl/pace_openmpi:3.11.9 steps: - name: Checkout Pace repository uses: actions/checkout@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a6f865f7..3994470d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,9 +15,10 @@ repos: args: ["--profile", "black"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.812 + rev: v1.4.1 hooks: - id: mypy + additional_dependencies: [types-pyyaml] name: mypy-pace files: pace args: [--config-file, setup.cfg] diff --git a/NDSL b/NDSL index 61c4cbe5..c52a719a 160000 --- a/NDSL +++ b/NDSL @@ -1 +1 @@ -Subproject commit 61c4cbe51dd20e7d9eba50ea9f9b2427a20e0a80 +Subproject commit c52a719af75882752079331abe3ad8ad8dd3e386 diff --git a/constraints.txt b/constraints.txt index 5c88c4ca..0d520450 100644 --- a/constraints.txt +++ b/constraints.txt @@ -1,135 +1,132 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # pip-compile --output-file=constraints.txt requirements_dev.txt requirements_docs.txt requirements_lint.txt # -aenum==3.1.11 +aenum==3.1.15 # via dace -aiohttp==3.7.4.post0 +aiohttp==3.9.5 # via gcsfs +aiosignal==1.3.1 + # via aiohttp alabaster==0.7.12 # via sphinx appdirs==1.4.4 # via fv3config asciitree==0.3.3 # via zarr -asttokens==2.0.5 +asttokens==2.4.1 # via # devtools # stack-data astunparse==1.6.3 - # via - # dace - # gt4py -async-timeout==3.0.1 - # via aiohttp -attrs==22.1.0 + # via dace +attrs==23.2.0 # via # aiohttp # gt4py # jsonschema - # pytest + # referencing babel==2.9.1 # via sphinx -backcall==0.2.0 - # via ipython backports-entry-points-selectable==1.1.1 # via virtualenv -black==22.3.0 +black==24.4.0 # via gt4py -boltons==21.0.0 +boltons==24.0.0 # via gt4py cached-property==1.5.2 # via gt4py -cachetools==4.2.2 +cachetools==5.3.3 # via google-auth -certifi==2021.5.30 +certifi==2024.2.2 # via # netcdf4 # requests cfgv==3.3.1 # via pre-commit -cftime==1.5.0 +cftime==1.6.3 # via - # -r requirements_dev.txt # ndsl # netcdf4 -chardet==4.0.0 - # via aiohttp -charset-normalizer==2.0.4 +charset-normalizer==3.3.2 # via requests -click==8.0.1 +click==8.1.7 # via # black + # dask # gt4py -cloudpickle==2.0.0 +cloudpickle==3.0.0 # via dask -cmake==3.26.4 - # via gt4py +cmake==3.29.2 + # via + # dace + # gt4py +comm==0.2.2 + # via ipykernel commonmark==0.9.1 # via recommonmark -coverage==5.5 +coverage==7.5.0 # via pytest-cov -cytoolz==0.12.1 +cytoolz==0.12.3 # via gt4py -dace - # via ndsl -dacite==1.6.0 +dacite==1.8.1 # via # fv3config # pace -dask==2021.12.0 - # via - # -r requirements_dev.txt - # ndsl -debugpy==1.6.3 +dask==2024.4.2 + # via ndsl +debugpy==1.8.1 # via ipykernel -decorator==5.0.9 +decorator==5.1.1 # via # gcsfs # ipython -deepdiff==6.2.1 +deepdiff==7.0.1 # via gt4py -devtools==0.8.0 +devtools==0.12.2 # via gt4py -dill==0.3.5.1 +dill==0.3.8 # via dace distlib==0.3.2 # via virtualenv +distro==1.9.0 + # via scikit-build docutils==0.16 # via # recommonmark # sphinx # sphinx-rtd-theme -entrypoints==0.4 - # via jupyter-client -executing==0.8.2 +executing==2.0.1 # via # devtools # stack-data -f90nml==1.3.1 +f90nml==1.4.4 # via - # -r requirements_dev.txt # fv3config # ndsl # pyfv3 # pyshield factory-boy==3.3.0 # via gt4py -faker==24.3.0 +faker==24.11.0 # via factory-boy -fasteners==0.16.3 +fasteners==0.19 # via zarr -fastjsonschema==2.16.2 +fastjsonschema==2.19.1 # via nbformat filelock==3.0.12 # via virtualenv fparser==0.1.4 # via dace -frozendict==2.3.4 +frozendict==2.4.2 # via gt4py -fsspec==2021.7.0 +frozenlist==1.4.1 + # via + # aiohttp + # aiosignal +fsspec==2024.3.1 # via # dask # fv3config @@ -137,225 +134,234 @@ fsspec==2021.7.0 # ndsl fv3config==0.9.0 # via -r requirements_dev.txt -gcsfs==2021.7.0 +gcsfs==2024.3.1 # via fv3config -google-auth==2.0.1 +google-api-core==2.18.0 + # via + # google-cloud-core + # google-cloud-storage +google-auth==2.29.0 # via # gcsfs + # google-api-core # google-auth-oauthlib -google-auth-oauthlib==0.4.5 + # google-cloud-core + # google-cloud-storage +google-auth-oauthlib==1.2.0 + # via gcsfs +google-cloud-core==2.4.1 + # via google-cloud-storage +google-cloud-storage==2.16.0 # via gcsfs -gprof2dot==2021.2.21 +google-crc32c==1.5.0 + # via + # google-cloud-storage + # google-resumable-media +google-resumable-media==2.7.0 + # via google-cloud-storage +googleapis-common-protos==1.63.0 + # via google-api-core +gprof2dot==2022.7.29 # via pytest-profiling gridtools-cpp==2.3.2 # via gt4py -gt4py +h5netcdf==1.3.0 # via ndsl -h5netcdf==1.1.0 - # via ndsl -h5py==3.10.0 +h5py==3.11.0 # via h5netcdf identify==2.2.13 # via pre-commit -idna==3.2 +idna==3.7 # via # requests # yarl imagesize==1.2.0 # via sphinx -importlib-resources==5.10.0 - # via - # gt4py - # jsonschema -iniconfig==1.1.1 +importlib-metadata==7.1.0 + # via dask +iniconfig==2.0.0 # via pytest -ipykernel==6.16.2 +ipykernel==6.29.4 # via nbmake -ipython==8.5.0 +ipython==8.23.0 # via ipykernel -jedi==0.18.1 +jedi==0.19.1 # via ipython -jinja2==3.0.1 +jinja2==3.1.3 # via # dace # gt4py # sphinx -jsonschema==4.16.0 +jsonschema==4.21.1 # via nbformat -jupyter-client==7.4.4 +jsonschema-specifications==2023.12.1 + # via jsonschema +jupyter-client==8.6.1 # via # ipykernel # nbclient -jupyter-core==4.11.2 +jupyter-core==5.7.2 # via + # ipykernel # jupyter-client # nbformat -lark==1.1.5 +lark==1.1.9 # via gt4py -locket==0.2.1 +locket==1.0.0 # via partd -mako==1.1.6 +mako==1.3.3 # via gt4py -markupsafe==2.0.1 +markupsafe==2.1.5 # via # jinja2 # mako -matplotlib-inline==0.1.6 +matplotlib-inline==0.1.7 # via # ipykernel # ipython mpi4py==3.1.5 # via - # -r requirements_dev.txt # ndsl # pace -mpmath==1.2.1 +mpmath==1.3.0 # via sympy -multidict==5.1.0 +multidict==6.0.5 # via # aiohttp # yarl -mypy-extensions==0.4.3 +mypy-extensions==1.0.0 # via black -nanobind==1.8.0 +nanobind==1.9.2 # via gt4py nbclient==0.6.8 # via nbmake -nbformat==5.7.0 +nbformat==5.10.4 # via # nbclient # nbmake -nbmake==1.3.4 +nbmake==1.5.3 # via -r requirements_dev.txt -nest-asyncio==1.5.6 +nest-asyncio==1.6.0 # via # ipykernel - # jupyter-client # nbclient -netcdf4==1.6.4 +netcdf4==1.6.5 # via - # -r requirements_dev.txt # ndsl # pace -networkx==2.6.3 +networkx==3.3 # via dace -ninja==1.11.1 +ninja==1.11.1.1 # via gt4py nodeenv==1.6.0 # via pre-commit -numcodecs==0.7.2 +numcodecs==0.12.1 # via zarr -numpy==1.23.3 +numpy==1.26.4 # via - # -r requirements_dev.txt # cftime # dace # gt4py # h5py # netcdf4 # numcodecs - # pace # pandas # pyfv3 # pyshield # scipy # xarray # zarr -oauthlib==3.1.1 +oauthlib==3.2.2 # via requests-oauthlib ordered-set==4.1.0 # via deepdiff -packaging==21.0 +packaging==24.0 # via + # black # dask # gt4py # h5netcdf # ipykernel # pytest + # scikit-build # setuptools-scm # sphinx -pandas==1.3.2 + # xarray +pandas==2.2.2 # via xarray -parso==0.8.3 +parso==0.8.4 # via jedi -partd==1.2.0 +partd==1.4.1 # via dask -pathspec==0.9.0 +pathspec==0.12.1 # via black -pexpect==4.8.0 +pexpect==4.9.0 # via ipython -pickleshare==0.7.5 - # via ipython -pkgutil-resolve-name==1.3.10 - # via jsonschema platformdirs==2.6.2 # via # black + # jupyter-core # virtualenv -pluggy==0.13.1 +pluggy==1.5.0 # via pytest ply==3.11 # via dace pre-commit==2.14.0 # via -r requirements_lint.txt -prompt-toolkit==3.0.31 +prompt-toolkit==3.0.43 # via ipython -psutil==5.9.3 +proto-plus==1.23.0 + # via google-api-core +protobuf==4.25.3 + # via + # google-api-core + # googleapis-common-protos + # proto-plus +psutil==5.9.8 # via ipykernel ptyprocess==0.7.0 # via pexpect pure-eval==0.2.2 # via stack-data -py==1.10.0 - # via pytest -pyasn1==0.4.8 +pyasn1==0.6.0 # via # pyasn1-modules # rsa -pyasn1-modules==0.2.8 +pyasn1-modules==0.4.0 # via google-auth -pybind11==2.11.1 +pybind11==2.12.0 # via gt4py -pydantic==1.7.4 - # via nbmake -pygments==2.10.0 +pygments==2.17.2 # via + # devtools # ipython # nbmake # sphinx -pyparsing==2.4.7 - # via packaging -pyrsistent==0.18.1 - # via jsonschema -pytest==6.2.4 +pytest==8.1.1 # via - # -r requirements_dev.txt # nbmake # pytest-cov # pytest-datadir # pytest-profiling # pytest-regressions - # pytest-subtests -pytest-cov==2.12.1 +pytest-cov==5.0.0 # via -r requirements_dev.txt -pytest-datadir==1.3.1 +pytest-datadir==1.5.0 # via pytest-regressions pytest-profiling==1.7.0 # via -r requirements_dev.txt -pytest-regressions==2.2.0 - # via -r requirements_dev.txt -pytest-subtests==0.5.0 +pytest-regressions==2.5.0 # via -r requirements_dev.txt -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # faker # jupyter-client # pandas -pytz==2021.1 +pytz==2024.1 # via # babel # pandas -pyyaml==5.4.1 +pyyaml==6.0.1 # via # dace # dask @@ -363,32 +369,41 @@ pyyaml==5.4.1 # pace # pre-commit # pytest-regressions -pyzmq==24.0.1 +pyzmq==26.0.2 # via # ipykernel # jupyter-client recommonmark==0.7.1 # via -r requirements_docs.txt -requests==2.26.0 +referencing==0.35.0 + # via + # jsonschema + # jsonschema-specifications +requests==2.31.0 # via # gcsfs + # google-api-core + # google-cloud-storage # requests-oauthlib # sphinx -requests-oauthlib==1.3.0 +requests-oauthlib==2.0.0 # via google-auth-oauthlib -rsa==4.7.2 - # via google-auth -scipy==1.10.1 +rpds-py==0.18.0 # via - # -r requirements_dev.txt - # ndsl + # jsonschema + # referencing +rsa==4.9 + # via google-auth +scikit-build==0.17.6 + # via dace +scipy==1.13.0 + # via ndsl setuptools-scm==8.0.4 # via fparser six==1.16.0 # via # asttokens # astunparse - # fasteners # pytest-profiling # python-dateutil # virtualenv @@ -419,32 +434,26 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -stack-data==0.5.1 +stack-data==0.6.3 # via ipython -sympy==1.9 +sympy==1.12 # via dace tabulate==0.9.0 # via gt4py toml==0.10.2 - # via - # pre-commit - # pytest - # pytest-cov -tomli==1.2.1 - # via - # black - # setuptools-scm -toolz==0.11.1 + # via pre-commit +toolz==0.12.1 # via # cytoolz # dask # partd -tornado==6.2 +tornado==6.4 # via # ipykernel # jupyter-client -traitlets==5.5.0 +traitlets==5.14.3 # via + # comm # ipykernel # ipython # jupyter-client @@ -452,40 +461,42 @@ traitlets==5.5.0 # matplotlib-inline # nbclient # nbformat -typing-extensions==4.3.0 +types-pyyaml==6.0.12.20240311 + # via pace +typing-extensions==4.5.0 # via - # aiohttp - # black - # faker # gt4py + # ipython # setuptools-scm -urllib3==1.26.6 +tzdata==2024.1 + # via pandas +urllib3==2.2.1 # via requests virtualenv==20.7.2 # via pre-commit -wcwidth==0.2.5 +wcwidth==0.2.13 # via prompt-toolkit -websockets==10.3 +websockets==12.0 # via dace -wheel==0.37.0 - # via astunparse -xarray==0.19.0 +wheel==0.43.0 + # via + # astunparse + # scikit-build +xarray==2024.3.0 # via - # -r requirements_dev.txt # ndsl - # pace # pyfv3 # pyshield -xxhash==2.0.2 +xxhash==3.0.0 # via gt4py -yarl==1.6.3 +yarl==1.9.4 # via aiohttp -zarr==2.9.2 +zarr==2.17.2 # via # -r requirements_dev.txt # pace -zipp==3.8.0 - # via importlib-resources +zipp==3.18.1 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/examples/configs/baroclinic_c12_orch_cpu.yaml b/examples/configs/baroclinic_c12_orch_cpu.yaml index d70699a1..6e29da06 100644 --- a/examples/configs/baroclinic_c12_orch_cpu.yaml +++ b/examples/configs/baroclinic_c12_orch_cpu.yaml @@ -14,7 +14,7 @@ performance_config: nx_tile: 12 nz: 79 dt_atmos: 225 -minutes: 5 +seconds: 225 layout: - 1 - 1 @@ -73,3 +73,8 @@ physics_config: hydrostatic: false nwat: 6 do_qa: true + +grid_config: + type: generated + config: + eta_file: 'tests/main/input/eta79.nc' diff --git a/pyFV3 b/pyFV3 index 67f1b5c6..2ec1bf3b 160000 --- a/pyFV3 +++ b/pyFV3 @@ -1 +1 @@ -Subproject commit 67f1b5c6e364cdb617f71c3732851681396cea55 +Subproject commit 2ec1bf3b5004c5c4b9f993f9b3a4f96cf4686323 diff --git a/requirements_dev.txt b/requirements_dev.txt index c8bbf8a0..3511cf1d 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,19 +1,9 @@ -pytest -pytest-subtests pytest-regressions pytest-profiling pytest-cov -scipy nbmake -mpi4py -xarray zarr -dask>=2021.10.0 -netCDF4 -cftime -fv3config>=0.9.0 -f90nml>=1.1.0 -numpy>=1.15 +fv3config -e NDSL -e pySHiELD -e pyFV3 diff --git a/requirements_docs.txt b/requirements_docs.txt index 02306dcc..54bae3b4 100644 --- a/requirements_docs.txt +++ b/requirements_docs.txt @@ -1,5 +1,5 @@ recommonmark -sphinx>=1.4 +sphinx sphinx-argparse sphinx_rtd_theme sphinx-gallery diff --git a/setup.cfg b/setup.cfg index 7a5ea7d5..e3f40d1f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,6 +29,6 @@ ignore_missing_imports = True follow_imports = normal namespace_packages = True strict_optional = False -mypy_path = model:NDSL:pySHiELD:pyFV3 +mypy_path = NDSL:pySHiELD:pyFV3 warn_unreachable = True explicit_package_bases = True diff --git a/setup.py b/setup.py index 29c9899a..b9e509fc 100644 --- a/setup.py +++ b/setup.py @@ -15,10 +15,9 @@ def local_pkg(name: str, relative_path: str) -> str: "dacite", "pyyaml", "mpi4py", - "numpy", "netCDF4", - "xarray", "zarr", + "types-pyyaml", ]