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 kpops --version command #200

Merged

Conversation

szymonsadowski3
Copy link
Contributor

@szymonsadowski3 szymonsadowski3 commented Apr 26, 2023

Closes #184

The ideas were taken from:

Should be integrated in conjunction with the PR that changes bump action to bump the version in the new _version.py file (will paste it below in a moment)

[edit] the related ci-templates pull request can be found here bakdata/ci-templates#95

@raminqaf
Copy link
Contributor

@szymonsadowski3 Thanks for your contribution! It seems that your formatting is not correct, and it breaks the CI pipeline. Could you please install the pre-commit hook for the formatting?
https://github.com/bakdata/kpops/blob/main/.pre-commit-config.yaml

kpops/cli/main.py Outdated Show resolved Hide resolved
kpops/cli/main.py Outdated Show resolved Hide resolved
kpops/_version.py Outdated Show resolved Hide resolved
@szymonsadowski3
Copy link
Contributor Author

@szymonsadowski3 Thanks for your contribution! It seems that your formatting is not correct, and it breaks the CI pipeline. Could you please install the pre-commit hook for the formatting? https://github.com/bakdata/kpops/blob/main/.pre-commit-config.yaml

I just ran the pre-commit hooks and commited the changes accordingly :)

@raminqaf
Copy link
Contributor

@szymonsadowski3 Thanks for your contribution! It seems that your formatting is not correct, and it breaks the CI pipeline. Could you please install the pre-commit hook for the formatting? https://github.com/bakdata/kpops/blob/main/.pre-commit-config.yaml

I just ran the pre-commit hooks and commited the changes accordingly :)

Thanks! I created an issue for that. We need a guideline on how externals should contribute to KPOps. #201

@disrupted disrupted changed the title Added a command that prints installed KPOps version Add kpops --version command Apr 26, 2023
kpops/cli/main.py Outdated Show resolved Hide resolved
kpops/cli/main.py Outdated Show resolved Hide resolved
kpops/cli/main.py Outdated Show resolved Hide resolved
kpops/cli/main.py Outdated Show resolved Hide resolved
kpops/cli/main.py Outdated Show resolved Hide resolved
@disrupted
Copy link
Member

disrupted commented Apr 27, 2023

during testing I've noticed that in local development environments reading the version dynamically from the package using importlib doesn't work, i.e. when I would run

kpops --version
poetry version patch
kpops --version

it would both times print the same version.

I've switched to the poetry bumpversion plugin and now it works as expected.

@disrupted disrupted changed the base branch from main to feat/cli-version April 27, 2023 11:44
@disrupted disrupted merged commit b400860 into bakdata:feat/cli-version Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Print version of installed KPOps with KPOps --version
4 participants