Skip to content

Commit

Permalink
remove the word preview
Browse files Browse the repository at this point in the history
  • Loading branch information
leeederek committed Oct 12, 2023
1 parent 198efd4 commit 8cb9948
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions docs/docs/concepts-reference/locators.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Only locators pointing to public GitHub repositories are currently allowed.
:::

### Important Package Restriction
If your Starlark script relies on local resources of any kind (i.e. files or packages available on your filesystem) then those resources *must* be part of a [Kurtosis package][packages].
If your Starlark script relies on local resources, such as files or packages available on your filesystem, then those resources *must* be part of a [Kurtosis package][packages].

For example, suppose we had a [Kurtosis package][packages] like so:

Expand All @@ -59,15 +59,14 @@ with a `kurtosis.yml` file like so:
name: github.com/package-author/package-repo/my-package
```
In your `main.star` file, yiou would be able to import the `random-script.star` from the `helpers` subdirectory of `my-package` like so:
In your `main.star` file, you would be able to import the `random-script.star` from the `helpers` subdirectory of `my-package` like so:

```python
# Valid
helpers = import_module("github.com/package-author/package-repo/my-package/helpers/random-script.star")
```

However, if you try to import `package-repo/not-a-package/random-script.star`, then it will not work because `package-repo/not-a-package/random-script.star` is not part of a package. In essense, the import statement below will not succeed, because `main.star` cannot import from non-packages:
(see [how import works][how-do-kurtosis-imports-work-explanation] for more information)
However, if you try to import `package-repo/not-a-package/random-script.star`, then it will not work because `package-repo/not-a-package/random-script.star` is not part of a package. In essence, the import statement below will not succeed, because `main.star` cannot import from non-packages (see [how import works][how-do-kurtosis-imports-work-explanation] for more information):

```python
# Invalid
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/starlark-reference/read-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: read_file
sidebar_label: read_file
---

The `read_file` function reads the contents of a file specified by the given [locator][locators-reference] and executes [at interpretation time][multi-phase-runs-reference] so the file contents won't be displayed in the preview. This instruction returns the content of the file in a string type. Please note that the files being read from must themselves be part of a Kurtosis package, as explained [here](../concepts-reference/locators.md#important-package-restriction).
The `read_file` function reads the contents of a file specified by the given [locator][locators-reference] and executes [at interpretation time][multi-phase-runs-reference]. This instruction returns the content of the file in a string type. Please note that the files being read from must themselves be part of a Kurtosis package, as explained [here](../concepts-reference/locators.md#important-package-restriction).

```python
read_file(
Expand Down

0 comments on commit 8cb9948

Please sign in to comment.