Skip to content

Commit

Permalink
Updates before publishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
petergasper committed Sep 6, 2024
1 parent 571da5d commit 129e3f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions DEVELOPMENT
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://www.digitalocean.com/community/tutorials/how-to-publish-python-packages-to-pypi-using-poetry-on-ubuntu-22-04
poetry config pypi-token.pypi <token>
poetry build
poetry publish
9 changes: 5 additions & 4 deletions kubesurveyor/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ def yaml_to_ns(input_file: TextIO) -> None:
ns = yaml.safe_load(input_file)


def main(args: Any) -> None:
def main() -> None:
args = parse_args()
# https://github.com/kubernetes-client/python/issues/1131#issuecomment-749452174
if args.context:
try:
Expand Down Expand Up @@ -428,8 +429,9 @@ def main(args: Any) -> None:
def parse_args() -> Any:
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description="""\
description=f"""\
Kubesurveyor: Good enough Kubernetes namespace visualization tool.
Version: {__version__}
Examples:
# Show '<namespace>' namespace as a 'dot' language graph, using currently active K8S config context
Expand Down Expand Up @@ -507,5 +509,4 @@ def parse_args() -> Any:


if __name__ == "__main__":
args = parse_args()
main(args)
main()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ graphviz = "^0.20.3"
kubernetes = "^30.1.0"

[tool.poetry.scripts]
kubesurveyor = "kubesurveyor.main:parse_args"
kubesurveyor = "kubesurveyor.main:main"

[tool.poetry.dev-dependencies]

Expand Down

0 comments on commit 129e3f5

Please sign in to comment.