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

Generate one-page CLI reference document #64

Merged
merged 5 commits into from
Mar 5, 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
8 changes: 4 additions & 4 deletions .github/workflows/nightly-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand All @@ -39,8 +39,8 @@ jobs:
name: 'Nightly Builds Download for KitOps CLI (kit)'
prerelease: true
body: |
Welcome to the cutting edge! Our nightly builds offer the most recent developments
in kit CLI, providing early access to new features, enhancements, and
Welcome to the cutting edge! Our nightly builds offer the most recent developments
in kit CLI, providing early access to new features, enhancements, and
fixes that are on their way to the next stable release'
files: |
./dist/*.txt
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Check build
run: |
if ! go build; then
if ! go build -o kit; then
echo "Project does not build"
exit 1
fi
Expand All @@ -46,3 +46,21 @@ jobs:
echo "Project tests failed"
exit 1
fi

- name: Check CLI docs generation
run: |
docs/src/docs/cli/generate.sh > /dev/null
if [[ ! -z $(git status -s) ]]; then
echo "CLI documentation is out of date"
echo "Run docs/src/docs/cli/generate.sh and commit the result"
exit 1
fi

- name: Check for trailing whitespace
run: |
files=$(grep -E -lI --exclude '*.svg' --exclude 'docs/*' " +$" $(git ls-files) || true)
if [ ! -z $files ]; then
echo "Trailing whitespace in files:"
echo "$files"
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
6 changes: 3 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ builds:
- windows
- darwin
binary: kit
ldflags:

ldflags:
- -s -w -X kitops/pkg/cmd/version.Version={{.Version}} -X kitops/pkg/cmd/version.GitCommit={{.Commit}} -X kitops/pkg/cmd/version.BuildTime={{.Date}}

archives:
Expand Down Expand Up @@ -53,6 +53,6 @@ release:

footer: |
Thanks for supporting Kitops.

name_template: "{{.ProjectName}}-{{.Version}}"
skip_upload: false
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ We welcome many different types of contributions including:
* Communications, social media, blog posts, or other marketing
* Release management

Not everything happens through a GitHub pull request. Please contact us in the [#general channel of our Discord server](https://discord.gg/XzSmtPn3) or during our [office hours meeting](./GOVERNANCE.md#meetings) and let's discuss how we can work together.
Not everything happens through a GitHub pull request. Please contact us in the [#general channel of our Discord server](https://discord.gg/XzSmtPn3) or during our [office hours meeting](./GOVERNANCE.md#meetings) and let's discuss how we can work together.

## Development Environment Setup

Expand Down Expand Up @@ -70,9 +70,9 @@ Git has a `-s` command line option to do this automatically:
git commit -s -m 'This is my commit message'

If you forgot to do this and have not yet pushed your changes to the remote
repository, you can amend your commit with the sign-off by running
repository, you can amend your commit with the sign-off by running

git commit --amend -s
git commit --amend -s

## Pull Request Checklist

Expand Down
2 changes: 1 addition & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To become a Maintainer you need to demonstrate the following:
* Ability to collaborate with the team
* Understanding of how the team works (policies, processes for testing and code review, etc)
* Understanding of the project's code base and coding and documentation style

A new Maintainer must be proposed by an existing maintainer by sending a message in the #general channel in the [KitOps Discord server](https://discord.gg/XzSmtPn3). A simple majority vote of existing Maintainers approves the application. Maintainers nominations will be evaluated without prejudice to employer or demographics.

Maintainers who are selected will be granted the necessary GitHub rights, and invited to the private Maintainers Discord channel.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Then run the project:
./kit
```

Alternatively
Alternatively

```shell
go run kit
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
var (
shortDesc = `Streamline the lifecycle of AI/ML models`
longDesc = `Kit is a tool for efficient AI/ML model lifecycle management.

Find more information at: http://kitops.ml`
)

Expand Down
4 changes: 2 additions & 2 deletions demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Follow these steps to run the demo scripts successfully:

2. **Navigate to the Demo Directory:** Change your current working directory to the demo's directory by using the `cd` command followed by the path to the directory. For example:

```shell
```shell
cd kitops/demo/
```

Expand All @@ -28,4 +28,4 @@ Make sure that `my-demo.sh` is the correct name of the demo script you intend to
chmod +x my-demo.sh
```

Before running these steps, ensure that you have any dependencies or environmental requirements satisfied which are usually recorded as comments on the `.sh` file.
Before running these steps, ensure that you have any dependencies or environmental requirements satisfied which are usually recorded as comments on the `.sh` file.
4 changes: 2 additions & 2 deletions demos/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi
clear


pe "./kit version"
pe "./kit version"

# Let's check if there are any model kits locally
pe "./kit list"
Expand All @@ -53,7 +53,7 @@ pe "./kit build ../examples/onnx -t localhost:5050/test-repo:test-tag"
pe "./kit list"

# run a local registry
pe "$DOCKER run --name registry --rm -d -p 5050:5050 -e REGISTRY_HTTP_ADDR=:5050 registry"
pe "$DOCKER run --name registry --rm -d -p 5050:5050 -e REGISTRY_HTTP_ADDR=:5050 registry"

# Let's push the model to the local registry
pe "./kit push localhost:5050/test-repo:test-tag --http"
Expand Down
2 changes: 2 additions & 0 deletions docs/src/docs/cli/cli-reference.header
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Kit CLI Reference

Loading