diff --git a/.github/workflows/nightly-build.yaml b/.github/workflows/nightly-build.yaml index ff7b5120..89a1e224 100644 --- a/.github/workflows/nightly-build.yaml +++ b/.github/workflows/nightly-build.yaml @@ -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: @@ -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 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 5a30e346..248739cb 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -55,3 +55,12 @@ jobs: echo "Run docs/src/docs/cli/generate.sh and commit the result" exit 1 fi + + - name: Check for trailing whitespace + run: | + files=$(egrep -lI --exclude '*.svg' --exclude 'docs/*' " +$" $(git ls-files)) + if [ ! -z $files ]; then + echo "Trailing whitespace in files:" + echo "$files" + exit 1 + fi diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c50135b1..5d22ae2e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 283f1dfa..d6323177 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -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: @@ -53,6 +53,6 @@ release: footer: | Thanks for supporting Kitops. - + name_template: "{{.ProjectName}}-{{.Version}}" skip_upload: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 71f4d1c8..92b6a289 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 @@ -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 diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 1a35fce8..56cbfcd9 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -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. diff --git a/README.md b/README.md index bd045ea0..403731cd 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Then run the project: ./kit ``` -Alternatively +Alternatively ```shell go run kit diff --git a/cmd/root.go b/cmd/root.go index 735fe3b0..1f2db257 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -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` ) diff --git a/demos/README.md b/demos/README.md index a4917bb9..b47304f7 100644 --- a/demos/README.md +++ b/demos/README.md @@ -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/ ``` @@ -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. diff --git a/demos/demo.sh b/demos/demo.sh index 0d68410a..4cc41479 100755 --- a/demos/demo.sh +++ b/demos/demo.sh @@ -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" @@ -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" diff --git a/docs/src/docs/cli/cli-reference.md b/docs/src/docs/cli/cli-reference.md index 6ae3546b..d46cd693 100644 --- a/docs/src/docs/cli/cli-reference.md +++ b/docs/src/docs/cli/cli-reference.md @@ -5,15 +5,15 @@ Builds a modelkit ### Synopsis -Build a modelkit from a kitfile using the given context directory. +Build a modelkit from a kitfile using the given context directory. -The build process involves taking the configuration and resources defined in +The build process involves taking the configuration and resources defined in your kitfile and using them to create a modelkit. This modelkit is then stored -in your local registry, making it readily available for further actions such +in your local registry, making it readily available for further actions such as pushing to a remote registry for collaboration. -Unless a different location is specified, this command looks for the k itfile -at the root of the provided context directory. Any relative paths defined +Unless a different location is specified, this command looks for the k itfile +at the root of the provided context directory. Any relative paths defined within the kitfile are interpreted as being relative to this context directory. ``` @@ -52,12 +52,12 @@ Produce the components from a modelkit on the local filesystem ### Synopsis Produces all or selected components of a modelkit on the local filesystem. - -This command exports a modelkit's components, including models, code, datasets, -and configuration files, to a specified directory on the local filesystem. -By default, it attempts to find the modelkit in local storage; if not found, it -searches the remote registry and retrieves it. This process ensures that the -necessary components are always available for export, optimizing for efficiency + +This command exports a modelkit's components, including models, code, datasets, +and configuration files, to a specified directory on the local filesystem. +By default, it attempts to find the modelkit in local storage; if not found, it +searches the remote registry and retrieves it. This process ensures that the +necessary components are always available for export, optimizing for efficiency by fetching only specified components from the remote registry when necessary ``` @@ -105,16 +105,16 @@ List modelkits in a repository Displays a list of modelkits available in a repository. -This command provides an overview of modelkits stored either in the local -repository or a specified remote repository. It displays each modelkit along -with its associated tags and the cumulative size of its contents. Modelkits +This command provides an overview of modelkits stored either in the local +repository or a specified remote repository. It displays each modelkit along +with its associated tags and the cumulative size of its contents. Modelkits comprise multiple artifacts, including models, datasets, code, and configuration, designed to enhance reusability and modularity. However, this command focuses on the aggregate rather than listing individual artifacts. Each modelkit entry includes its DIGEST, a unique identifier that ensures -distinct versions of a modelkit are easily recognizable, even if they share the -same name or tags. Modelkits with multiple tags or repository names will appear +distinct versions of a modelkit are easily recognizable, even if they share the +same name or tags. Modelkits with multiple tags or repository names will appear multiple times in the list, distinguished by their DIGEST. The SIZE displayed for each modelkit represents the total storage space occupied @@ -224,7 +224,7 @@ Retrieve modelkits from a remote registry to your local environment. ### Synopsis -Downloads modelkits from a specified registry. The downloaded +Downloads modelkits from a specified registry. The downloaded modelkits are stored in the local registry. ``` @@ -261,7 +261,7 @@ Uploads modelkits to a specified registry This command pushes modelkits to a remote registry. -The modelkits should be tagged with the target registry and repository before +The modelkits should be tagged with the target registry and repository before they can be pushed ``` @@ -341,37 +341,37 @@ Create a tag that refers to a modelkit Create or update a tag that refers to -This command assigns a new tag to an existing modelkit (source-modelkit) or -updates an existing tag, effectively renaming or categorizing modelkits for +This command assigns a new tag to an existing modelkit (source-modelkit) or +updates an existing tag, effectively renaming or categorizing modelkits for better organization and version control. Tags are identifiers linked to specific modelkit versions within a repository. -A full modelkit reference has the following format: +A full modelkit reference has the following format: [HOST[:PORT_NUMBER]/][NAMESPACE/]REPOSITORY[:TAG] * HOST: Optional. The registry hostname where the ModelKit is located. Defaults - to localhost if unspecified. Must follow standard DNS rules + to localhost if unspecified. Must follow standard DNS rules (excluding underscores). - * PORT_NUMBER: Optional. Specifies the registry's port number if a hostname is + * PORT_NUMBER: Optional. Specifies the registry's port number if a hostname is provided. - * NAMESPACE: Represents a user or organization's namespace, consisting of - slash-separated components that may include lowercase letters, digits, and + * NAMESPACE: Represents a user or organization's namespace, consisting of + slash-separated components that may include lowercase letters, digits, and specific separators (periods, underscores, hyphens). - - * REPOSITORY: The name of the repository, typically corresponding to the + + * REPOSITORY: The name of the repository, typically corresponding to the modelkit's name. - * TAG: A human-readable identifier for the modelkit version or variant. Valid + * TAG: A human-readable identifier for the modelkit version or variant. Valid ASCII characters include lowercase and uppercase letters, digits, underscores, - periods, and hyphens. It cannot start with a period or hyphen and is limited + periods, and hyphens. It cannot start with a period or hyphen and is limited to 128 characters. Tagging is a powerful way to manage different versions or configurations of your -modelkits, making it easier to organize, retrieve, and deploy specific -iterations. Ensure tags are meaningful and consistent across your team or +modelkits, making it easier to organize, retrieve, and deploy specific +iterations. Ensure tags are meaningful and consistent across your team or organization to maintain clarity and avoid confusion. ``` @@ -405,8 +405,8 @@ Display the version information for the CLI The version command prints detailed version information. -This information includes the current version of the tool, the Git commit that -the version was built from, the build time, and the version of Go it was +This information includes the current version of the tool, the Git commit that +the version was built from, the build time, and the version of Go it was compiled with. ``` diff --git a/docs/src/docs/cli/installation.md b/docs/src/docs/cli/installation.md index 27680972..c18e7ee5 100644 --- a/docs/src/docs/cli/installation.md +++ b/docs/src/docs/cli/installation.md @@ -1,6 +1,6 @@ -# Installation Guide for `kit` CLI +# Installation Guide for `kit` CLI -## Installation from GitHub Releases +## Installation from GitHub Releases Welcome to the installation guide for the `kit`! This guide is designed to help you quickly and easily install the `kit` on your machine. ### Step 1: Downloading the `kit` @@ -93,7 +93,7 @@ This command should display the version number of `kit` you have installed, indi ## Installation from Source -For those who prefer or require building `kit` from the source code, this section will guide you through the necessary steps. +For those who prefer or require building `kit` from the source code, this section will guide you through the necessary steps. ### Prerequisites diff --git a/docs/src/docs/kitfile/kf-overview.md b/docs/src/docs/kitfile/kf-overview.md index 0a85d708..5c994f72 100644 --- a/docs/src/docs/kitfile/kf-overview.md +++ b/docs/src/docs/kitfile/kf-overview.md @@ -1,3 +1,3 @@ # Kitfiles -A Kitfile is a manifest showing what is in \ No newline at end of file +A Kitfile is a manifest showing what is in \ No newline at end of file diff --git a/pkg/artifact/spec.md b/pkg/artifact/spec.md index f9e13311..f2c7a416 100644 --- a/pkg/artifact/spec.md +++ b/pkg/artifact/spec.md @@ -8,7 +8,7 @@ A **ModelKit** represents a comprehensive bundle of AI/ML artifacts, including m **Artifacts:** The building blocks of a ModelKit. Artifacts can be models, datasets, or code, each stored and addressed individually. This modular approach facilitates direct access via tools. Artifact metadata is encapsulated within the kitfile, ensuring comprehensive documentation of each component. -The artifacts and their media types are +The artifacts and their media types are * Serialized Model: `application/vnd.kitops.modelkit.model.v1.tar+gzip` * Datasets: `application/vnd.kitops.modelkit.dataset.v1.tar+gzip` * Code: `application/vnd.kitops.modelkit.code.v1.tar+gzip` @@ -28,7 +28,7 @@ The artifacts and their media types are ## ModelKit Manifest Example -Example of a ModelKit manifest with a single serialized model and kitfile. +Example of a ModelKit manifest with a single serialized model and kitfile. ```JSON { diff --git a/pkg/cmd/build/cmd.go b/pkg/cmd/build/cmd.go index 2a42c25c..5b461856 100644 --- a/pkg/cmd/build/cmd.go +++ b/pkg/cmd/build/cmd.go @@ -19,15 +19,15 @@ import ( const ( shortDesc = `Builds a modelkit` - longDesc = `Build a modelkit from a kitfile using the given context directory. + longDesc = `Build a modelkit from a kitfile using the given context directory. -The build process involves taking the configuration and resources defined in +The build process involves taking the configuration and resources defined in your kitfile and using them to create a modelkit. This modelkit is then stored -in your local registry, making it readily available for further actions such +in your local registry, making it readily available for further actions such as pushing to a remote registry for collaboration. -Unless a different location is specified, this command looks for the k itfile -at the root of the provided context directory. Any relative paths defined +Unless a different location is specified, this command looks for the k itfile +at the root of the provided context directory. Any relative paths defined within the kitfile are interpreted as being relative to this context directory.` examples = `# Build a modelkit using the kitfile in the current directory diff --git a/pkg/cmd/export/cmd.go b/pkg/cmd/export/cmd.go index b20123b7..ca9bdae5 100644 --- a/pkg/cmd/export/cmd.go +++ b/pkg/cmd/export/cmd.go @@ -19,12 +19,12 @@ import ( const ( shortDesc = `Produce the components from a modelkit on the local filesystem` longDesc = `Produces all or selected components of a modelkit on the local filesystem. - -This command exports a modelkit's components, including models, code, datasets, -and configuration files, to a specified directory on the local filesystem. -By default, it attempts to find the modelkit in local storage; if not found, it -searches the remote registry and retrieves it. This process ensures that the -necessary components are always available for export, optimizing for efficiency + +This command exports a modelkit's components, including models, code, datasets, +and configuration files, to a specified directory on the local filesystem. +By default, it attempts to find the modelkit in local storage; if not found, it +searches the remote registry and retrieves it. This process ensures that the +necessary components are always available for export, optimizing for efficiency by fetching only specified components from the remote registry when necessary` example = `# Export all components of a modelkit to the current directory diff --git a/pkg/cmd/list/cmd.go b/pkg/cmd/list/cmd.go index 3b0ade98..d65bc26f 100644 --- a/pkg/cmd/list/cmd.go +++ b/pkg/cmd/list/cmd.go @@ -18,16 +18,16 @@ const ( shortDesc = `List modelkits in a repository` longDesc = `Displays a list of modelkits available in a repository. -This command provides an overview of modelkits stored either in the local -repository or a specified remote repository. It displays each modelkit along -with its associated tags and the cumulative size of its contents. Modelkits +This command provides an overview of modelkits stored either in the local +repository or a specified remote repository. It displays each modelkit along +with its associated tags and the cumulative size of its contents. Modelkits comprise multiple artifacts, including models, datasets, code, and configuration, designed to enhance reusability and modularity. However, this command focuses on the aggregate rather than listing individual artifacts. Each modelkit entry includes its DIGEST, a unique identifier that ensures -distinct versions of a modelkit are easily recognizable, even if they share the -same name or tags. Modelkits with multiple tags or repository names will appear +distinct versions of a modelkit are easily recognizable, even if they share the +same name or tags. Modelkits with multiple tags or repository names will appear multiple times in the list, distinguished by their DIGEST. The SIZE displayed for each modelkit represents the total storage space occupied diff --git a/pkg/cmd/pull/cmd.go b/pkg/cmd/pull/cmd.go index 8b9bf306..aef11571 100644 --- a/pkg/cmd/pull/cmd.go +++ b/pkg/cmd/pull/cmd.go @@ -15,7 +15,7 @@ import ( const ( shortDesc = `Retrieve modelkits from a remote registry to your local environment.` - longDesc = `Downloads modelkits from a specified registry. The downloaded + longDesc = `Downloads modelkits from a specified registry. The downloaded modelkits are stored in the local registry.` example = `# Pull the latest version of a modelkit from a remote registry kit pull registry.example.com/my-model:latest` diff --git a/pkg/cmd/push/cmd.go b/pkg/cmd/push/cmd.go index 25446cac..a59b27ba 100644 --- a/pkg/cmd/push/cmd.go +++ b/pkg/cmd/push/cmd.go @@ -17,7 +17,7 @@ const ( shortDesc = `Uploads modelkits to a specified registry` longDesc = `This command pushes modelkits to a remote registry. -The modelkits should be tagged with the target registry and repository before +The modelkits should be tagged with the target registry and repository before they can be pushed` example = `# Push the latest modelkits to a remote registry diff --git a/pkg/cmd/tag/cmd.go b/pkg/cmd/tag/cmd.go index f9968250..857722c2 100644 --- a/pkg/cmd/tag/cmd.go +++ b/pkg/cmd/tag/cmd.go @@ -15,37 +15,37 @@ const ( shortDesc = "Create a tag that refers to a modelkit" longDesc = `Create or update a tag that refers to -This command assigns a new tag to an existing modelkit (source-modelkit) or -updates an existing tag, effectively renaming or categorizing modelkits for +This command assigns a new tag to an existing modelkit (source-modelkit) or +updates an existing tag, effectively renaming or categorizing modelkits for better organization and version control. Tags are identifiers linked to specific modelkit versions within a repository. -A full modelkit reference has the following format: +A full modelkit reference has the following format: [HOST[:PORT_NUMBER]/][NAMESPACE/]REPOSITORY[:TAG] * HOST: Optional. The registry hostname where the ModelKit is located. Defaults - to localhost if unspecified. Must follow standard DNS rules + to localhost if unspecified. Must follow standard DNS rules (excluding underscores). - * PORT_NUMBER: Optional. Specifies the registry's port number if a hostname is + * PORT_NUMBER: Optional. Specifies the registry's port number if a hostname is provided. - * NAMESPACE: Represents a user or organization's namespace, consisting of - slash-separated components that may include lowercase letters, digits, and + * NAMESPACE: Represents a user or organization's namespace, consisting of + slash-separated components that may include lowercase letters, digits, and specific separators (periods, underscores, hyphens). - - * REPOSITORY: The name of the repository, typically corresponding to the + + * REPOSITORY: The name of the repository, typically corresponding to the modelkit's name. - * TAG: A human-readable identifier for the modelkit version or variant. Valid + * TAG: A human-readable identifier for the modelkit version or variant. Valid ASCII characters include lowercase and uppercase letters, digits, underscores, - periods, and hyphens. It cannot start with a period or hyphen and is limited + periods, and hyphens. It cannot start with a period or hyphen and is limited to 128 characters. Tagging is a powerful way to manage different versions or configurations of your -modelkits, making it easier to organize, retrieve, and deploy specific -iterations. Ensure tags are meaningful and consistent across your team or +modelkits, making it easier to organize, retrieve, and deploy specific +iterations. Ensure tags are meaningful and consistent across your team or organization to maintain clarity and avoid confusion.` example = `kit tag myregistry.com/myrepo/mykit:latest myregistry.com/myrepo/mykit:v1.0.0` diff --git a/pkg/cmd/version/version.go b/pkg/cmd/version/version.go index 7a29c0a3..614484fc 100644 --- a/pkg/cmd/version/version.go +++ b/pkg/cmd/version/version.go @@ -11,8 +11,8 @@ const ( shortDesc = `Display the version information for the CLI` longDesc = `The version command prints detailed version information. -This information includes the current version of the tool, the Git commit that -the version was built from, the build time, and the version of Go it was +This information includes the current version of the tool, the Git commit that +the version was built from, the build time, and the version of Go it was compiled with.` )