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

Add Contributing.md and update gen-docs task #90

Merged
merged 2 commits into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
109 changes: 109 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Contributing to the Meroxa CLI

Thank you so much for contributing to our CLI. We appreciate your time and help.
Here are some guidelines to help you get started.

## Filing a bug or feature

1. Before filing an issue, please check the existing issues to see if a
similar one was already opened. If there is one already opened, feel free
to comment on it.
1. If you believe you've found a bug, please provide detailed steps of
reproduction, the version of Meroxa and anything else you believe will be
useful to help troubleshoot it (e.g. OS environment, environment variables,
etc...). Also state the current behavior vs. the expected behavior. Open an issue directly using [our template to file a bug](https://github.com/meroxa/cli/issues/new?assignees=&labels=&template=bug_report.md&title=).
1. If you'd like to see a feature or an enhancement please open an issue using [our template to file a feature request](https://github.com/meroxa/cli/issues/new?assignees=&labels=&template=feature_request.md&title=).

## Submitting changes

1. Tests: If you are submitting code, please ensure you have adequate tests
for the feature. Tests can be run via `go test ./...` or `make test`.
1. Since this is golang project, ensure the new code is properly formatted to
ensure code consistency. Run `go fmt`.

### Quick steps to contribute

1. Fork the project.
1. Download your fork to your machine (`git clone https://github.com/your_username/cli && cd cli`)
1. Create your feature branch (`git checkout -b my-new-feature`)
1. Make changes and run tests (`make test`)
1. Add them to staging (`git add .`)
1. Commit your changes (`git commit -m 'Add some feature'`)
1. Push to the branch (`git push origin my-new-feature`)
1. Create new pull request

## License

Apache 2.0, see [LICENSE](LICENSE).

## Code of Conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

### Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting our team at [[email protected]](mailto:[email protected]). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. Meroxa Inc is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

### Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ test:

.PHONY: docs
docs:
go run tools/make-docs/main.go
go run gen-docs/main.go
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
## Meroxa CLI
# Meroxa CLI


## Documentation

Our Meroxa CLI is documented publicly in https://docs.meroxa.com/docs, but on each build we also generate Markdown files for each command, exposing the available commands and help for each one. Check them out at [docs/commands/meroxa](docs/commands/meroxa.md).

## Our commands

All commands start with `meroxa` (the name of the binary).
All commands start with `meroxa` which is the name of the binary.

### Build

Expand All @@ -12,7 +17,7 @@ Build CLI as `meroxa` binary:
make build
```

### Linting
## Linting

If you want to make sure everything's correct before pushing to GitHub, you'll need to install [`golangci-lint`](https://golangci-lint.run/) and run:

Expand All @@ -29,7 +34,7 @@ func appendCell(cells []*simpletable.Cell, text string) []*simpletable.Cell {
^
```

### Vendor
## Vendor

The CLI depends on [meroxa-go](github.com/meroxa/meroxa-go) which is currently
a private repo. To update vendoring the dependency, you'll need to run the following:
Expand All @@ -38,7 +43,7 @@ a private repo. To update vendoring the dependency, you'll need to run the follo
make gomod
```

### Release
## Release

A [goreleaser](https://github.com/goreleaser/goreleaser) GitHub Action is
configured to automatically build the CLI and cut a new release whenever a new
Expand All @@ -47,6 +52,6 @@ git tag is pushed to the repo.
* Tag - `git tag -a vX.X.X -m "<message goes here>"`
* Push - `git push origin vX.X.X`

### Documentation
## Contributing

Our Meroxa CLI is documented publicly in https://docs.meroxa.com/docs, but on each build we also generate Markdown files for each command, exposing the available commands and help for each one. Check it out at [docs/commands/meroxa](docs/commands/meroxa.md).
See [CONTRIBUTING.md](/CONTRIBUTING.md).
2 changes: 1 addition & 1 deletion docs/commands/meroxa.md → docs/cmd/meroxa.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ meroxa list resource-types
* [meroxa update](meroxa_update.md) - Update a component
* [meroxa version](meroxa_version.md) - Display the Meroxa CLI version

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
2 changes: 1 addition & 1 deletion docs/commands/meroxa_add.md → docs/cmd/meroxa_add.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Add a resource to your Meroxa resource catalog
* [meroxa](meroxa.md) - The Meroxa CLI
* [meroxa add resource](meroxa_add_resource.md) - Add a resource to your Meroxa resource catalog

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ meroxa add resource slack --type url -u $WEBHOOK_URL

* [meroxa add](meroxa_add.md) - Add a resource to your Meroxa resource catalog

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
2 changes: 1 addition & 1 deletion docs/commands/meroxa_api.md → docs/cmd/meroxa_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ meroxa api POST /v1/endpoints '{"protocol": "HTTP", "stream": "resource-2-499379

* [meroxa](meroxa.md) - The Meroxa CLI

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa billing [flags]

* [meroxa](meroxa.md) - The Meroxa CLI

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ meroxa completion [bash|zsh|fish|powershell]

* [meroxa](meroxa.md) - The Meroxa CLI

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ meroxa connect --from <resource-name> --to <resource-name> [flags]

* [meroxa](meroxa.md) - The Meroxa CLI

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ including connectors.
* [meroxa create endpoint](meroxa_create_endpoint.md) - Create an endpoint
* [meroxa create pipeline](meroxa_create_pipeline.md) - Create a pipeline

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ meroxa create connector [<custom-connector-name>] --to pg2redshift --input order

* [meroxa create](meroxa_create.md) - Create Meroxa pipeline components

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ meroxa create endpoint my-endpoint --protocol http --stream my-stream

* [meroxa create](meroxa_create.md) - Create Meroxa pipeline components

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ meroxa create pipeline <name> [flags]

* [meroxa create](meroxa_create.md) - Create Meroxa pipeline components

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Describe a component of the Meroxa data platform, including resources and connec
* [meroxa describe endpoint](meroxa_describe_endpoint.md) - Describe Endpoint
* [meroxa describe resource](meroxa_describe_resource.md) - Describe resource

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa describe connector [name] [flags]

* [meroxa describe](meroxa_describe.md) - Describe a component

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa describe endpoint <name> [flags]

* [meroxa describe](meroxa_describe.md) - Describe a component

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa describe resource <name> [flags]

* [meroxa describe](meroxa_describe.md) - Describe a component

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
2 changes: 1 addition & 1 deletion docs/commands/meroxa_list.md → docs/cmd/meroxa_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ List the components of the Meroxa platform, including pipelines,
* [meroxa list resources](meroxa_list_resources.md) - List resources
* [meroxa list transforms](meroxa_list_transforms.md) - List transforms

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa list connectors [flags]

* [meroxa list](meroxa_list.md) - List components

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa list endpoint [flags]

* [meroxa list](meroxa_list.md) - List components

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa list pipelines [flags]

* [meroxa list](meroxa_list.md) - List components

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa list resource-types [flags]

* [meroxa list](meroxa_list.md) - List components

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa list resources [flags]

* [meroxa list](meroxa_list.md) - List components

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa list transforms [flags]

* [meroxa list](meroxa_list.md) - List components

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
2 changes: 1 addition & 1 deletion docs/commands/meroxa_login.md → docs/cmd/meroxa_login.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa login [flags]

* [meroxa](meroxa.md) - The Meroxa CLI

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa logout [flags]

* [meroxa](meroxa.md) - The Meroxa CLI

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
2 changes: 1 addition & 1 deletion docs/commands/meroxa_logs.md → docs/cmd/meroxa_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Print logs for a component
* [meroxa](meroxa.md) - The Meroxa CLI
* [meroxa logs connector](meroxa_logs_connector.md) - Print logs for a connector

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa logs connector <name> [flags]

* [meroxa logs](meroxa_logs.md) - Print logs for a component

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
2 changes: 1 addition & 1 deletion docs/commands/meroxa_open.md → docs/cmd/meroxa_open.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Open in a web browser
* [meroxa](meroxa.md) - The Meroxa CLI
* [meroxa open billing](meroxa_open_billing.md) - Open your billing page in a web browser

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa open billing [flags]

* [meroxa open](meroxa_open.md) - Open in a web browser

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Deprovision a component of the Meroxa platform, including pipelines,
* [meroxa remove pipeline](meroxa_remove_pipeline.md) - Remove pipeline
* [meroxa remove resource](meroxa_remove_resource.md) - Remove resource

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa remove connector <name> [flags]

* [meroxa remove](meroxa_remove.md) - Remove a component

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa remove endpoint <name> [flags]

* [meroxa remove](meroxa_remove.md) - Remove a component

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa remove pipeline <name> [flags]

* [meroxa remove](meroxa_remove.md) - Remove a component

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa remove resource <name> [flags]

* [meroxa remove](meroxa_remove.md) - Remove a component

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Update a component of the Meroxa platform, including connectors
* [meroxa update pipeline](meroxa_update_pipeline.md) - Update pipeline state
* [meroxa update resource](meroxa_update_resource.md) - Update a resource

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ meroxa update connector <name> --state <pause|resume|restart> [flags]

* [meroxa update](meroxa_update.md) - Update a component

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ meroxa update pipeline <name> --state <pause|resume|restart> [flags]

* [meroxa update](meroxa_update.md) - Update a component

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ meroxa update resource <resource-name> [flags]

* [meroxa update](meroxa_update.md) - Update a component

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meroxa version [flags]

* [meroxa](meroxa.md) - The Meroxa CLI

###### Auto generated by spf13/cobra on 15-Mar-2021
###### Auto generated by spf13/cobra on 16-Mar-2021
Loading