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

Add dev environment in a yaml file #25

Merged
merged 2 commits into from
May 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,6 @@ ENV/
.ropeproject

.DS_Store

# pycharm
.idea
30 changes: 8 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
```
Expand Down
8 changes: 4 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion ci/python3.6.yaml → ci/python3.9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ pin_run_as_build:
min_pin: x.x
max_pin: x.x
python:
- '3.6'
- '3.9'
23 changes: 23 additions & 0 deletions dev_environment.yaml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/generated
/_build
/quick_start.rst