Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI updates and add Python 3.11 remove Python 3.7 and 3.8 #213

Merged
merged 15 commits into from
Feb 2, 2024
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
# Check for updates once a week
interval: 'weekly'
42 changes: 24 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ on:
push:
pull_request:
workflow_dispatch:
# schedule:
# - cron: '0 0 * * *' # Daily “At 00:00”
schedule:
- cron: '0 0 * * *' # Daily “At 00:00”

jobs:
test:
# if: |
# github.repository == 'NCAR/wrf-python'
name: Python (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
Expand All @@ -19,32 +17,40 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest"]
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
os: [ "ubuntu-latest", "macos-latest", "macos-14" ]
python-version: [ "3.9", "3.10", "3.11" ]

steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ github.token }}
- name: Conda setup
- name: Conda setup (Linux)
uses: conda-incubator/setup-miniconda@v2
if: matrix.os == 'ubuntu-latest'
with:
activate-environment: wrf_python_build
python-version: ${{ matrix.python-version }}
channels: conda-forge, ncar
- name: Conda install (Darwin)
channels: conda-forge
environment-file: build_envs/Linux.yml
- name: Conda setup (macOS)
uses: conda-incubator/setup-miniconda@v2
if: matrix.os == 'macos-latest'
run: |
conda env update --file build_envs/Darwin.yml --prune
- name: Conda install (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
conda env update --file build_envs/Linux.yml --prune
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
environment-file: build_envs/Darwin.yml
- name: Conda setup (macOS M1)
uses: conda-incubator/setup-miniconda@v2
if: matrix.os == 'macos-14'
with:
installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Mambaforge-23.11.0-0-MacOSX-arm64.sh
python-version: ${{ matrix.python-version }}
channels: conda-forge
environment-file: build_envs/environment.yml
- name: Build WRF-Python
run: |
cd build_scripts
Expand Down
21 changes: 21 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "mambaforge-4.10"
jobs:
post_create_environment:
- python -m pip install --no-cache-dir .

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/source/conf.py

conda:
environment: build_envs/environment.yml
2 changes: 1 addition & 1 deletion build_envs/Darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- jupyter
- matplotlib
- netcdf4
- numpy!=1.24.3
- numpy
- pycodestyle
- setuptools
- sphinx
Expand Down
2 changes: 1 addition & 1 deletion build_envs/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- jupyter
- matplotlib
- netcdf4
- numpy!=1.24.3
- numpy
- pycodestyle
- setuptools
- sphinx
Expand Down
2 changes: 1 addition & 1 deletion build_envs/Win64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- m2w64-toolchain
- matplotlib
- netcdf4
- numpy!=1.24.3
- numpy
- pycodestyle
- setuptools
- sphinx
Expand Down
20 changes: 20 additions & 0 deletions build_envs/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Create full conda environment for development, including some useful tools
name: wrf_python_build
channels:
- conda-forge
dependencies:
- python>=3.9, <3.12
- compilers
- basemap
- cartopy
- jupyter
- matplotlib
- netcdf4
- numpy
- pycodestyle
- setuptools
- sphinx
- sphinx_rtd_theme
- wrapt
- xarray

6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Fortran",
"Programming Language :: Python :: 3.7",
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Topic :: Software Development",
"Operating System :: POSIX",
Expand Down
Loading