stacks icon indicating copy to clipboard operation
stacks copied to clipboard

Wrap the project in a Python package with a CLI command

Open weaversam8 opened this issue 5 months ago • 1 comments

This makes Stacks installable with pip! Now you won't have to copy the source files into your Terraform repository, and instead of having to remember the correct number of ../../../ to use, you can just run stacks preinit and stacks postinit.

The preinit.py and postinit.py files still support being run manually, for backwards compatibility. Currently the package isn't listed on PyPi, but that can be added in the future if desired. For now, you can install manually from GitHub, using the instructions in README.md.

NOTE: The diff displayed in the PR makes it look like I deleted/rewrote preinit.py and postinit.py. For a better diff, see the changes between these two commits. I just added a bit of code to enable these files to work both as scripts and as dependencies to cli.py.

Type of Change

  • [ ] Bug Fix
  • [x] New Feature
  • [ ] Breaking Change
  • [x] Refactor
  • [x] Documentation
  • [ ] Other (please describe)

Checklist

  • [x] I have read the contributing guidelines
  • [x] Existing issues have been referenced (where applicable)
  • [x] I have verified this change is not present in other open pull requests
  • [x] Functionality is documented
  • [ ] ~All code style checks pass~
  • [ ] ~New code contribution is covered by automated tests~
  • [ ] ~All new and existing tests pass~

weaversam8 avatar Sep 19 '24 16:09 weaversam8