From 23c7af15a909902a87c058bb5aa8af204d60783a Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sat, 1 May 2021 14:27:52 +0200 Subject: [PATCH 1/2] Switch testing from py 3.6 to 3.9 --- azure-pipelines.yml | 8 ++++---- ci/{python3.6.yaml => python3.9.yaml} | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename ci/{python3.6.yaml => python3.9.yaml} (93%) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 585e051..98ebbc1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,12 +18,12 @@ jobs: vmImage: 'ubuntu-16.04' strategy: matrix: - Python36: - python.version: '3.6' Python37: python.version: '3.7' Python38: python.version: '3.8' + Python39: + python.version: '3.9' steps: - bash: echo "##vso[task.prependpath]$CONDA/bin" @@ -131,12 +131,12 @@ jobs: vmImage: 'macOS-10.14' strategy: matrix: - Python36: - python.version: '3.6' Python37: python.version: '3.7' Python38: python.version: '3.8' + Python39: + python.version: '3.9' steps: - bash: echo "##vso[task.prependpath]$CONDA/bin" diff --git a/ci/python3.6.yaml b/ci/python3.9.yaml similarity index 93% rename from ci/python3.6.yaml rename to ci/python3.9.yaml index 8dc7ee8..51d8329 100644 --- a/ci/python3.6.yaml +++ b/ci/python3.9.yaml @@ -5,4 +5,4 @@ pin_run_as_build: min_pin: x.x max_pin: x.x python: -- '3.6' +- '3.9' From 0d71430d919a2da75c9f1646d3a4077b50ec2a91 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sat, 1 May 2021 14:39:13 +0200 Subject: [PATCH 2/2] Add dev environment in a yaml file Update the README to tell developers how to use the new yaml. Add/update gitignore files --- .gitignore | 3 +++ README.md | 30 ++++++++---------------------- dev_environment.yaml | 23 +++++++++++++++++++++++ docs/.gitignore | 3 +++ 4 files changed, 37 insertions(+), 22 deletions(-) create mode 100644 dev_environment.yaml create mode 100644 docs/.gitignore diff --git a/.gitignore b/.gitignore index fdc5a5a..8978793 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,6 @@ ENV/ .ropeproject .DS_Store + +# pycharm +.idea diff --git a/README.md b/README.md index 0fa3550..e1ae9a3 100644 --- a/README.md +++ b/README.md @@ -10,40 +10,26 @@ Python remapping tools for climate and earth system models. ## Installation -To use the latest version for developers, you will need to set up a conda -environment with the following packages: - - * python >= 3.6 - * numpy - * scipy - * netcdf4 - * xarray >= 0.10.0 - * dask - * nco >= 4.8.1 - * pyproj +To use the latest version for developers, get the code from: +[https://github.com/MPAS-Dev/pyremap](https://github.com/MPAS-Dev/pyremap) -These can be installed via the conda command: +Then, you will need to set up a conda environment and install the package +in a way that points to the repo (so changes you make are available in the +conda environment): ``` conda config --add channels conda-forge conda config --set channel_priority strict -conda create -n pyremap python=3.7 numpy scipy netcdf4 "xarray>=0.10.0" dask \ - "nco>=4.8.1" pyproj +conda create -n pyremap conda activate pyremap +conda env update -n pyremap -f dev_environment.yaml +python -m pip install -e . ``` -Then, get the code from: -[https://github.com/MPAS-Dev/pyremap](https://github.com/MPAS-Dev/pyremap) - - ## Examples ``` cd examples ``` -The simplest way to make pyremap available is: -``` -ln -s ../pyremap -``` First, make mapping files for a lat-lon grid, and test it out by remapping temperature from the example file: ``` diff --git a/dev_environment.yaml b/dev_environment.yaml new file mode 100644 index 0000000..bde1e01 --- /dev/null +++ b/dev_environment.yaml @@ -0,0 +1,23 @@ +name: pyremap_dev +channels: + - conda-forge + - defaults +dependencies: + # Base + - python >=3.6 + - dask + - esmf + - nco >=4.8.1 + - netcdf4 + - numpy + - scipy + - pyproj + - xarray >=0.10.0 + # Development + - pip + # Documentation + - mock + - pillow + - sphinx + - sphinx_rtd_theme + - m2r diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..ad64594 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,3 @@ +/generated +/_build +/quick_start.rst