Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions: add codespell linter, warn only #3353

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://github.com/codespell-project/codespell

[codespell]
skip = ./man/nominatim.1,data,./docs/styles.css,lib-php,module,munin,osm2pgsql,./test,./settings/*.lua,./settings/*.yaml,./settings/**/*.yaml,./settings/icu-rules,./nominatim/tokenizer/token_analysis/config_variants.py
# Need to be lowercase in the list
# Unter = Unter den Linden (an example address)
ignore-words-list = inout,unter
7 changes: 7 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,10 @@ jobs:

- name: Check full import
run: nominatim admin --check-database

codespell:
runs-on: ubuntu-latest
steps:
- uses: codespell-project/actions-codespell@v2
with:
only_warn: 1
2 changes: 1 addition & 1 deletion nominatim/api/search/db_search_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Copyright (C) 2023 by the Nominatim developer community.
# For a full list of authors see the git log.
"""
Convertion from token assignment to an abstract DB search.
Conversion from token assignment to an abstract DB search.
"""
from typing import Optional, List, Tuple, Iterator, Dict
import heapq
Expand Down
2 changes: 1 addition & 1 deletion nominatim/db/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def connect(dsn: str) -> ConnectionContext:
def get_pg_env(dsn: str,
base_env: Optional[SysEnv] = None) -> Dict[str, str]:
""" Return a copy of `base_env` with the environment variables for
PostgresSQL set up from the given database connection string.
PostgreSQL set up from the given database connection string.
If `base_env` is None, then the OS environment is used as a base
environment.
"""
Expand Down
10 changes: 5 additions & 5 deletions settings/env.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ NOMINATIM_TABLESPACE_ADDRESS_DATA=
# Tablespace for indexes used during address computation. Used for import and update only.
NOMINATIM_TABLESPACE_ADDRESS_INDEX=

# Tablespace for tables for auxilary data, e.g. TIGER data, postcodes.
# Tablespace for tables for auxiliary data, e.g. TIGER data, postcodes.
NOMINATIM_TABLESPACE_AUX_DATA=
# Tablespace for indexes for auxilary data, e.g. TIGER data, postcodes.
# Tablespace for indexes for auxiliary data, e.g. TIGER data, postcodes.
NOMINATIM_TABLESPACE_AUX_INDEX=


Expand Down Expand Up @@ -183,7 +183,7 @@ NOMINATIM_SEARCH_BATCH_MODE=no

# Threshold for searches by name only.
# Threshold where the lookup strategy in the database is switched. If there
# are less occurences of a tem than given, the search does the lookup only
# are less occurrences of a tem than given, the search does the lookup only
# against the name, otherwise it uses indexes for name and address.
NOMINATIM_SEARCH_NAME_ONLY_THRESHOLD=500

Expand All @@ -210,8 +210,8 @@ NOMINATIM_API_POOL_SIZE=10
NOMINATIM_QUERY_TIMEOUT=10

# Maximum time a single request is allowed to take. When the timeout is
# exceeeded, the available results are returned.
# When empty, then timouts are disabled.
# exceeded, the available results are returned.
# When empty, then timeouts are disabled.
NOMINATIM_REQUEST_TIMEOUT=60

# Search elements just within countries
Expand Down
Loading