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

codespell: config, workflow and some typos fixed #120

Merged
merged 5 commits into from
Jul 5, 2023
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
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = .git,*.pdf,*.svg
# clen - variable
# missings - there is an .md
ignore-words-list = clen,missings
22 changes: 22 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Codespell

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v2
2 changes: 1 addition & 1 deletion docs/src/missings.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ julia> readdir(p)

## Dealing with Julia's Missing type in Zarr.jl

Like most data storage formats, also Zarr supports storing most of the standard C-compatible data types like integers, unsigned integers and floating point types of different sizes. This Means that it is no problem to directly map a `Vector{Int64}` to a Zarr array. However, the story gets complicated for arrays containing missings with a Union element type like `Union{Int64,Missing}`, since they can not be passed to compression lbraries as simple C pointers and are not very inter-operable with other lanugages.
Like most data storage formats, also Zarr supports storing most of the standard C-compatible data types like integers, unsigned integers and floating point types of different sizes. This Means that it is no problem to directly map a `Vector{Int64}` to a Zarr array. However, the story gets complicated for arrays containing missings with a Union element type like `Union{Int64,Missing}`, since they can not be passed to compression lbraries as simple C pointers and are not very inter-operable with other languages.

One solution to this problem is to use Zarrs `fillvalue`s to represent missing values. Here we open the previously created array and use the `fill_as_missing` option. In this case accessing an uninitialized array member will return missing:

Expand Down
2 changes: 1 addition & 1 deletion docs/src/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Zarr Array consists of a collection of potentially compressed chunks, and there is a significant overhead in accessing a single item from such an array compared to Julia's Base Array type.

In order to make operations on `ZArray`s still efficient, we use the [DiskArrays](https://github.com/meggart/DiskArrays.jl/) package which enbales efficient broadcast and reductions on `Zarray`s respecting their chunk sizes. This includes some modified behavior compared to a normal `AbstractArray`, including lazy broadcasting and a non-default array access order for reductions.
In order to make operations on `ZArray`s still efficient, we use the [DiskArrays](https://github.com/meggart/DiskArrays.jl/) package which enables efficient broadcast and reductions on `Zarray`s respecting their chunk sizes. This includes some modified behavior compared to a normal `AbstractArray`, including lazy broadcasting and a non-default array access order for reductions.

Please refer to the DiskArrays documentation to see which operations are supported.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/storage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Developing new storage backends

One advantage of the zarr data model is that it can be used in combiantion with a variety of storage backends. Currently in this package there is support for a `DictStore` (keeping data in memory), `DirectoryStore` (writing data to a local disk) and an `S3Store` for S3-compatible object store which is currently read-only. In oder to implement a new storage backend, you would have to create a subtype of `Zarr.AbstractStore` and implement the following methods:
One advantage of the zarr data model is that it can be used in combination with a variety of storage backends. Currently in this package there is support for a `DictStore` (keeping data in memory), `DirectoryStore` (writing data to a local disk) and an `S3Store` for S3-compatible object store which is currently read-only. In order to implement a new storage backend, you would have to create a subtype of `Zarr.AbstractStore` and implement the following methods:
```@meta
CurrentModule = Zarr
```
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/gcstore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ end
Zarr.gcs_credentials(; metadata_url = "http://metadata.google.internal/computeMetadata/v1/")

Set (or renew) the user project, access token and and token type for the Google
Cloud Store from the Meatadata server (assuming the function is executed from
Cloud Store from the Metadata server (assuming the function is executed from
the Google Cloud).
For some data sets, the error message "Bucket is requester pays bucket but no
user project provided" is returned if the credentials are not provided.
Expand Down
2 changes: 1 addition & 1 deletion src/ZArray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ end
"""
zcreate(T, dims...;kwargs)

Creates a new empty zarr aray with element type `T` and array dimensions `dims`. The following keyword arguments are accepted:
Creates a new empty zarr array with element type `T` and array dimensions `dims`. The following keyword arguments are accepted:

* `path=""` directory name to store a persistent array. If left empty, an in-memory array will be created
* `name=""` name of the zarr array, defaults to the directory name
Expand Down
2 changes: 1 addition & 1 deletion src/metadata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Dates: Date, DateTime

"""NumPy array protocol type string (typestr) format

A string providing the basic type of the homogenous array. The basic string format
A string providing the basic type of the homogeneous array. The basic string format
consists of 3 parts: a character describing the byteorder of the data
(<: little-endian, >: big-endian, |: not-relevant), a character code giving the basic
type of the array, and an integer providing the number of bytes the type uses.
Expand Down
2 changes: 1 addition & 1 deletion test/python.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###
### This test is to check against the reference zarr implementation in Python
### We save some data in Julia and python and test if it is still the same
### when read from teh other language
### when read from the other language
###
@testset "Python zarr implementation" begin

Expand Down