Skip to content

Commit

Permalink
Merge pull request #223 from mwtoews/ci-upgrade
Browse files Browse the repository at this point in the history
Upgrade CI, set min version to py37, use "pip install"
  • Loading branch information
jswhit authored Nov 13, 2023
2 parents 1edfb3f + fe8b91f commit 4ffc06c
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 35 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]
platform: [x64, x32]
# debug on a single os/platform/python version
Expand All @@ -20,10 +20,6 @@ jobs:
exclude:
- os: macos-latest
platform: x32
- os: macos-latest
python-version: "3.6"
- os: windows-latest
python-version: "3.6"
steps:
- uses: actions/checkout@v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [windows-latest, macos-latest]
platform: [x64, x32]
# debug on a single os/platform/python version
Expand Down
42 changes: 17 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,42 @@ jobs:
PROJ_LIB: /usr/share/proj
strategy:
matrix:
#python-version: ["3.6", "3.7", "3.8", "3.9"]
#python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9"]
steps:

- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Ubuntu Dependencies
run: |
sudo apt-get update
sudo apt-get install libproj-dev proj-bin libeccodes-dev
sudo apt-get install libgeos-dev
sudo apt-get install gfortran libeccodes-dev
- name: Update Pip
run: |
python -m pip install --upgrade pip
- name: Install pygrib dependencies via pip
- name: Install some dependencies via pip
run: |
python -m pip install numpy
python -m pip install cython
python -m pip install pyproj
python -m pip install pytest
python -m pip install check-manifest
python -m pip install twine
python -m pip install wheel
# Install pyspharm using a few tricks
pip install numpy setuptools wheel
FFLAGS="-fallow-argument-mismatch" pip install --no-use-pep517 pyspharm
# for later building/checking
pip install build twine
pip install cython check-manifest
# below here only needed for mpl/cartopy based tests
python -m pip install pytest-mpl
python -m pip install pyshp
python -m pip install six
python -m pip install shapely --no-binary shapely
python -m pip install matplotlib
python -m pip install cartopy
python -m pip install scipy
python -m pip install pyspharm
pip install pytest-mpl
pip install cartopy
- name: Install pygrib
run: |
python setup.py install
pip install -e .
- name: Test
run: |
cd test
Expand All @@ -62,7 +55,6 @@ jobs:
- name: Tarball
run: |
python setup.py --version ;
pip wheel . -w dist --no-deps ;
check-manifest --verbose ;
twine check dist/* ;
python -m build --sdist
check-manifest --verbose
twine check --strict dist/*
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ recursive-include src *pyx
recursive-include src *py
recursive-include src *h
recursive-include docs *
recursive-include eccodes *.def
recursive-include src/pygrib/share/eccodes *.def
recursive-include test *.py
include sampledata/*.grb
include sampledata/*.grb2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can also use [conda](https://docs.conda.io/en/latest/):
conda install -c conda-forge pygrib
```

Alternately, clone the github repo and run `python setup.py install` (after setting `$ECCCODES_DIR`)
Alternately, clone the github repo and run `pip install -e .` (after setting `$ECCCODES_DIR`)
where `$ECCODES_DIR` is the path to the directory containing `include/grib_api.h`
and `lib/libeccodes.so`. If `ECCODES_DIR` is not specified, a few common locations
such as `$CONDA_PREFIX,/usr,/usr/local,/opt/local` will be searched.
Expand Down
4 changes: 2 additions & 2 deletions docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ an error saying ``boot.def`` cannot be found.
Developing
----------

To build from source, clone the github repository and run setup.py:
To build from source, clone the github repository and install:

>>> git clone https://github.com/jswhit/pygrib
>>> cd pygrib
>>> ECCODES_DIR=path/to/eccodes python setup.py install
>>> ECCODES_DIR=path/to/eccodes pip install -e .

where ``$ECCODES_DIR`` is the path to the directory containing ``include/grib_api.h``
and ``lib/libeccodes.so``. If ``ECCODES_DIR`` is not specified, a few common locations
Expand Down
Binary file modified test/baseline_images/test_reduced_gg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/baseline_images/test_reduced_ll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/baseline_images/test_reglatlon2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4ffc06c

Please sign in to comment.