Skip to content

Commit 68d0ff6

Browse files
committed
fix doc build warnings and some syntax
1 parent 31a2b45 commit 68d0ff6

File tree

11 files changed

+96
-76
lines changed

11 files changed

+96
-76
lines changed

docs/api_reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Reference
1+
# API Reference
22

33
## Readers / Writers
44

docs/cli_usage.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,27 @@ Credentials can be automatically fetched from pre-authenticated AWS CLI.
6868
See [here](https://s3fs.readthedocs.io/en/latest/index.html#credentials) for the order `s3fs`
6969
checks them. If it is not pre-authenticated, you need to pass `--storage-options-{input,output}`.
7070

71-
**Prefix:**
71+
**Prefix:**
7272
`s3://`
7373

74-
**Storage Options:**
75-
`key`: The auth key from AWS
74+
**Storage Options:**
75+
`key`: The auth key from AWS
7676
`secret`: The auth secret from AWS
7777

7878
Using UNIX:
7979

8080
```shell
81-
mdio segy import \
82-
path/to/my.segy \
83-
s3://bucket/prefix/my.mdio \
84-
--header-locations 189,193 \
85-
--storage-options-output '{"key": "my_super_private_key", "secret": "my_super_private_secret"}'
81+
$ mdio segy import \
82+
path/to/my.segy \
83+
s3://bucket/prefix/my.mdio \
84+
--header-locations 189,193 \
85+
--storage-options-output '{"key": "my_super_private_key", "secret": "my_super_private_secret"}'
8686
```
8787

8888
Using Windows (note the extra escape characters `\`):
8989

90-
```console
91-
mdio segy import \
90+
```shell
91+
$ mdio segy import \
9292
path/to/my.segy \
9393
s3://bucket/prefix/my.mdio \
9494
--header-locations 189,193 \
@@ -104,30 +104,30 @@ checks them. If it is not pre-authenticated, you need to pass `--storage-options
104104
GCP uses [service accounts](https://cloud.google.com/iam/docs/service-accounts) to pass
105105
authentication information to APIs.
106106

107-
**Prefix:**
107+
**Prefix:**
108108
`gs://` or `gcs://`
109109

110-
**Storage Options:**
110+
**Storage Options:**
111111
`token`: The service account JSON value as string, or local path to JSON
112112

113113
Using a service account:
114114

115115
```shell
116-
mdio segy import \
117-
path/to/my.segy \
118-
gs://bucket/prefix/my.mdio \
119-
--header-locations 189,193 \
120-
--storage-options-output '{"token": "~/.config/gcloud/application_default_credentials.json"}'
116+
$ mdio segy import \
117+
path/to/my.segy \
118+
gs://bucket/prefix/my.mdio \
119+
--header-locations 189,193 \
120+
--storage-options-output '{"token": "~/.config/gcloud/application_default_credentials.json"}'
121121
```
122122

123123
Using browser to populate authentication:
124124

125125
```shell
126-
mdio segy import \
127-
path/to/my.segy \
128-
gs://bucket/prefix/my.mdio \
129-
--header-locations 189,193 \
130-
--storage-options-output '{"token": "browser"}'
126+
$ mdio segy import \
127+
path/to/my.segy \
128+
gs://bucket/prefix/my.mdio \
129+
--header-locations 189,193 \
130+
--storage-options-output '{"token": "browser"}'
131131
```
132132

133133
### Microsoft Azure
@@ -136,19 +136,19 @@ There are various ways to authenticate with Azure Data Lake (ADL).
136136
See [here](https://github.com/fsspec/adlfs#details) for some details.
137137
If ADL is not pre-authenticated, you need to pass `--storage-options-{input,output}`.
138138

139-
**Prefix:**
139+
**Prefix:**
140140
`az://` or `abfs://`
141141

142-
**Storage Options:**
143-
`account_name`: Azure Data Lake storage account name
142+
**Storage Options:**
143+
`account_name`: Azure Data Lake storage account name
144144
`account_key`: Azure Data Lake storage account access key
145145

146146
```shell
147-
mdio segy import \
148-
path/to/my.segy \
149-
az://bucket/prefix/my.mdio \
150-
--header-locations 189,193 \
151-
--storage-options-output '{"account_name": "myaccount", "account_key": "my_super_private_key"}'
147+
$ mdio segy import \
148+
path/to/my.segy \
149+
az://bucket/prefix/my.mdio \
150+
--header-locations 189,193 \
151+
--storage-options-output '{"account_name": "myaccount", "account_key": "my_super_private_key"}'
152152
```
153153

154154
### Advanced Cloud Features

docs/data_models/chunk_grids.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ conceptual and visually not to scale.
133133

134134
```{eval-rst}
135135
.. autopydantic_model:: RegularChunkGrid
136+
136137
----------
138+
137139
.. autopydantic_model:: RegularChunkShape
138140
```
139141

@@ -143,7 +145,9 @@ conceptual and visually not to scale.
143145

144146
```{eval-rst}
145147
.. autopydantic_model:: RectilinearChunkGrid
148+
146149
----------
150+
147151
.. autopydantic_model:: RectilinearChunkShape
148152
```
149153

docs/data_models/compressors.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,16 @@ For more details about compression modes, see [ZFP Documentation].
6565

6666
```{eval-rst}
6767
.. autopydantic_model:: Blosc
68+
6869
----------
70+
6971
.. autoclass:: BloscAlgorithm()
7072
:members:
7173
:undoc-members:
7274
:member-order: bysource
75+
7376
----------
77+
7478
.. autoclass:: BloscShuffle()
7579
:members:
7680
:undoc-members:
@@ -84,7 +88,9 @@ For more details about compression modes, see [ZFP Documentation].
8488

8589
```{eval-rst}
8690
.. autopydantic_model:: ZFP
91+
8792
----------
93+
8894
.. autoclass:: ZFPMode()
8995
:members:
9096
:undoc-members:

docs/data_models/data_types.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Scalar types are used to represent numbers and boolean values in MDIO arrays.
2222
```{eval-rst}
2323
.. autosummary::
2424
:nosignatures:
25+
2526
ScalarType
2627
```
2728

@@ -125,6 +126,7 @@ efficient access and manipulation.
125126
```{eval-rst}
126127
.. autosummary::
127128
:nosignatures:
129+
128130
StructuredType
129131
StructuredField
130132
```
@@ -248,7 +250,9 @@ This will yield an in-memory or on-disk struct that looks like this (for each el
248250

249251
```{eval-rst}
250252
.. autopydantic_model:: StructuredType
253+
251254
----------
255+
252256
.. autopydantic_model:: StructuredField
253257
```
254258

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def docs_build(session: Session) -> None:
237237
def docs(session: Session) -> None:
238238
"""Build and serve the documentation with live reloading on file changes."""
239239
ignore = [
240-
"docs/jupyter_execute/tutorials/quickstart.ipynb",
240+
"docs/jupyter_execute/*",
241241
]
242242
args = ["--open-browser", "docs", "docs/_build", "--ignore", *ignore]
243243
args = session.posargs or args

poetry.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mdio/commands/segy.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
following, per the SEG-Y Rev1 standard:
4343
4444
\b
45-
--header-names inline,crossline
45+
`--header-names inline,crossline
4646
--header-locations 189,193
4747
--header-types int32,int32
4848
@@ -142,7 +142,7 @@
142142
help="Option to add grid overrides.",
143143
type=JSON,
144144
)
145-
def segy_import(
145+
def segy_import( # noqa: PLR0913
146146
segy_path: str,
147147
mdio_path: str,
148148
header_locations: list[int],
@@ -155,7 +155,7 @@ def segy_import(
155155
storage_options_output: dict[str, Any],
156156
overwrite: bool,
157157
grid_overrides: dict[str, Any],
158-
):
158+
) -> None:
159159
"""Ingest SEG-Y file to MDIO.
160160
161161
SEG-Y format is explained in the "segy" group of the command line
@@ -224,6 +224,7 @@ def segy_import(
224224
225225
Usage:
226226
227+
\b
227228
Below are some examples of ingesting standard SEG-Y files per
228229
the SEG-Y Revision 1 and 2 formats.
229230
@@ -269,8 +270,9 @@ def segy_import(
269270
wrapped channel numbers. Note the missing byte location and type
270271
for the "cable" index.
271272
272-
273273
Usage:
274+
275+
\b
274276
3D Seismic Shot Data (Byte Locations Vary):
275277
Let's assume streamer number does not exist but there are
276278
800 channels per cable.
@@ -279,8 +281,7 @@ def segy_import(
279281
--header-names shot,cable,chan
280282
--header-types int32,None,int32
281283
--chunk-size 8,2,256,512
282-
--grid-overrides '{"ChannelWrap": True, "ChannelsPerCable": 800,
283-
"CalculateCable": True}'
284+
--grid-overrides '{"ChannelWrap": True, "ChannelsPerCable": 800, "CalculateCable": True}'
284285
285286
\b
286287
If we do have cable numbers in the headers, but channels are still
@@ -294,6 +295,7 @@ def segy_import(
294295
For shot gathers with channel numbers and wrapped channels, no
295296
grid overrides are necessary.
296297
298+
\b
297299
In cases where the user does not know if the input has unwrapped
298300
channels but desires to store with wrapped channel index use:
299301
--grid-overrides '{"AutoChannelWrap": True}'
@@ -343,7 +345,7 @@ def segy_import(
343345
--header-types int32,int16,int32
344346
--chunk-size 8,2,256,512
345347
--grid-overrides '{"HasDuplicates": True}'
346-
"""
348+
""" # noqa: D301
347349
from mdio import segy_to_mdio
348350

349351
segy_to_mdio(
@@ -397,7 +399,7 @@ def segy_export(
397399
access_pattern: str,
398400
storage_options: dict[str, Any],
399401
endian: str,
400-
):
402+
) -> None:
401403
"""Export MDIO file to SEG-Y.
402404
403405
SEG-Y format is explained in the "segy" group of the command line

0 commit comments

Comments
 (0)