diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 0731d88b9..000000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: pre-commit - -on: - pull_request: - push: - branches: - - main - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 61269815b..fbc882da9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,18 +1,19 @@ repos: -- repo: https://github.com/pre-commit/mirrors-yapf # To format the code to conform YAPF - rev: v0.31.0 +- repo: https://github.com/google/yapf # To format the code to conform YAPF + rev: v0.40.2 hooks: - id: yapf args: ['--in-place', '--recursive', '--style', 'google'] + require_serial: true -- repo: https://github.com/myint/docformatter # To format the doc strings to conform PEP257 - rev: v1.3.1 +- repo: https://github.com/PyCQA/docformatter # To format the doc strings to conform PEP257 + rev: v1.7.5 hooks: - id: docformatter args: [--in-place] - repo: https://github.com/pre-commit/pre-commit-hooks # Some common pre-commit hooks - rev: v2.3.0 + rev: v4.6.0 hooks: - id: check-yaml # Checks the syntax of .yaml files. args: [--allow-multiple-documents] @@ -20,3 +21,8 @@ repos: - id: end-of-file-fixer # Makes sure files end with a newline. - id: trailing-whitespace # Checks for any tabs or spaces after the last non-whitespace character on the line. - id: check-docstring-first # Checks that code comes after the docstrings. + - id: check-yaml # Check valid yml file + +ci: + autofix_prs: false + autoupdate_schedule: monthly diff --git a/Gallery/MapProjections/NCL_lcnative_1.py b/Gallery/MapProjections/NCL_lcnative_1.py index 3e08b835c..b33000a9d 100755 --- a/Gallery/MapProjections/NCL_lcnative_1.py +++ b/Gallery/MapProjections/NCL_lcnative_1.py @@ -80,19 +80,22 @@ def Plot(row, col, pos, proj, title): gl.ylocator = mticker.FixedLocator([20, 25, 30, 35, 40, 45]) gl.xlabel_style = {'rotation': 0} gl.ylabel_style = {'rotation': 0} - ''' - When using certain types of projections in Cartopy, you may find that there - is not a direct 1-to-1 projection similarity. When looking at the three Lambert - projections offered, you will notice the closest match to the NCL projection - is actually the Lambert Cylindrical projection. This is due to NCL having certain - "smoothing" and "flattening" options for the Lambert Conformal projection not seen - in the Cartopy version. By using Lambert Cylindrical over Lambert Conformal in Python, - you will be able to create the "rectangular" style of coordinates not classically - represented by a Lambert Conformal map. Additionally, Cartopy does not currently support - adding tick marks to a projection like NCL, this is why these Python projections do not - have this feature. The GeoCAT Team is actively adding to the list of convenience functions + """When using certain types of projections in Cartopy, you may find that + there is not a direct 1-to-1 projection similarity. + + When looking at the three Lambert projections offered, you will + notice the closest match to the NCL projection is actually the + Lambert Cylindrical projection. This is due to NCL having certain + "smoothing" and "flattening" options for the Lambert Conformal + projection not seen in the Cartopy version. By using Lambert + Cylindrical over Lambert Conformal in Python, you will be able to + create the "rectangular" style of coordinates not classically + represented by a Lambert Conformal map. Additionally, Cartopy does + not currently support adding tick marks to a projection like NCL, + this is why these Python projections do not have this feature. The + GeoCAT Team is actively adding to the list of convenience functions supported and hopes to add this functionality one day. - ''' + """ # Plot data and create colorbar prec = t.plot.contourf(ax=ax,