Skip to content

Commit

Permalink
Normalize files (#2334)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
matrss authored May 6, 2024
1 parent 2129162 commit 8b5c734
Show file tree
Hide file tree
Showing 79 changed files with 12,100 additions and 12,123 deletions.
4 changes: 2 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[run]
omit =
omit =
_tests/*
*/_tests/*
*/_tests/*
mslib/msui/qt5/*
docs/*
/tmp/*
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
2 changes: 1 addition & 1 deletion .github/workflows/build_docs_gallery.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build Gallery

on:
on:
pull_request:
inputs:
branch_name:
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: lint

on:
push:
branches:
- develop
- stable
pull_request:
branches:
- develop
- stable

jobs:
flake8:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Lint with flake8
run: |
python -m pip install --upgrade pip
pip install flake8
flake8 --count --statistics mslib tests
no-crlf-in-git:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Check for CRLF in the repository
run: |
files_with_crlf="$(git ls-files --eol | awk '$1 ~ "crlf"')"
echo "$files_with_crlf"
[ "$files_with_crlf" == "" ] || exit 1
no-whitespace-issues-in-git:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Check for whitespace issues in the repository
# The two example.txt files need to be excluded because whitespace at EOL is part
# of their format and they fail to parse otherwise.
# The leftover conflict marker warning is ignored for all rst files because
# section headings consisting of 7 "=" characters are mistaken to be part of a
# conflict marker.
run: |
issues="$(
git diff --check $(git hash-object -t tree /dev/null) HEAD :^tests/data/example.txt :^docs/samples/flight-tracks/example.txt |
{ grep -v '^.*\.rst:.*leftover conflict marker$' || true; }
)"
echo "$issues"
[ "$issues" == "" ] || exit 1
30 changes: 0 additions & 30 deletions .github/workflows/python-flake8.yml

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/testing-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,23 @@ on:
branches:
- develop

jobs:
jobs:
test-develop:
uses:
uses:
./.github/workflows/testing.yml
with:
xdist: no
branch_name: develop
event_name: ${{ github.event_name }}
secrets:
secrets:
PAT: ${{ secrets.PAT }}

test-develop-xdist:
uses:
uses:
./.github/workflows/testing.yml
with:
xdist: yes
branch_name: develop
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}

11 changes: 4 additions & 7 deletions .github/workflows/testing-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: new dependency test (scheduled)

on:
schedule:
- cron: '30 5 * * 1'
- cron: '30 5 * * 1'


jobs:
jobs:
test-stable-scheduled:
uses:
uses:
./.github/workflows/testing.yml
with:
xdist: no
Expand All @@ -17,14 +17,11 @@ jobs:
PAT: ${{ secrets.PAT }}

test-develop-scheduled:
uses:
uses:
./.github/workflows/testing.yml
with:
xdist: no
branch_name: develop
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}



8 changes: 3 additions & 5 deletions .github/workflows/testing-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
- stable
workflow_dispatch:

jobs:
jobs:
test-stable:
uses:
uses:
./.github/workflows/testing.yml
with:
xdist: no
Expand All @@ -21,13 +21,11 @@ jobs:
PAT: ${{ secrets.PAT }}

test-stable-xdist:
uses:
uses:
./.github/workflows/testing.yml
with:
xdist: yes
branch_name: stable
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}


1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ build/
mss.egg-info/
tutorials/recordings
tutorials/cursor_image.png

21 changes: 10 additions & 11 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ Version 6.2.0

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


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


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



Version 1.2.2
Version 1.2.2
-------------

Bug Fixes:
Expand All @@ -1190,7 +1190,7 @@ New Features:
Other Changes:
- installation with conda-forge described#63

Version 1.2.1
Version 1.2.1
-------------

Bug Fixes:
Expand Down Expand Up @@ -1223,17 +1223,17 @@ Other Changes:
- improved documentations


Version 1.1.0
Version 1.1.0
-------------

New Features:
- Vertical section styles supported in standalone server, #10
- More formats for exchanging flight paths implemented, #7
- Reverse flight path, #11
- Reverse flight path, #11
- Displaying model data from CLaMS, #4
- Visualisation of gravity wave forecasts, #14
- Improved labels in plots, #8

Bug Fixes:
- Improved debugging in standalone server, #9
- Fix for Labels accumulate in plots upon saving, #5
Expand All @@ -1243,7 +1243,6 @@ Bug Fixes:
Other Changes:
- Namespace refactored, all modules dependend to mslib #24
- Sphinx documentation introduced, #25, #26
- Documentation on http://mss.rtfd.io
- Installation recipes based on conda
- Documentation on http://mss.rtfd.io
- Installation recipes based on conda
- First public release on June 28, 2016

4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cff-version: "1.2.0"
contact:
contact:
- website: https://github.com/Open-MSS/MSS/wiki/Contact
name: "MSS community"
license: "Apache-2.0"
Expand All @@ -19,7 +19,7 @@ authors:
email: "j.ungermann@fz-juelich.de"
orcid: "https://orcid.org/0000-0001-9095-8332"
- affiliation: "Forschungszentrum Jülich GmbH"
family-names: "Grooß"
family-names: "Grooß"
given-names: "Jens-Uwe"
email: "j.-u.grooss@fz-juelich.de"
orcid: "https://orcid.org/0000-0002-9485-866X"
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.
email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the README.md with details of changes to the interface, this includes new environment
2. Update the README.md with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the new version that this
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
***************************************************************************
***************************************************************************

MISSION SUPPORT SYSTEM THIRD PARTY COMPONENTS:
MISSION SUPPORT SYSTEM THIRD PARTY COMPONENTS:

The Mission Support System includes a number of components with
separate copyright notices and license terms. Your use of the source
Expand Down
6 changes: 3 additions & 3 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Package for working with OGC map, feature, and coverage services.
Obtained from SVN (http://svn.gispython.org/svn/gispy/OWSLib/trunk),
revision 1672, on 2010/08/11.

NOTE: The file "wms.py" has been modified for the MSS. Changes are marked
NOTE: The file "wms.py" has been modified for the MSS. Changes are marked
with "(mss)". We renamed it to "ogcwms.py" (2017-04-28)

We also did a PEP8 review of the ogcwms.py and adopted it to the recent 0.14 version
https://pypi.python.org/pypi/OWSLib/0.14.0
https://pypi.python.org/pypi/OWSLib/0.14.0


NETCDF4-PYTHON
Expand All @@ -62,7 +62,7 @@ https://code.google.com/p/netcdf4-python/
KML Examples
-------------

Below are links from where certain KML Files have been obtained, which are used
Below are links from where certain KML Files have been obtained, which are used
as Test Samples in MSS (mss/docs/samples/kml/):

World_Map.kml (mss/docs/samples/kml/World_Map.kml)
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Automatically
Manually
--------

As **Beginner** start with an installation of Mambaforge
As **Beginner** start with an installation of Mambaforge
Get [mambaforge](https://github.com/conda-forge/miniforge#mambaforge) for your Operation System


Expand All @@ -42,7 +42,7 @@ to leave out the 'source' here and below).
For updating an existing MSS installation to the current version, it is
best to install it into a new environment. If an existing environment
shall be updated, it is important to update all packages in this
environment.
environment.

```
$ mamba activate mssenv
Expand Down Expand Up @@ -74,7 +74,7 @@ Current release info
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6572620.svg)](https://doi.org/10.5281/zenodo.6572620)
[![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/mss.svg)](https://anaconda.org/conda-forge/mss)
[![DOCS](https://img.shields.io/badge/%F0%9F%95%AE-docs-green.svg)](http://mss.rtd.io)
[![Conda Recipe](https://img.shields.io/badge/recipe-mss-green.svg)](https://anaconda.org/conda-forge/mss)
[![Conda Recipe](https://img.shields.io/badge/recipe-mss-green.svg)](https://anaconda.org/conda-forge/mss)
[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/mss.svg)](https://anaconda.org/conda-forge/mss)
[![Coverage Status](https://coveralls.io/repos/github/Open-MSS/MSS/badge.svg?branch=develop)](https://coveralls.io/github/Open-MSS/MSS?branch=develop)

Expand All @@ -100,11 +100,8 @@ application. The documents are available at:

For copyright information, please see the files NOTICE and LICENSE, located
in the same directory as this README file.


When using this software, please be so kind and acknowledge its use by
citing the above mentioned reference documentation in publications,
presentations, reports, etc. that you create. Thank you very much.



2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class mscolab_settings(object):
# used to generate the password token
SECURITY_PASSWORD_SALT = secrets.token_urlsafe(16)
# looks for a given category for an operation ending with GROUP_POSTFIX
# e.g. category = Tex will look for TexGroup
# all users in that Group are set to the operations of that category
Expand Down
Loading

0 comments on commit 8b5c734

Please sign in to comment.