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

Enabled Copy button extension & code highlighting for python and yaml files #30

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions Chapter4/section_one.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ that takes the raw ``HarmonizedWorldSoilDatabase`` dataset as a
parameter and then converts the dataset from a ``.bil`` file to a
``.tif`` file. The ``BILtoTIF`` function then saves the ``.tif`` file.

.. code:: py
.. code:: python

def BILtoTIF(inBilPath,outTifPath):
inBil = gdal.Open(inBilPath)
Expand All @@ -38,7 +38,7 @@ Next, in the ``Data/Soil/bilToTif.py`` file, we have a
``restructureTIF`` function that restructures the ``.tif`` dataset using
the options specified in the ``restructureTIF``.

.. code:: py
.. code:: python

def restructureTIF(in_tif, out_tif):
options = gdal.WarpOptions(
Expand All @@ -63,7 +63,7 @@ We can see the different options specified in the code block above.
The project’s root directory has a ``dvc.yaml`` file. This ``dvc.yaml``
file contains an established DVC pipeline.

.. code:: py
.. code:: yaml


vars:
Expand Down Expand Up @@ -91,7 +91,7 @@ In the root directory, there is a ``.github`` folder that contains a
The ``github/workflows/health-check.yaml`` file holds the GitHub Actions
responsible for recreating this DVC pipeline.

.. code:: py
.. code:: yaml


name: dvc-report
Expand Down
8 changes: 4 additions & 4 deletions Chapter5/section_four.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The bounding box in the code block above receives three parameters:

Replace the bounding box with the code block below.

.. code:: py
.. code:: python

bbox = BoundingBox(
VectorLayer(
Expand All @@ -54,7 +54,7 @@ The classifier layers are shown in the image below.

Replace the classifier layers with this code block below.

.. code:: py
.. code:: python

classifier_layers = [
VectorLayer("LdSpp", os.path.join(layer_root, "inventory", "inv_sample.shp"), Attribute("LdSpp"), tags=[classifier_tag]),
Expand All @@ -77,7 +77,7 @@ the age layer in the image below.

We replace the age layer with this piece of code.

.. code:: py
.. code:: python

# Age - layer name must be "initial_age" so that the script can update the GCBM configuration file.
VectorLayer("initial_age", os.path.join(layer_root, "inventory", "inv_sample.shp"), Attribute("Age"),
Expand All @@ -92,7 +92,7 @@ annual temperature vector layer.

The vector layer is replaced by this raster layer.

.. code:: py
.. code:: python

RasterLayer(os.path.join(layer_root, "environment", "NAmerica_MAT_1971_2000.tif"),
name= "mean_annual_temperature"),
Expand Down
1 change: 1 addition & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx_copybutton'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down