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

Make this module a publishable, installable module and CLI #9

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

mbeacom
Copy link
Contributor

@mbeacom mbeacom commented Feb 23, 2023

Issue #, if available: #4

Description of changes: The purpose of this PR is to make the project a full fledged python module that can now be installed via pip or other python virtual environment/dependency management tools (not just pipenv). This means the project can now be published on pypi for broader distribution. This also adds an entrypoint to allow accessing the CLI via:

tf-iam-validator e.g.:

pip install .
tf-iam-validator -h

I intentionally haven't modified the pep-8 noncompliant python styling and merely made the changes needed to run the CLI. This may require changes to the open() calls against the config file since it's bundled into this repo.

Recommended next steps:

  • Button up implementation
  • Format whole repo with black and isort
  • Establish a baseline for linting using ruff or pylint
  • Add GitHub actions and .pre-commit hooks to enforce the standards

Happy to provide the canned routines to auto-publish and validate (from other projects I've added them to, like aws-samples/eks-cluster-upgrade

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -1,11 +1,8 @@
import glob
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all unused imports.

import argparse
import itertools
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all unused imports.

@hanboooli hanboooli self-requested a review March 27, 2023 21:57
@hanboooli hanboooli self-assigned this Mar 27, 2023
@hanboooli hanboooli merged commit 69c5f4c into awslabs:main Mar 27, 2023
@hanboooli
Copy link
Contributor

Thank you @mbeacom! This project has been published to PyPI https://pypi.org/project/tf-policy-validator/

I have created issues for your recommended next steps.

@mbeacom mbeacom deleted the make-python-module branch March 28, 2023 12:39
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.

None yet

2 participants