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
Merged
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'
35 changes: 17 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,33 @@ 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" ]
erogluorhan marked this conversation as resolved.
Show resolved Hide resolved
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
uses: conda-incubator/setup-miniconda@v2
if: matrix.os != 'macos-14'
with:
activate-environment: wrf_python_build
python-version: ${{ matrix.python-version }}
channels: conda-forge, ncar
- name: Conda install (Darwin)
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
channels: conda-forge
environment-file: build_envs/environment.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
erogluorhan marked this conversation as resolved.
Show resolved Hide resolved
- 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
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

3 changes: 3 additions & 0 deletions build_envs/platform-specific/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
These platform specific environment files are included here for reference only and not actively tested or maintained.

We have moved to a single environment file (../environment.yml) for all platforms.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: wrf_python_build
channels:
- conda-forge
dependencies:
- python=3
- python<3.12
- basemap
- cartopy
- gcc_linux-64
- gfortran_linux-64
- jupyter
- matplotlib
- netcdf4
- numpy!=1.24.3
- numpy
- pycodestyle
- setuptools
- sphinx
Expand Down
21 changes: 21 additions & 0 deletions build_envs/platform-specific/macos_arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Create full conda environment for development, including some useful tools
name: wrf_python_build
channels:
- conda-forge
dependencies:
- python<3.12
- basemap
- cartopy
- clang_osx-arm64
- gfortran_osx-arm64
- jupyter
- matplotlib
- netcdf4
- numpy
- pycodestyle
- setuptools
- sphinx
- sphinx_rtd_theme
- wrapt
- xarray

Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: wrf_python_build
channels:
- conda-forge
dependencies:
- python=3
- python<3.12
- basemap
- cartopy
- clang_osx-64
- gfortran_osx-64
- jupyter
- matplotlib
- netcdf4
- numpy!=1.24.3
- numpy
- pycodestyle
- setuptools
- sphinx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ channels:
- conda-forge
- msys2
dependencies:
- python=3
- python<3.12
- basemap
- cartopy
- jupyter
- m2w64-toolchain
- matplotlib
- netcdf4
- numpy!=1.24.3
- numpy
- pycodestyle
- setuptools
- sphinx
Expand Down
21 changes: 3 additions & 18 deletions doc/source/contrib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,28 +294,13 @@ contributing is:

git remote add ncar https://github.com/ncar/wrf-python.git

- To create the development environment, you'll need to run the appropriate
command below for your operating system.

OSX:

.. code::

conda env create -f build_envs/Darwin.yml

Linux:

.. code::

conda env create -f build_envs/Linux.yml

Win64:
- To create the development environment, you'll need to run the command below:

.. code::

conda env create -f build_envs/Win64.yml
conda env create -f build_envs/environment.yml

Note: For Win64, you will also need VS2015 installed on your system.
Note: For Windows, you will also need Visual Studio installed on your system.

- Activate your conda environment.

Expand Down
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