Skip to content

Commit 7962e87

Browse files
committed
Merge branch 'develop'
2 parents ecf8deb + 5922e3e commit 7962e87

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+979
-1535
lines changed
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Check and publish
2+
3+
on:
4+
push:
5+
branches: [master, develop]
6+
7+
pull_request:
8+
branches: [master, develop]
9+
10+
release:
11+
types: [created]
12+
13+
jobs:
14+
quality:
15+
name: Code QA
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- run: pip install black flake8 isort
20+
- run: black --version
21+
- run: isort --check .
22+
- run: black --check .
23+
- run: flake8 .
24+
25+
checks:
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
platform: [ubuntu-latest, macos-latest, windows-latest]
30+
python-version: ["3.6", "3.7", "3.8", "3.9"]
31+
method: ["conda", "ecmwflibs"]
32+
33+
name: Python ${{ matrix.python-version }} on ${{ matrix.platform }} (${{ matrix.method }})
34+
runs-on: ${{ matrix.platform }}
35+
needs: quality
36+
37+
defaults:
38+
run:
39+
shell: bash
40+
41+
steps:
42+
- uses: actions/checkout@v2
43+
44+
- uses: actions/setup-python@v2
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
48+
- if: matrix.method == 'conda'
49+
name: Setup conda
50+
uses: s-weigand/setup-conda@v1
51+
with:
52+
update-conda: true
53+
python-version: ${{ matrix.python-version }}
54+
conda-channels: anaconda, conda-forge
55+
56+
- name: Install tools
57+
run: |
58+
python -m pip install --upgrade pip
59+
pip install pytest pytest-cov isort black flake8
60+
61+
- if: matrix.method == 'conda'
62+
run: conda install eccodes
63+
64+
- if: matrix.method == 'ecmwflibs'
65+
name: Install ecmwflibs
66+
run: pip install ecmwflibs
67+
68+
- run: python setup.py develop
69+
- run: pip install -r tests/requirements.txt
70+
- run: pip freeze
71+
- run: env | sort
72+
- run: python -m eccodes selfcheck
73+
74+
- run: pytest
75+
if: matrix.method == 'conda' && matrix.platform == 'windows-latest'
76+
env:
77+
ECCODES_DEFINITION_PATH: "C:/Miniconda/Library/share/eccodes/definitions"
78+
ECCODES_SAMPLES_PATH: "C:/Miniconda/Library/share/eccodes/samples"
79+
80+
- run: pytest
81+
if: matrix.method != 'conda' || matrix.platform != 'windows-latest'
82+
83+
# pytest -v --cov=. --cov-report=xml --cov-branch .
84+
85+
- name: Upload coverage to Codecov
86+
uses: codecov/codecov-action@v1
87+
if: "false"
88+
89+
deploy:
90+
if: ${{ github.event_name == 'release' }}
91+
92+
name: Upload to Pypi
93+
needs: checks
94+
95+
runs-on: ubuntu-latest
96+
97+
steps:
98+
- uses: actions/checkout@v2
99+
100+
- name: Set up Python
101+
uses: actions/setup-python@v2
102+
with:
103+
python-version: "3.x"
104+
105+
- name: Install dependencies
106+
run: |
107+
python -m pip install --upgrade pip
108+
pip install setuptools wheel twine
109+
110+
- name: Check version
111+
run: |
112+
release=${GITHUB_REF##*/}
113+
version=$(python setup.py --version)
114+
test "$release" == "$version"
115+
116+
- name: Build and publish
117+
env:
118+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
119+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
120+
run: |
121+
python setup.py sdist
122+
twine upload dist/*

.github/workflows/on-push.yml

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

.travis.yml

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

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"restructuredtext.confPath": ""
3+
}

CHANGELOG.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22
Changelog for eccodes-python
33
============================
44

5+
6+
1.3.1 (2021-04-16)
7+
--------------------
8+
9+
- Fix the recommended version
10+
11+
12+
1.3.0 (2021-04-09)
13+
--------------------
14+
15+
- ECC-1231: Remove the experimental high-level interface
16+
- Added the "findlibs" module
17+
- Fix tests/test_high_level_api.py when MEMFS enabled
18+
- ECC-1226: Python3 bindings: Typo causes AttributeError when calling codes_index_get_double
19+
20+
521
1.2.0 (2021-03-23)
622
--------------------
723

CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ Before you submit a pull request, check that it meets these guidelines:
105105
your new functionality into a function with a docstring, and add the
106106
feature to the list in README.rst.
107107

108-
3. The pull request should work for Python 2.7, 3.5, 3.6 and 3.7, and for PyPy2 and Pypy3. Check
109-
the tox results and make sure that the tests pass for all supported Python versions.
108+
3. The pull request should work for Python 2.7, 3.5, 3.6, 3.7 and 3.8, and for PyPy2 and Pypy3.
109+
Check the tox results and make sure that the tests pass for all supported Python versions.
110110

111111

112112
Testing CDS data

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
PACKAGE := eccodes-python
33
IMAGE := $(PACKAGE)-image
44
MODULE := eccodes
5-
PYTHONS := python3.7 python3.6 python3.5 pypy3
5+
PYTHONS := python3.8 python3.7 python3.6 python3.5 pypy3
66
PYTHON := python
77

88
PYTESTFLAGS_TEST := -v --flakes --doctest-glob '*.rst' --cov=$(MODULE) --cov-report=html --cache-clear

README.rst

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ Features:
66

77
- reads and writes GRIB 1 and 2 files,
88
- reads and writes BUFR 3 and 4 files,
9-
- supports all modern versions of Python 3.7, 3.6, 3.5 and PyPy3,
10-
- works on most *Linux* distributions and *MacOS*, the *ecCodes* C-library is the only system dependency,
9+
- supports all modern versions of Python 3.8, 3.7, 3.6, 3.5 and PyPy3,
10+
- works on most *Linux* distributions and *MacOS*, the *ecCodes* C-library
11+
- is the only system dependency,
1112
- PyPI package can be installed without compiling,
1213
at the cost of being twice as slow as the original *ecCodes* module,
1314
- an optional compile step makes the code as fast as the original module
@@ -64,10 +65,11 @@ Experimental features
6465
Fast bindings
6566
-------------
6667

67-
To test the much faster *CFFI* API level, out-of-line mode you need the *ecCodes*
68-
header files.
69-
Then you need to clone the repo in the same folder as your *ecCodes* source tree,
70-
make a ``pip`` development install and custom compile the binary bindings::
68+
To test the much faster *CFFI* API level, out-of-line mode you need the
69+
*ecCodes* header files.
70+
Then you need to clone the repo in the same folder as your *ecCodes*
71+
source tree, make a ``pip`` development install and custom compile
72+
the binary bindings::
7173

7274
$ git clone https://github.com/ecmwf/eccodes-python
7375
$ cd eccodes-python
@@ -85,12 +87,6 @@ Project resources
8587
============= =========================================================
8688
Development https://github.com/ecmwf/eccodes-python
8789
Download https://pypi.org/project/eccodes
88-
Code quality .. image:: https://api.travis-ci.org/ecmwf/eccodes-python.svg?branch=master
89-
:target: https://travis-ci.org/ecmwf/eccodes-python/branches
90-
:alt: Build Status on Travis CI
91-
.. image:: https://coveralls.io/repos/ecmwf/eccodes-python/badge.svg?branch=master&service=github
92-
:target: https://coveralls.io/github/ecmwf/eccodes-python
93-
:alt: Coverage Status on Coveralls
9490
============= =========================================================
9591

9692

@@ -115,16 +111,16 @@ Contributors:
115111
See also the list of `contributors <https://github.com/ecmwf/eccodes-python/contributors>`_
116112
who participated in this project.
117113

114+
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
118115

119116
License
120117
=======
121118

122-
(C) Copyright 2017- ECMWF.
119+
|copy| Copyright 2017- ECMWF.
123120

124-
This software is licensed under the terms of the Apache Licence Version 2.0
125-
which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
126-
127-
In applying this licence, ECMWF does not waive the privileges and immunities
128-
granted to it by virtue of its status as an intergovernmental organisation nor
129-
does it submit to any jurisdiction.
121+
This software is licensed under the terms of the Apache Licence Version 2.0
122+
which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
130123

124+
In applying this licence, ECMWF does not waive the privileges and immunities
125+
granted to it by virtue of its status as an intergovernmental organisation nor
126+
does it submit to any jurisdiction.

appveyor.yml

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

builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
2+
import sys
23

34
import cffi
4-
import sys
55

66
ffibuilder = cffi.FFI()
77
ffibuilder.set_source(

0 commit comments

Comments
 (0)