Skip to content

Commit 403ad9f

Browse files
authored
Merge pull request #537 from matplotlib/issue-536
Reformat basemap.cm and avoid six as requirement
2 parents c4805e3 + 63d6a35 commit 403ad9f

File tree

9 files changed

+1151
-80
lines changed

9 files changed

+1151
-80
lines changed

.gitattributes

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto eol=lf
3+
4+
# Explicitly declare text files you want to always be normalised and
5+
# converted to native line endings on checkout.
6+
*.py text
7+
*.pyx text
8+
9+
# Denote all files that are truly binary and should not be modified.
10+
*.bin binary
11+
*.dat binary
12+
*.dbf binary
13+
*.dem binary
14+
*.gz binary
15+
*.jpg binary
16+
*.nc binary
17+
*.shp binary
18+
*.shx binary

.github/workflows/basemap-for-manylinux.yml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,56 @@ jobs:
2929
name: checkout
3030
path: .
3131

32+
lint:
33+
runs-on: ubuntu-latest
34+
strategy:
35+
matrix:
36+
python-version:
37+
["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
38+
max-parallel: 3
39+
fail-fast: false
40+
needs: checkout
41+
container: "pylegacy/python:${{ matrix.python-version }}-debian-8"
42+
steps:
43+
-
44+
name: Download checkout
45+
uses: actions/download-artifact@v1
46+
with:
47+
name: checkout
48+
path: .
49+
-
50+
name: Install lint requirements
51+
run: |
52+
cd ${{ env.PKGDIR }}
53+
pip install -r requirements-lint.txt
54+
-
55+
name: Install library requirements
56+
run: |
57+
cd ${{ env.PKGDIR }}
58+
pip install --prefer-binary -r requirements.txt
59+
-
60+
name: Run Flake8
61+
run: |
62+
cd ${{ env.PKGDIR }}
63+
if [ -x "$(command -v flake8)" ]; then
64+
flake8 src/mpl_toolkits/basemap/cm.py;
65+
fi
66+
-
67+
name: Run PyLint
68+
run: |
69+
cd ${{ env.PKGDIR }}
70+
if [ -x "$(command -v pylint)" ]; then
71+
pylint src/mpl_toolkits/basemap/cm.py;
72+
fi
73+
3274
build-geos:
3375
strategy:
3476
matrix:
3577
arch:
3678
["x64", "x86"]
3779
max-parallel: 2
3880
fail-fast: false
39-
needs: checkout
81+
needs: lint
4082
runs-on: ubuntu-latest
4183
container: "pylegacy/${{ matrix.arch }}-python:3.6-debian-4"
4284
steps:
@@ -232,6 +274,7 @@ jobs:
232274
name: Test package
233275
run: |
234276
python -c "from mpl_toolkits.basemap import Basemap"
277+
python -c "from mpl_toolkits.basemap import cm"
235278
236279
upload:
237280
strategy:

.github/workflows/basemap-for-windows.yml

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,59 @@ jobs:
2929
name: checkout
3030
path: .
3131

32+
lint:
33+
runs-on: windows-latest
34+
strategy:
35+
matrix:
36+
python-version:
37+
["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
38+
max-parallel: 3
39+
fail-fast: false
40+
needs: checkout
41+
steps:
42+
-
43+
name: Download checkout
44+
uses: actions/download-artifact@v1
45+
with:
46+
name: checkout
47+
path: .
48+
-
49+
name: Set Python
50+
uses: actions/setup-python@v2
51+
with:
52+
architecture: ${{ matrix.arch }}
53+
python-version: ${{ matrix.python-version }}
54+
-
55+
name: Set Python base packages
56+
run: |
57+
python -m pip install --upgrade pip setuptools wheel
58+
-
59+
name: Install lint requirements
60+
run: |
61+
cd ${{ env.PKGDIR }}
62+
python -m pip install -r requirements-lint.txt
63+
-
64+
name: Install library requirements
65+
run: |
66+
cd ${{ env.PKGDIR }}
67+
pip install --prefer-binary -r requirements.txt
68+
-
69+
name: Run Flake8
70+
run: |
71+
cd ${{ env.PKGDIR }}
72+
if (Get-Command flake8 -errorAction SilentlyContinue)
73+
{
74+
flake8 src/mpl_toolkits/basemap/cm.py;
75+
}
76+
-
77+
name: Run PyLint
78+
run: |
79+
cd ${{ env.PKGDIR }}
80+
if (Get-Command pylint -errorAction SilentlyContinue)
81+
{
82+
pylint src/mpl_toolkits/basemap/cm.py;
83+
}
84+
3285
build-geos:
3386
strategy:
3487
matrix:
@@ -51,7 +104,7 @@ jobs:
51104
cmake-version: "3.13.2"
52105
max-parallel: 4
53106
fail-fast: false
54-
needs: checkout
107+
needs: lint
55108
runs-on: windows-latest
56109
steps:
57110
-
@@ -194,6 +247,7 @@ jobs:
194247
name: Test package
195248
run: |
196249
python -c "from mpl_toolkits.basemap import Basemap"
250+
python -c "from mpl_toolkits.basemap import cm"
197251
198252
upload:
199253
strategy:

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ https://semver.org/spec/v2.0.0.html
1212

1313
## [Unreleased]
1414

15+
### Removed
16+
- Remove dependency on `six` (solves issue [#536]).
17+
1518
## [1.3.2] - 2022-02-10
1619

1720
### Added
@@ -889,6 +892,8 @@ https://semver.org/spec/v2.0.0.html
889892
- Fix glitches in drawing of parallels and meridians.
890893

891894

895+
[#536]:
896+
https://github.com/matplotlib/basemap/issues/536
892897
[#533]:
893898
https://github.com/matplotlib/basemap/issues/533
894899
[#532]:

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Basic requirements are the following:
1212
* [numpy](https://github.com/numpy/numpy)
1313
* [pyproj](https://github.com/pyproj4/pyproj)
1414
* [pyshp](https://github.com/GeospatialPython/pyshp)
15-
* [six](https://github.com/benjaminp/six)
1615

1716
Optional requirements include:
1817

packages/basemap/.pylintrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,7 @@ init-import=no
413413

414414
# List of qualified module names which can have objects that can redefine
415415
# builtins.
416-
redefining-builtins-modules=six.moves,
417-
past.builtins,
416+
redefining-builtins-modules=past.builtins,
418417
future.builtins,
419418
builtins,
420419
io

packages/basemap/requirements-doc.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
six >= 1.10, < 1.16; python_version >= "3.5"
21
sphinx >= 3.0, < 3.4; python_version >= "3.5"

packages/basemap/requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
basemap_data >= 1.3, < 1.4
22

3-
six >= 1.10, < 1.16
4-
53
numpy >= 1.11, < 1.12; python_version == "2.6"
64
numpy >= 1.16, < 1.17; python_version == "2.7"
75
numpy >= 1.11, < 1.12; python_version == "3.2"

packages/basemap/src/mpl_toolkits/basemap/cm.py

Lines changed: 1028 additions & 72 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)