-
Notifications
You must be signed in to change notification settings - Fork 59
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
docs: miscellaneous edits throughout for style and wording #660
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,27 @@ | ||
# Experimental Features | ||
# Experimental features | ||
|
||
!!! warning | ||
These are experimental features of rattler-build and may change or go away completely. | ||
These are experimental features of `rattler-build` and may change or go away completely. | ||
|
||
|
||
Currently only `build` & `rebuild` command supports the following experimental features. | ||
Currently only the `build` and `rebuild` commands support the following experimental features. | ||
|
||
To enable them use the `--experimental` flag with the command. | ||
To enable them, use the `--experimental` flag with the command. | ||
Or, use the environment variable, `RATTLER_BUILD_EXPERIMENTAL=1`. | ||
|
||
Jinja functions | ||
--------------- | ||
## Jinja functions | ||
|
||
### `load_from_file(<file_path>)` | ||
|
||
The jinja function `load_from_file` allows loading from files, specifically, it allows loading from `toml`, `json` | ||
and `yaml` to an object to allow to fetch things directly from it. | ||
While it loads all other files as strings. | ||
The Jinja function `load_from_file` allows loading from files; specifically, it allows loading from `toml`, `json`, | ||
and `yaml` file types to an object to allow it to fetch things directly from the file. | ||
It loads all other files as strings. | ||
|
||
#### Usage | ||
|
||
This is useful when you have the project description in a well defined project file, such as, `Cargo.toml`, `package.json`, `pyproject.toml`, `package.yaml`, or `stack.yaml`. And would like to keep the recipe as simple as possible, while not worrying about keeping changes in sync, perhaps using it with CI/CD. | ||
`load_from_file` is useful when there is a project description in a well-defined project file such as `Cargo.toml`, `package.json`, `pyproject.toml`, `package.yaml`, or `stack.yaml`. It enables the recipe to be preserved in as simple a state as possible, especially when there is no need to keep the changes in sync; some example use cases for this are with CI/CD infrastructure or when there is a well-defined output format. | ||
|
||
Or, from some other source that provides a well-defined output format. | ||
|
||
Example against `Cargo.toml` inside `rattler-build` github repository: | ||
Below is an example loading a `Cargo.toml` inside of the `rattler-build` GitHub repository: | ||
|
||
``` yaml title="recipe.yaml" | ||
context: | ||
|
@@ -60,11 +57,11 @@ about: | |
license: ${{ load_from_file("Cargo.toml").package.license }} | ||
``` | ||
|
||
### Git functions | ||
### `git` functions | ||
|
||
Git functions are useful for getting the latest tag and commit hash. | ||
`git` functions are useful for getting the latest tag and commit hash. | ||
These can be used in the `context` section of the recipe, to fetch version information | ||
from the git repository. | ||
from a repository. | ||
|
||
???+ example "Examples" | ||
```python | ||
|
@@ -80,8 +77,7 @@ from the git repository. | |
|
||
#### Usage | ||
|
||
These can be useful for automating minor things inside the recipe itself. | ||
Such as if the current version is the latest version, if the current hash is the latest hash, etc. | ||
These can be useful for automating minor things inside of the recipe itself, such as if the current version is the latest version or if the current hash is the latest hash, etc. | ||
|
||
``` yaml title="recipe.yaml" | ||
context: | ||
|
@@ -97,5 +93,4 @@ source: | |
tag: ${{ latest_tag }} | ||
``` | ||
|
||
Though it's important to understand currently we don't guarantee caching for repo fetch for git functions | ||
this may lead to some performance issues. | ||
There is currently no guarantee of caching for repo fetches when using `git` functions. This may lead to some performance issues. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Requesting a confirmation to make sure that the rewording is still accurate here. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph needs double-checking; I want to confirm that the edited wording is still true to the original meaning.