Skip to content

Commit

Permalink
Fix codespell config and typo 'prodived' -> 'provided' (#454)
Browse files Browse the repository at this point in the history
* fixed typo 'prodived' -> 'provided'

* Fix codespell config

* Fix lint job

---------

Co-authored-by: Adrien Berchet <adrien.berchet@gmail.com>
  • Loading branch information
djm93dev and adrien-berchet authored Jun 20, 2023
1 parent b92242b commit 8622c4d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[codespell]
skip = .git/*,doc/_build*,doc/gallery/*,.tox/*,reports/*,issues/*
skip = .git/*,./doc/_build/*,./doc/gallery/*,.tox/*,./reports/*,./issues/*,*.sublime-workspace
ignore-words-list = nd
2 changes: 1 addition & 1 deletion geoalchemy2/_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@
('ST_MapAlgebraExpr', types.Raster,
('''[raster] 1 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the input raster band and of pixeltype provided. Band 1 is assumed if no band is specified.\nOR\n[raster] 2 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the two input raster bands and of pixeltype provided. band 1 of each raster is assumed if no band numbers are specified. The resulting raster will be aligned (scale, skew and pixel corners) on the grid defined by the first raster and have its extent defined by the \"extenttype\" parameter. Values for \"extenttype\" can be: INTERSECTION, UNION, FIRST, SECOND.''', 'RT_ST_MapAlgebraExpr')),
('ST_MapAlgebraFct', types.Raster,
('''[raster] 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype prodived. Band 1 is assumed if no band is specified.\nOR\n[raster] 2 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the 2 input raster bands and of pixeltype prodived. Band 1 is assumed if no band is specified. Extent type defaults to INTERSECTION if not specified.''', 'RT_ST_MapAlgebraFct')),
('''[raster] 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype provided. Band 1 is assumed if no band is specified.\nOR\n[raster] 2 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the 2 input raster bands and of pixeltype provided. Band 1 is assumed if no band is specified. Extent type defaults to INTERSECTION if not specified.''', 'RT_ST_MapAlgebraFct')),
('ST_MapAlgebraFctNgb', types.Raster,
('''1-band version: Map Algebra Nearest Neighbor using user-defined PostgreSQL function. Return a raster which values are the result of a PLPGSQL user function involving a neighborhood of values from the input raster band.''', 'RT_ST_MapAlgebraFctNgb')),
('ST_Reclass', types.Raster,
Expand Down
9 changes: 3 additions & 6 deletions tests/test_functional_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
import pytest
from pkg_resources import parse_version
from shapely.geometry import LineString
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import Table
from sqlalchemy import __version__ as SA_VERSION
from sqlalchemy import bindparam
from sqlalchemy import text, create_engine
from sqlalchemy import create_engine
from sqlalchemy import text
from sqlalchemy.exc import OperationalError
from sqlalchemy.exc import StatementError
from sqlalchemy.orm import declarative_base
from sqlalchemy.sql import func
from sqlalchemy.sql import select

Expand Down Expand Up @@ -346,7 +344,6 @@ def create_temp_db(self, request, conn, reflection_tables_metadata):
yield connection
conn.execute(text(f"DROP DATABASE IF EXISTS {temp_db_name};"))


@pytest.fixture
def setup_reflection_tables(self, reflection_tables_metadata, conn):
reflection_tables_metadata.drop_all(conn, checkfirst=True)
Expand Down Expand Up @@ -390,7 +387,7 @@ def test_reflection_mysql(self, conn, setup_reflection_tables, create_temp_db):
B.INDEX_TYPE
FROM INFORMATION_SCHEMA.COLUMNS AS A
LEFT JOIN INFORMATION_SCHEMA.STATISTICS AS B
ON A.TABLE_NAME = B.TABLE_NAME
ON A.TABLE_NAME = B.TABLE_NAME
AND A.COLUMN_NAME = B.COLUMN_NAME
AND A.TABLE_SCHEMA = B.TABLE_SCHEMA
WHERE A.TABLE_SCHEMA = 'gis'
Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ requires=
python =
3.7: py37-sqla{14, latest}
3.8: py38-sqla{14, latest}, lint
3.9: py39-sqla{14, latest}, docs
3.9: py39-sqla{14, latest}
3.10: py310-sqla{14, latest}
3.11: py311-sqla{14, latest}
3.11: py311-sqla{14, latest}, docs
pypy-3.8: pypy3-sqla{14, latest}

[testenv]
Expand Down Expand Up @@ -59,21 +59,21 @@ commands =
coverage report -m

[testenv:lint]
basepython = python3.7
basepython = python3.8
skip_install = true
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure

[testenv:format]
basepython = python3.7
basepython = python3.8
skip_install = true
deps =
codespell
pre-commit
commands =
codespell -i 3 -w geoalchemy2 tests README.rst CHANGES.txt doc
codespell -i 3 -w
pre-commit run --all-files

[testenv:docs]
Expand Down

0 comments on commit 8622c4d

Please sign in to comment.