Skip to content

Commit

Permalink
fix: quickstart improvements #605
Browse files Browse the repository at this point in the history
  • Loading branch information
supersergiy authored Jan 15, 2024
2 parents b02f1b4 + 45e09c4 commit e46f7c8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Datasets
--------

You can wrap any layer (include layer set) as a Pytorch dataset.
In this example we will make a dataset out of the followign layer set:
In this example we will make a dataset out of the following layer set:

.. doctest::

Expand Down
2 changes: 1 addition & 1 deletion docs/source/subchunkable_apply_flow_quick_start_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ CUE Files

With the builder, a dictionary is all we need to specify a function call. The dictionary can be specified in any structured language, CUE

``zetta_utils`` uses **CUE** files for configuring a run. CUE is an open-source data validation language that is a superset of JSON.
``zetta_utils`` uses **CUE** files for configuring a run. `CUE <https://cuelang.org/>`_ is an open-source data validation language that is a superset of JSON. To proceed with this tutorial, be sure you have cuelang `installed <https://cuelang.org/docs/install/>`_.

.. collapse:: Why not just use Python or JSON?

Expand Down
6 changes: 6 additions & 0 deletions zetta_utils/parsing/cue.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""cuelang parsing."""
import os
import pathlib
import shutil
import subprocess
import tempfile

Expand All @@ -24,6 +25,11 @@ def loads(s: str):


def load_local(local_path: str):
if shutil.which(cue_exe) is None: # pragma: no cover
raise RuntimeError(
f"{cue_exe} not found. Please ensure cuelang is installed ( https://cuelang.org/ )"
)

local_path_str = _to_str_path(local_path)
command_result = subprocess.run(
[cue_exe, "export", local_path_str], capture_output=True, check=False
Expand Down

0 comments on commit e46f7c8

Please sign in to comment.