@@ -81,7 +81,7 @@ magic numbers you will also need to set the ``binary`` attr to True.
81
81
82
82
83
83
Formats will contain metadata in a separate header file can be defined using
84
- the `` WithSeparateHeader ` ` mixin.
84
+ the :class: ` . WithSeparateHeader ` mixin.
85
85
86
86
.. code-block :: python
87
87
@@ -113,10 +113,10 @@ return a dictionary containing metadata for the file-set.
113
113
' 0001'
114
114
115
115
116
- Similar to `` WithSeparateHeader ``, `` WithSideCars ` ` can be used to define a format that
116
+ Similar to :class: ` . WithSeparateHeader `, :class: ` . WithSideCars ` can be used to define a format that
117
117
contains some metadata within the main file, and additional metadata in a separate
118
- "side-car" file. It can be used the same as `` WithSeparateHeader ` `, however, the
119
- type of the primary file that reads the metadata from the binary file with ``read_metadata ``
118
+ "side-car" file. It can be used the same as :class: ` . WithSeparateHeader `, however, the
119
+ type of the primary file that reads the metadata from the binary file with ``read_metadata() ``
120
120
must also be defined in ``primary_type ``
121
121
122
122
@@ -137,7 +137,7 @@ for your format. This is simply done by adding a new property to the class using
137
137
138
138
Take for example the `GIS shapefile structure <https://www.earthdatascience.org/courses/earth-analytics/spatial-data-r/shapefile-structure/ >`_,
139
139
it is a file-set consisting of 3 to 6 files differentiated by their extensions. To
140
- implement this class we use the ``@property `` decorator. We inherit from the `` WithAdjacentFiles ` `
140
+ implement this class we use the ``@property `` decorator. We inherit from the :class: ` . WithAdjacentFiles `
141
141
mixin so that neighbouring files (i.e. files with the same stem but different extension)
142
142
are included when the class is instantiated with just the primary ".shp" file.
143
143
@@ -219,7 +219,7 @@ Properties that appear in ``fspaths`` attribute of the object are considered to
219
219
even when the ``trim `` argument is set to True.
220
220
221
221
After the required properties have been deeper checks can be by using the ``check ``
222
- decorator. Take the `` fileformats.image.Tiff ` ` class
222
+ decorator. Take the :class: ` fileformats.image.Tiff ` class
223
223
224
224
.. code-block :: python
225
225
@@ -248,10 +248,9 @@ decorator. Take the ``fileformats.image.Tiff`` class
248
248
)
249
249
return endianness
250
250
251
- The `` Tiff ` ` format class needs to check two different magic numbers, one for big endian
251
+ The :class: ` . Tiff ` format class needs to check two different magic numbers, one for big endian
252
252
files and another one for little endian files. Therefore we can't just use the
253
- ``WithMagicNumber `` mixin and have to roll our own, ``endianness `` is decorated with
254
- ``fileformats.core.mark.check ``.
253
+ :class: `.WithMagicNumber ` mixin and have to roll our own.
255
254
256
255
257
256
Extra methods
0 commit comments