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

Joe/quickstart tweaks #605

Merged
merged 4 commits into from
Jan 15, 2024
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
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
Loading