From 99f8badb8f62bfb26efbf07490ae8702436c9d04 Mon Sep 17 00:00:00 2001 From: Zachary Moon Date: Fri, 8 Jul 2022 13:47:50 -0600 Subject: [PATCH] Correct typos (#117) * Fix rST typo in docs/algo * Fix some spelling * `.chunk()` --- algorithm.ipynb | 4 ++-- docs/algorithm.rst | 4 ++-- docs/release_notes.rst | 4 ++-- tests/test_algorithm.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/algorithm.ipynb b/algorithm.ipynb index f343b2b..ce7bb95 100644 --- a/algorithm.ipynb +++ b/algorithm.ipynb @@ -330,7 +330,7 @@ " dtype: np.dtype,\n", " max_mem: int) -> Tuple[Tuple[int]]:\n", " \"\"\"\n", - " Calcualte the chunk shape for an intermediate dataset.\n", + " Calculate the chunk shape for an intermediate dataset.\n", " \n", " Parameters\n", " ----------\n", @@ -349,7 +349,7 @@ " assert source_chunk_mem <= max_mem\n", " assert target_chunk_mem <= max_mem\n", "\n", - " # Greatest common demoninator chunks.\n", + " # Greatest common denominator chunks.\n", " # These are the smallest possible chunks which evenly fit into\n", " # both the source and target.\n", " # Example:\n", diff --git a/docs/algorithm.rst b/docs/algorithm.rst index 64ec170..14b641e 100644 --- a/docs/algorithm.rst +++ b/docs/algorithm.rst @@ -12,7 +12,7 @@ The algorithm used by rechunker tries to satisfy several constraints simultaneou means avoiding write locks, which are complex to manage, and inter-worker communication. -The algorithm we chose emerged via a lively disucssion on the +The algorithm we chose emerged via a lively discussion on the `Pangeo Discourse Forum `_. We call it *Push / Pull Consolidated*. @@ -28,7 +28,7 @@ We call it *Push / Pull Consolidated*. A rough sketch of the algorithm is as follows 1. User inputs a source array with a specific shape, chunk structure and - data type. Also specifies ```target_chunks``, the desired chunk structure + data type. Also specifies ``target_chunks``, the desired chunk structure of the output array and ``max_mem``, the maximum amount of memory each worker is allowed to use. 2. Determine the largest batch of data we can *write* by one worker given diff --git a/docs/release_notes.rst b/docs/release_notes.rst index fd096ea..44bc66b 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -10,7 +10,7 @@ v0.5.0 - 2023-04-14 - Fix major bug with dask executor. By `Ryan Abernathey `_. -- Enable xarray `.chunk()` style input for target chunks. +- Enable xarray ``.chunk()`` style input for target chunks. By `Julius Busecke `_. v0.4.2 - 2021-04-27 @@ -43,7 +43,7 @@ v0.3.2 - 2020-12-02 ------------------- - Fixed bug in rechunking of xarray datasets. By `Filipe Fernandes `_. -- Internal improvments to tests and packagaging. By `Filipe Fernandes `_. +- Internal improvements to tests and packagaging. By `Filipe Fernandes `_. - Updates to tutorial. By `Andrew Brettin `_. v0.3.1 - 2020-10-13 diff --git a/tests/test_algorithm.py b/tests/test_algorithm.py index 5b5dc44..1c8fce2 100644 --- a/tests/test_algorithm.py +++ b/tests/test_algorithm.py @@ -33,8 +33,8 @@ def test_consolidate_chunks(shape, chunks, itemsize, max_mem, expected): [ (16, (None, -1), (1, 4)), # do last axis (16, (-1, None), (2, 2)), # do first axis - (32, (None, -1), (1, 8)), # without limts - (32, (None, 4), (1, 4)), # with limts + (32, (None, -1), (1, 8)), # without limits + (32, (None, 4), (1, 4)), # with limits (32, (8, 4), (2, 4)), # spill to next axis (32, (8, None), (4, 2)), (128, (10, None), (8, 2)), # chunk_limit > shape truncated