Skip to content

Commit c6f4737

Browse files
authored
Restructuring repo (NCAR#150)
* Restructured folders and env files and some docs in regards * Additional refactoring to file names * Github actions configured fully * Corrected ubuntu vs win64 bug in CI * Windows build fix * Trying to fix Windows build tests * Continue fixing windows build tests * ANother fixing attempt on windows build tests * Stil attempting to fix * Another attempt to fix * Little correction in config * Still trying to get windows build tests done * Maybe this time * try a different windows build bat * Another attempt * Trying vs2015 installation * again * Gave up windows build tests * Remove CircleCI config * Corrected env namein docs * Sorted env files alphabetically
1 parent e2b6174 commit c6f4737

File tree

9 files changed

+93
-188
lines changed

9 files changed

+93
-188
lines changed

.circleci/conda_env.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.circleci/config.yml

Lines changed: 0 additions & 99 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
# schedule:
7+
# - cron: '0 0 * * *' # Daily “At 00:00”
8+
9+
jobs:
10+
test:
11+
# if: |
12+
# github.repository == 'NCAR/wrf-python'
13+
name: Python (${{ matrix.python-version }}, ${{ matrix.os }})
14+
runs-on: ${{ matrix.os }}
15+
defaults:
16+
run:
17+
shell: bash -l {0}
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ "ubuntu-latest", "macos-latest"]
23+
python-version: [ "3.6", "3.7", "3.8", "3.9" ]
24+
25+
steps:
26+
- name: Cancel previous runs
27+
uses: styfle/cancel-workflow-action@0.9.0
28+
with:
29+
access_token: ${{ github.token }}
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
with:
33+
token: ${{ github.token }}
34+
- name: Conda setup
35+
uses: conda-incubator/setup-miniconda@v2
36+
with:
37+
activate-environment: wrf_python_build
38+
python-version: ${{ matrix.python-version }}
39+
channels: conda-forge, ncar
40+
- name: Conda install (Darwin)
41+
if: matrix.os == 'macos-latest'
42+
run: |
43+
conda env update --file build_envs/Darwin.yml --prune
44+
- name: Conda install (Linux)
45+
if: matrix.os == 'ubuntu-latest'
46+
run: |
47+
conda env update --file build_envs/Linux.yml --prune
48+
- name: Build WRF-Python
49+
run: |
50+
cd build_scripts
51+
./gnu_omp.sh
52+
cd ..
53+
- name: Run tests
54+
run: |
55+
cd test/ci_tests
56+
python utests.py
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# Create full conda environment for development, including some useful tools
2-
name: develop
2+
name: wrf_python_build
33
channels:
44
- conda-forge
55
dependencies:
66
- python=3
7-
- wrapt
8-
- numpy
7+
- basemap
8+
- cartopy
9+
- clang_osx-64
10+
- gfortran_osx-64
11+
- jupyter
912
- matplotlib
1013
- netcdf4
11-
- xarray
12-
- jupyter
14+
- numpy
15+
- pycodestyle
16+
- setuptools
1317
- sphinx
1418
- sphinx_rtd_theme
15-
- pycodestyle
16-
- cartopy
17-
- basemap
18-
- clang_osx-64
19-
- gfortran_osx-64
19+
- wrapt
20+
- xarray
2021

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# Create full conda environment for development, including some useful tools
2-
name: develop
2+
name: wrf_python_build
33
channels:
44
- conda-forge
55
dependencies:
66
- python=3
7-
- wrapt
8-
- numpy
7+
- basemap
8+
- cartopy
9+
- gcc_linux-64
10+
- gfortran_linux-64
11+
- jupyter
912
- matplotlib
1013
- netcdf4
11-
- xarray
12-
- jupyter
14+
- numpy
15+
- pycodestyle
16+
- setuptools
1317
- sphinx
1418
- sphinx_rtd_theme
15-
- pycodestyle
16-
- cartopy
17-
- basemap
18-
- gcc_linux-64
19-
- gfortran_linux-64
19+
- wrapt
20+
- xarray
2021

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
# Create full conda environment for development, including some useful tools
2-
name: develop
2+
name: wrf_python_build
33
channels:
44
- conda-forge
5+
- msys2
56
dependencies:
67
- python=3
7-
- wrapt
8-
- numpy
8+
- basemap
9+
- cartopy
10+
- jupyter
11+
- m2w64-toolchain
912
- matplotlib
1013
- netcdf4
11-
- xarray
12-
- jupyter
14+
- numpy
15+
- pycodestyle
16+
- setuptools
1317
- sphinx
1418
- sphinx_rtd_theme
15-
- pycodestyle
16-
- cartopy
17-
- basemap
18-
- m2w64-toolchain
19+
- wrapt
20+
- xarray
1921

doc/source/contrib.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,27 +301,27 @@ contributing is:
301301

302302
.. code::
303303
304-
conda env create -f osx.yml
304+
conda env create -f build_envs/Darwin.yml
305305
306306
Linux:
307307

308308
.. code::
309309
310-
conda env create -f linux.yml
310+
conda env create -f build_envs/Linux.yml
311311
312312
Win64:
313313

314314
.. code::
315315
316-
conda env create -f win64.yml
316+
conda env create -f build_envs/Win64.yml
317317
318318
Note: For Win64, you will also need VS2015 installed on your system.
319319

320320
- Activate your conda environment.
321321

322322
.. code::
323323
324-
conda activate develop
324+
conda activate wrf_python_build
325325
326326
- CD to the build_scripts directory.
327327

testenv2.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

testenv3.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)