We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
This project follows Google's Open Source Community Guidelines and a Code of Conduct.
-
Clone the project
git clone https://github.com/GoogleContainerTools/kpt cd kpt
-
Build
kpt
to$(go env GOPATH)/bin/kpt
make
-
Run test
make all
If you are updating the documentation, please do it in separate PRs from
code changes and the commit message should start with Docs:
.
Make docs changes and test them by using hugo to run the kpt site locally. Hugo continuously builds your website as you make changes.
- install hugo
make servedocs
It's usually a good idea to test locally for the following:
- Broken links
- Rendering static content
- Ordering of new pages using the "weight" key in the header
Docs are under site/ and use the docsy theme for hugo. Learn more about docsy from docsy docs. The site itself are generated from the markdown automatically after commit.
The config functions catalog is auto-generated using this node package. Update the catalog.json file with the appropriate information for your function like its type (source, sink, validator, transformer, or generator). Regenerate the catalog page with:
make gencatalog
- Diagrams are created using Omnigraffle
- Open site/diagrams/diagrams.graffle in omnigraffle
- Change the diagram you want (or add a new canvas)
- Convert text to shapes!!! -> Edit -> Objects -> Convert Text to Shapes
- Export the canvas as an svg to
site/static/images
- Undo convert text to shapes!!! with command-z
- This is important
- Reference the image using the
svg
shortcode
- asciinema casts are under
site/static/casts
- add or modify a
*.sh*
script which will run the commands that will be recorded - run
make-gif.sh
with the script name (without extension) as the argument - add the updated cast to git
- Reference the cast using the
asciinema
shortcode
The kpt website uses markdownlint to lint docs for formatting and style. Use
prettier with the "prettier.proseWrap": "always"
setting to auto-format docs
in VSCode.
This includes:
- Lint docs with markdownlint to standardize them and make them easier to
update.
make lintdocs
- Run the kpt website through the W3 Link Checker in recursive mode and fix warnings and errors.