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

split docs/produtct dependencies #621

Merged
merged 14 commits into from
Aug 16, 2024
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
run: yarn typecheck
- name: compile
run: yarn compile
- name: package vscode
run: yarn package
- name: compile system scripts
run: yarn test:system
- name: compile tests
Expand All @@ -35,5 +37,5 @@ jobs:
run: yarn test:samples
- name: docs
run: yarn build:docs
- name: package vscode
run: yarn package
- name: slides
run: yarn build:slides
33,467 changes: 3,224 additions & 30,243 deletions THIRD_PARTY_LICENSES.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions docs/genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"version": "1.49.1",
"license": "MIT",
"scripts": {
"install:force": "rm yarn.lock && yarn install",
"dev": "astro dev --host",
"start": "astro dev --host",
"check": "astro check",
"build": "npx --yes astro build",
"build": "astro build",
"build:asw": "rm -Rf distasw && mkdir distasw && touch distasw/index.html && mkdir distasw/genaiscript && cp -r dist/* distasw/genaiscript",
"preview": "astro preview",
"astro": "astro",
Expand All @@ -18,12 +19,12 @@
"genai:alt-text": "node scripts/image-alt-text.mjs"
},
"dependencies": {
"@astrojs/check": "^0.9.1",
"@astrojs/starlight": "^0.25.3",
"astro": "^4.13.1",
"@astrojs/check": "^0.9.2",
"@astrojs/starlight": "^0.25.5",
"astro": "^4.14.2",
"typescript": "5.5.4"
},
"devDependencies": {
"zx": "^8.1.4"
}
}
}
10 changes: 5 additions & 5 deletions docs/src/content/docs/reference/cli/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@
-rmo, --remove-out remove output folder if it exists
--cli <string> override path to the cli
-tp, --test-provider <string> test provider
-td, --test-delay <string> delay between tests in seconds

Check failure on line 87 in docs/src/content/docs/reference/cli/commands.md

View workflow job for this annotation

GitHub Actions / build

The option name `--promptfoo-version` seems incorrect. It should be `--prompt-version`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option name --promptfoo-version seems incorrect. It should likely be --prompt-version.

generated by pr-docs-review-commit option_name

--no-cache disable LLM result cache
-v, --verbose verbose output
-pv, --promptfoo-version [version] promptfoo version, default is ^0.75.2
-pv, --promptfoo-version [version] promptfoo version, default is 0.78.0
-os, --out-summary <file> append output summary in file
-h, --help display help for command
```
Expand Down Expand Up @@ -291,11 +291,11 @@
Options:
-h, --help display help for command

Commands:

Check failure on line 294 in docs/src/content/docs/reference/cli/commands.md

View workflow job for this annotation

GitHub Actions / build

The command usage for `fence` is missing the `<file>` argument.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command usage for fence is missing the <file> argument.

generated by pr-docs-review-commit command_usage

fence <language> Extracts a code fenced regions of the given type
fence <language> <file> Extracts a code fenced regions of the given type
pdf <file> Parse a PDF into text
docx <file> Parse a DOCX into texts
html-to-text [file] Parse an HTML file into text
html-to-text <file> Parse an HTML file into text

Check failure on line 298 in docs/src/content/docs/reference/cli/commands.md

View workflow job for this annotation

GitHub Actions / build

The command usage for `html-to-text` is missing the `<file>` argument.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command usage for html-to-text is missing the <file> argument.

generated by pr-docs-review-commit command_usage

code <file> [query] Parse code using tree sitter and executes a
query
tokens [options] <files...> Count tokens in a set of files
Expand All @@ -305,7 +305,7 @@
### `parse fence`

```
Usage: genaiscript parse fence [options] <language>
Usage: genaiscript parse fence [options] <language> <file>

Check failure on line 308 in docs/src/content/docs/reference/cli/commands.md

View workflow job for this annotation

GitHub Actions / build

The command usage for `parse fence` is missing the `<file>` argument.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command usage for parse fence is missing the <file> argument.

generated by pr-docs-review-commit command_usage


Extracts a code fenced regions of the given type

Expand Down Expand Up @@ -338,7 +338,7 @@
### `parse html-to-text`

```
Usage: genaiscript parse html-to-text [options] [file]
Usage: genaiscript parse html-to-text [options] <file>

Check failure on line 341 in docs/src/content/docs/reference/cli/commands.md

View workflow job for this annotation

GitHub Actions / build

The command usage for `parse html-to-text` is missing the `<file>` argument.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command usage for parse html-to-text is missing the <file> argument.

generated by pr-docs-review-commit command_usage


Parse an HTML file into text

Expand Down
8 changes: 8 additions & 0 deletions docs/src/content/docs/reference/scripts/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@
const data = await workspace.readJSON("data.json")
```

### `readXML`

Reads the content of a file as XML.

```ts
const data = await workspace.readXML("data.xml")
```

Check notice on line 88 in docs/src/content/docs/reference/scripts/files.md

View workflow job for this annotation

GitHub Actions / build

A new feature `readXML` has been documented. Ensure that the implementation details and usage examples are correct and consistent with the rest of the documentation.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readXML function is added without a description of its behavior or use cases.

generated by pr-docs-review-commit missing_example_description

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readXML function is added but there is no explanation or details provided about its usage or behavior.

generated by pr-docs-review-commit missing_documentation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new readXML function has been documented. Ensure that the implementation matches the documentation.

generated by pr-docs-review-commit new_feature


### `writeText`

Writes text to a file, relative to the workspace root.
Expand Down
13 changes: 12 additions & 1 deletion docs/src/content/docs/reference/scripts/parsers.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,21 @@

## XML

The `parsers.XML` function parses for the [XML format](https://en.wikipedia.org/wiki/XML).

```js
const res = parsers.XML("<xml></xml>")
const res = parsers.XML('<xml attr="1"><child /></xml>')
```

Attribute names are prepended with "@_".

```json
{
"xml": {
"@_attr": "1",
"child": {}
}
}

Check notice on line 117 in docs/src/content/docs/reference/scripts/parsers.md

View workflow job for this annotation

GitHub Actions / build

The `parsers.XML` function documentation has been updated with more details on how attributes are parsed. Verify that the example and attribute naming convention are consistent with the actual parser implementation.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code fence around the JSON example should be js or javascript, not ```json, since the content is not valid JSON due to the unquoted keys.

generated by pr-docs-review-commit incorrect_code_fence

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example provided for parsers.XML function is in JSON format, which is inconsistent with the context that should show an XML parsing example.

generated by pr-docs-review-commit incorrect_example

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parsers.XML function documentation has been updated with more details on how attributes are parsed. Ensure that the implementation matches the documentation.

generated by pr-docs-review-commit xml_parsing_details

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parsers.XML function documentation has been updated with new information about attribute naming conventions. Ensure that the implementation matches the documentation.

generated by pr-docs-review-commit new_feature

```

## front matter
Expand Down
Loading