Skip to content

Commit

Permalink
ref: first stubs (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl authored Sep 24, 2021
1 parent ecc9a94 commit c22ab08
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 0 deletions.
19 changes: 19 additions & 0 deletions content/docs/ref/pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Command Reference: `pr`

Commit specified files to a new branch and create a pull request.

```dvc
cml pr '**/*.py' '**/*.json'
```

is roughly equivalent to:

```dvc
SHA="$(git log -n1 --format=%h)"
BASE="$(git branch)"
git checkout -b "${BASE}-cml-pr-${SHA}"
git add *.py *.json
git commit -m "CML PR for ${SHA} [skip ci]"
git push
gh pr create -B ${BASE}
```
9 changes: 9 additions & 0 deletions content/docs/ref/publish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Command Reference: `publish`

Publish an image for inclusion in a CML report.

To render an image in a markdown file:

```dvc
cml publish --md ./some-image.png >> report.md
```
4 changes: 4 additions & 0 deletions content/docs/ref/runner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Command Reference: `runner`

Starts a [runner](/doc/self-hosted-runners) (either via any supported cloud
compute provider or locally on-premise).
19 changes: 19 additions & 0 deletions content/docs/ref/send-comment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Command Reference: `send-comment`

```dvc
cml send-comment some_content.md
```

## Common error messages

### Bitbucket

- Can't create a pull request comment: the Pull Request Commit Links application
has not been installed.

We don't like ClickOps either but here's an actual
[quote from the Bitbucket docs](https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bcommit%7D/pullrequests):

> Pull Request Commit Links app must be installed first before using this API;
> installation automatically occurs when 'Go to pull request' is clicked from
> the web interface for a commit's details.
8 changes: 8 additions & 0 deletions content/docs/ref/send-github-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Command Reference: `send-github-check`

Similar to [`send-comment`](/doc/ref/send-comment), but using GitHub's
[checks interface](https://docs.github.com/en/rest/reference/checks).

```dvc
cml send-github-check some_content.md
```
7 changes: 7 additions & 0 deletions content/docs/ref/tensorboard-dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Command Reference: `tensorboard-dev`

Return a link to a <https://tensorboard.dev> page.

```dvc
cml tensorboard-dev
```
31 changes: 31 additions & 0 deletions content/docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,37 @@
"label": "Self-hosted Runners",
"slug": "self-hosted-runners"
},
{
"label": "Command Reference",
"slug": "ref",
"source": false,
"children": [
{
"label": "pr",
"slug": "pr"
},
{
"label": "publish",
"slug": "publish"
},
{
"label": "runner",
"slug": "runner"
},
{
"label": "send-comment",
"slug": "send-comment"
},
{
"label": "send-github-check",
"slug": "send-github-check"
},
{
"label": "tensorboard-dev",
"slug": "tensorboard-dev"
}
]
},
{
"label": "Install as a Package",
"slug": "cml-with-npm"
Expand Down

0 comments on commit c22ab08

Please sign in to comment.