Skip to content

Commit 8b5c734

Browse files
authored
Normalize files (#2334)
* Make python-flake8.yml a general lint workflow * Add a lint check to prevent crlf endings in git * Set text=auto and renormalize files * Add a lint check to prevent whitespace issues Whitespace issues as understood by git (by default) are trailing whitespace at EOL, whitespace on an otherwise empty line, a space character immediately followed by a tab character in the indentation of a line, and multiple newlines at EOF. References: - https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---check - https://peter.eisentraut.org/blog/2014/11/04/checking-whitespace-with-git * Fix trailing whitespace issues * Fix issues with multiple newlines at EOF * Ignore conflict marker warning in rst files
1 parent 2129162 commit 8b5c734

File tree

79 files changed

+12100
-12123
lines changed

Some content is hidden

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

79 files changed

+12100
-12123
lines changed

.coveragerc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[run]
2-
omit =
2+
omit =
33
_tests/*
4-
*/_tests/*
4+
*/_tests/*
55
mslib/msui/qt5/*
66
docs/*
77
/tmp/*

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.github/workflows/build_docs_gallery.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Build Gallery
22

3-
on:
3+
on:
44
pull_request:
55
inputs:
66
branch_name:

.github/workflows/lint.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: lint
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- stable
8+
pull_request:
9+
branches:
10+
- develop
11+
- stable
12+
13+
jobs:
14+
flake8:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 10
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python 3.8
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: 3.8
23+
- name: Lint with flake8
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install flake8
27+
flake8 --count --statistics mslib tests
28+
29+
no-crlf-in-git:
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 10
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Check for CRLF in the repository
35+
run: |
36+
files_with_crlf="$(git ls-files --eol | awk '$1 ~ "crlf"')"
37+
echo "$files_with_crlf"
38+
[ "$files_with_crlf" == "" ] || exit 1
39+
40+
no-whitespace-issues-in-git:
41+
runs-on: ubuntu-latest
42+
timeout-minutes: 10
43+
steps:
44+
- uses: actions/checkout@v4
45+
- name: Check for whitespace issues in the repository
46+
# The two example.txt files need to be excluded because whitespace at EOL is part
47+
# of their format and they fail to parse otherwise.
48+
# The leftover conflict marker warning is ignored for all rst files because
49+
# section headings consisting of 7 "=" characters are mistaken to be part of a
50+
# conflict marker.
51+
run: |
52+
issues="$(
53+
git diff --check $(git hash-object -t tree /dev/null) HEAD :^tests/data/example.txt :^docs/samples/flight-tracks/example.txt |
54+
{ grep -v '^.*\.rst:.*leftover conflict marker$' || true; }
55+
)"
56+
echo "$issues"
57+
[ "$issues" == "" ] || exit 1

.github/workflows/python-flake8.yml

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

.github/workflows/testing-develop.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,23 @@ on:
99
branches:
1010
- develop
1111

12-
jobs:
12+
jobs:
1313
test-develop:
14-
uses:
14+
uses:
1515
./.github/workflows/testing.yml
1616
with:
1717
xdist: no
1818
branch_name: develop
1919
event_name: ${{ github.event_name }}
20-
secrets:
20+
secrets:
2121
PAT: ${{ secrets.PAT }}
2222

2323
test-develop-xdist:
24-
uses:
24+
uses:
2525
./.github/workflows/testing.yml
2626
with:
2727
xdist: yes
2828
branch_name: develop
2929
event_name: ${{ github.event_name }}
3030
secrets:
3131
PAT: ${{ secrets.PAT }}
32-

.github/workflows/testing-scheduled.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: new dependency test (scheduled)
22

33
on:
44
schedule:
5-
- cron: '30 5 * * 1'
5+
- cron: '30 5 * * 1'
66

77

8-
jobs:
8+
jobs:
99
test-stable-scheduled:
10-
uses:
10+
uses:
1111
./.github/workflows/testing.yml
1212
with:
1313
xdist: no
@@ -17,14 +17,11 @@ jobs:
1717
PAT: ${{ secrets.PAT }}
1818

1919
test-develop-scheduled:
20-
uses:
20+
uses:
2121
./.github/workflows/testing.yml
2222
with:
2323
xdist: no
2424
branch_name: develop
2525
event_name: ${{ github.event_name }}
2626
secrets:
2727
PAT: ${{ secrets.PAT }}
28-
29-
30-

.github/workflows/testing-stable.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ on:
99
- stable
1010
workflow_dispatch:
1111

12-
jobs:
12+
jobs:
1313
test-stable:
14-
uses:
14+
uses:
1515
./.github/workflows/testing.yml
1616
with:
1717
xdist: no
@@ -21,13 +21,11 @@ jobs:
2121
PAT: ${{ secrets.PAT }}
2222

2323
test-stable-xdist:
24-
uses:
24+
uses:
2525
./.github/workflows/testing.yml
2626
with:
2727
xdist: yes
2828
branch_name: stable
2929
event_name: ${{ github.event_name }}
3030
secrets:
3131
PAT: ${{ secrets.PAT }}
32-
33-

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ build/
2424
mss.egg-info/
2525
tutorials/recordings
2626
tutorials/cursor_image.png
27-

CHANGES.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Version 6.2.0
253253

254254
This release includes the use of the new basemap-1.3.3 release and enables packaging for python 3.10.x.
255255
We added the possibility of flight level as vertical coordinate.
256-
A user can now leave on his own an operation.
256+
A user can now leave on his own an operation.
257257

258258

259259
All changes:
@@ -804,7 +804,7 @@ Bug Fixes:
804804
- mswms crashes on a wms server when the request object is None, #339, #342
805805
- data_dir not used for default filepicker, #337
806806
- post_link.sh update on conda-forge, #334
807-
807+
808808

809809
Version 1.7.2
810810
-------------
@@ -1126,7 +1126,7 @@ New Features:
11261126
- Suggest standard name for saving plots, #13
11271127
- KML Overlay introduced for overplot of flight region borders, #61, #97
11281128
- implemented demodata for standalone server and py.test, #80
1129-
- simplified server setup, added demodata.
1129+
- simplified server setup, added demodata.
11301130
- Always provide simplified aircraft range estimates in TableView. #85
11311131
- server data needs standard_name in data, #87
11321132
- plugin infrastructure introduced for supporting file formats for flight track saving/loading, #69, #88
@@ -1176,7 +1176,7 @@ Other Changes:
11761176

11771177

11781178

1179-
Version 1.2.2
1179+
Version 1.2.2
11801180
-------------
11811181

11821182
Bug Fixes:
@@ -1190,7 +1190,7 @@ New Features:
11901190
Other Changes:
11911191
- installation with conda-forge described#63
11921192

1193-
Version 1.2.1
1193+
Version 1.2.1
11941194
-------------
11951195

11961196
Bug Fixes:
@@ -1223,17 +1223,17 @@ Other Changes:
12231223
- improved documentations
12241224

12251225

1226-
Version 1.1.0
1226+
Version 1.1.0
12271227
-------------
12281228

12291229
New Features:
12301230
- Vertical section styles supported in standalone server, #10
12311231
- More formats for exchanging flight paths implemented, #7
1232-
- Reverse flight path, #11
1232+
- Reverse flight path, #11
12331233
- Displaying model data from CLaMS, #4
12341234
- Visualisation of gravity wave forecasts, #14
12351235
- Improved labels in plots, #8
1236-
1236+
12371237
Bug Fixes:
12381238
- Improved debugging in standalone server, #9
12391239
- Fix for Labels accumulate in plots upon saving, #5
@@ -1243,7 +1243,6 @@ Bug Fixes:
12431243
Other Changes:
12441244
- Namespace refactored, all modules dependend to mslib #24
12451245
- Sphinx documentation introduced, #25, #26
1246-
- Documentation on http://mss.rtfd.io
1247-
- Installation recipes based on conda
1246+
- Documentation on http://mss.rtfd.io
1247+
- Installation recipes based on conda
12481248
- First public release on June 28, 2016
1249-

0 commit comments

Comments
 (0)