From abd760f08d216b5ed0a4b0280a98b52c577bef71 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Mon, 11 Jul 2022 10:42:53 +0300 Subject: [PATCH 1/3] spelling, take1 --- .github/spellcheck-settings.yml | 26 +++++++++++++++++++++ .github/wordlist.txt | 40 ++++++++++++++++++++++++++++++++ .github/workflows/spellcheck.yml | 14 +++++++++++ .gitignore | 3 +++ docs/validation.md | 2 +- 5 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 .github/spellcheck-settings.yml create mode 100644 .github/wordlist.txt create mode 100644 .github/workflows/spellcheck.yml diff --git a/.github/spellcheck-settings.yml b/.github/spellcheck-settings.yml new file mode 100644 index 00000000..23196598 --- /dev/null +++ b/.github/spellcheck-settings.yml @@ -0,0 +1,26 @@ +matrix: +- name: Markdown + expect_match: false + apsell: + mode: en + dictionary: + wordlists: + - .github/wordlist.txt + output: wordlist.dic + encoding: utf-8 + pipeline: + - pyspelling.filters.markdown: + markdown_extensions: + - markdown.extensions.extra: + - pyspelling.filters.html: + comments: true + attributes: + - alt + ignores: + - ':matches(code, pre)' + - 'code' + - 'pre' + - 'blockquote' + sources: + - '*.md' + - 'docs/*.md' diff --git a/.github/wordlist.txt b/.github/wordlist.txt new file mode 100644 index 00000000..7f97bc31 --- /dev/null +++ b/.github/wordlist.txt @@ -0,0 +1,40 @@ +FastAPI +HashModel +JsonModel +PrimaryKeyCreator +Pydantic +Pydantic +README +RediSearch +RediSearch +RedisJSON +SSL +UlidPrimaryKey +aioredis +asyncio +cls +indexable +md +migrator +py +redisearch +rediss +subclasses +subclassing +utf +CLI +Pydantic's +sortable +subscripted +unix +localhost +validators +io +ULIDs +Deserializing +virtualenv +Bader's +MacOS +Homebrew +WSL +OM's diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 00000000..00c5437d --- /dev/null +++ b/.github/workflows/spellcheck.yml @@ -0,0 +1,14 @@ +name: spellcheck +on: + pull_request: +jobs: + check-spelling: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Check Spelling + uses: rojopolis/spellcheck-github-actions@0.23.0 + with: + config_path: .github/spellcheck-settings.yml + task_name: Markdown diff --git a/.gitignore b/.gitignore index ef6fc6bb..7da223a7 100644 --- a/.gitignore +++ b/.gitignore @@ -138,3 +138,6 @@ tests_sync/ # Apple Files .DS_Store + +# spelling cruft +*.dic diff --git a/docs/validation.md b/docs/validation.md index 60615361..a0f05dce 100644 --- a/docs/validation.md +++ b/docs/validation.md @@ -131,7 +131,7 @@ Once again, we get the validation error: ## Constrained Values -If you want to use any of the constr +If you want to use any of the constraints. Pydantic includes many type annotations to introduce constraints to your model field values. From 7ba15c7be7e301ea3bbd889c2185f6b24236dbf1 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Mon, 11 Jul 2022 10:50:20 +0300 Subject: [PATCH 2/3] some spelling fixes --- .github/wordlist.txt | 17 +++++++++++++++++ docs/connections.md | 2 +- docs/fastapi_integration.md | 4 ++-- docs/getting_started.md | 8 ++++---- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/wordlist.txt b/.github/wordlist.txt index 7f97bc31..f0f9f9bd 100644 --- a/.github/wordlist.txt +++ b/.github/wordlist.txt @@ -38,3 +38,20 @@ MacOS Homebrew WSL OM's +JSON +fastapi +redis +Pipenv +pyenv +async +Config +runtime +README.md +redisjson +TOC +doctoc +js +APIs +validator +ORM +SQLAlchemy diff --git a/docs/connections.md b/docs/connections.md index 096d00af..2fa3f646 100644 --- a/docs/connections.md +++ b/docs/connections.md @@ -52,7 +52,7 @@ Use the "unix" prefix to connect to Redis over Unix domain sockets: ### To Learn More -To learn more about the URL format that Redis OM Python uses, consult [redis-py's URL documentation](https://redis-py.readthedocs.io/en/stable/#redis.Redis.from_url). +To learn more about the URL format that Redis OM Python uses, consult the [redis-py URL documentation](https://redis-py.readthedocs.io/en/stable/#redis.Redis.from_url). **TIP:** The URL format is the same if you're using async or sync mode with Redis OM (i.e., importing `aredis_om` for async or `redis_om` for sync). diff --git a/docs/fastapi_integration.md b/docs/fastapi_integration.md index a4bbb7be..413ecdce 100644 --- a/docs/fastapi_integration.md +++ b/docs/fastapi_integration.md @@ -30,7 +30,7 @@ This example shows how to manage these two uses of Redis within the same applica Let's look at an example FastAPI app that uses Redis OM. -**NOTE**: This example code requires dependencies to run. To install the dependencies, first clone the [redis-om-fastapi](https://github.com/redis-developer/redis-om-fastapi) repository from GitHub. Then follow the installation steps later in this document or in that repository's README.md file. +**NOTE**: This example code requires dependencies to run. To install the dependencies, first clone the [redis-om-fastapi](https://github.com/redis-developer/redis-om-fastapi) repository from GitHub. Then follow the installation steps later in this document or in that repository's README.md file. ```python import datetime @@ -131,7 +131,7 @@ Get a copy of the value for "pk," which is the model's primary key, and make ano $ curl "http://localhost:8000/customer/01FM2G8EP38AVMH7PMTAJ123TA" {"pk":"01FM2G8EP38AVMH7PMTAJ123TA","first_name":"Andrew","last_name":"Brookins","email":"a@example.com","join_date":"2020-01-02","age":38,"bio":""} -You can also get a list of all customer PKs: +You can also get a list of all customer primary keys: $ curl "http://localhost:8000/customers" {"customers":["01FM2G8EP38AVMH7PMTAJ123TA"]} diff --git a/docs/getting_started.md b/docs/getting_started.md index a017f18b..4c14f7e0 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -17,7 +17,7 @@ python --version Python 3.7.0 ``` -If you don't have Python installed, you can download it from [Python.org](https://www.python.org/downloads/), use [Pyenv](https://github.com/pyenv/pyenv), or install Python with your operating system's package manager. +If you don't have Python installed, you can download it from [Python.org](https://www.python.org/downloads/), use [pyenv](https://github.com/pyenv/pyenv), or install Python with your operating system's package manager. ## Redis @@ -71,7 +71,7 @@ Otherwise, you can start the server manually: $ redis-server start -### macOS with Homebrew +### MacOS with Homebrew $ brew services start redis @@ -427,7 +427,7 @@ type(andrew.join_date) # > datetime.date # The model parsed the string automatically! ``` -This ability to combine parsing (in this case, a YYYY-MM-DD date string) with validation can save you a lot of work. +This ability to combine parsing (in this case, a date string) with validation can save you a lot of work. However, you can turn off coercion -- check the next section on using strict validation. @@ -697,7 +697,7 @@ Customer.find(Customer.last_name == "Brookins").all() # Find all customers that do NOT have the last name "Brookins" Customer.find(Customer.last_name != "Brookins").all() -# Find all customers whose last name is "Brookins" OR whose age is +# Find all customers whose last name is "Brookins" OR whose age is # 100 AND whose last name is "Smith" Customer.find((Customer.last_name == "Brookins") | ( Customer.age == 100 From c9ec6f872bac9b85d5cd41101c9ea7451608cf72 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Mon, 11 Jul 2022 10:56:12 +0300 Subject: [PATCH 3/3] one more --- .github/wordlist.txt | 61 ++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/.github/wordlist.txt b/.github/wordlist.txt index f0f9f9bd..d8be4af1 100644 --- a/.github/wordlist.txt +++ b/.github/wordlist.txt @@ -1,57 +1,58 @@ +APIs +Bader's +CLI +Config +Deserializing FastAPI HashModel +Homebrew +JSON JsonModel +MacOS +OM's +ORM +Pipenv PrimaryKeyCreator Pydantic Pydantic +Pydantic's README +README.md RediSearch RediSearch RedisJSON +SQLAlchemy SSL +TOC +ULIDs UlidPrimaryKey +WSL aioredis +async asyncio cls +coroutines +doctoc +fastapi indexable +io +js +localhost md migrator py +pyenv +redis redisearch +redisjson rediss +runtime +sortable subclasses subclassing -utf -CLI -Pydantic's -sortable subscripted unix -localhost +utf +validator validators -io -ULIDs -Deserializing virtualenv -Bader's -MacOS -Homebrew -WSL -OM's -JSON -fastapi -redis -Pipenv -pyenv -async -Config -runtime -README.md -redisjson -TOC -doctoc -js -APIs -validator -ORM -SQLAlchemy