Skip to content

Commit 202a8a1

Browse files
committed
tfsumpy: project reborn as a plan summarizer with plugin support
1 parent 76790dc commit 202a8a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3488
-215
lines changed

.github/FUNDING.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# These are supported funding model platforms
2+
3+
github: rafaelherik
4+
patreon: rafaelherik
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14+
thanks_dev: # Replace with a single thanks.dev username
15+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/ci.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install poetry twine
28+
poetry install --with dev
29+
30+
- name: Run tests
31+
run: poetry run pytest
32+
33+
- name: Build package
34+
run: poetry build
35+
36+

.github/workflows/release.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger on version tags
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write # Needed for creating releases
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.10'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install poetry twine
26+
poetry install --with dev
27+
28+
- name: Run tests
29+
run: poetry run pytest
30+
31+
- name: Build package
32+
run: poetry build
33+
34+
- name: Get version from tag
35+
id: get_version
36+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
37+
38+
- name: Create Release
39+
uses: softprops/action-gh-release@v1
40+
with:
41+
name: Release ${{ steps.get_version.outputs.VERSION }}
42+
draft: false
43+
prerelease: false
44+
files: |
45+
dist/*
46+
body: |
47+
Release of version ${{ steps.get_version.outputs.VERSION }}
48+
49+
Please refer to [CHANGELOG.md](./CHANGELOG.md) for details.
50+
51+
- name: Publish to PyPI
52+
env:
53+
TWINE_USERNAME: __token__
54+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
55+
run: twine upload dist/*
56+
57+
docs:
58+
needs: release
59+
runs-on: ubuntu-latest
60+
if: startsWith(github.ref, 'refs/tags/v')
61+
steps:
62+
- uses: actions/checkout@v4
63+
64+
- name: Set up Python
65+
uses: actions/setup-python@v4
66+
with:
67+
python-version: '3.10'
68+
69+
- name: Install MkDocs and Material theme
70+
run: |
71+
python -m pip install --upgrade pip
72+
pip install mkdocs mkdocs-material
73+
74+
- name: Deploy documentation to GitHub Pages
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
run: mkdocs gh-deploy --force --clean --remote-branch gh-pages

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,6 @@ Pipfile.lock
7878

7979
# poetry
8080
poetry.lock
81+
82+
# cursor rules
83+
.cursorrules

.readthedocs.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version, and other tools you might need
8+
build:
9+
os: ubuntu-24.04
10+
tools:
11+
python: "3.13" # Note: 3.13 is very new, consider using 3.11 for better compatibility
12+
13+
# Build documentation with Mkdocs
14+
mkdocs:
15+
configuration: mkdocs.yml
16+
17+
# Optionally, but recommended,
18+
# declare the Python requirements required to build your documentation
19+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20+
python:
21+
install:
22+
- requirements: docs/requirements.txt
23+

.task/checksum/install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1b7ffb9a935aa0b08ea1c774c0758749

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Changelog
2+
3+
## [0.1.0] - 2024-06-05
4+
5+
### 🎉 Project Reborn: tfsumpy 0.1.0
6+
7+
This release marks a **new beginning** for tfsumpy. The project has been refocused and rebuilt to be a best-in-class Terraform plan summarizer, with a modern, extensible architecture.
8+
9+
### Major Changes
10+
11+
- **Simplified Core:**
12+
- tfsumpy now focuses exclusively on summarizing Terraform plan files. All previous risk assessment and policy compliance features have been removed.
13+
- The CLI and API are streamlined for clarity and ease of use.
14+
15+
- **Extensible by Design:**
16+
- tfsumpy now supports plug-and-play extensions via a simple plugin system. You can add your own analyzers and reporters by dropping Python files in a `plugins/` directory (or specify `--plugin-dir`).
17+
- This makes it easy to add custom compliance checks, cost estimation, notifications, or integrations with other tools—without modifying the core codebase.
18+
19+
### Why This Change?
20+
21+
- **Focus:**
22+
- By concentrating on plan summarization, tfsumpy is easier to use, maintain, and extend.
23+
- **Flexibility:**
24+
- Users and organizations can now build their own extensions for any workflow or integration.
25+
- **Community:**
26+
- We encourage sharing and contributing plugins to grow the ecosystem.
27+
28+
### Migration & Support Notes
29+
30+
- **Older releases are no longer supported.**
31+
- The previous risk and policy features are not maintained and will not receive updates.
32+
- If you need those features, consider implementing them as plugins using the new extension system.
33+
- **This is a fresh start.**
34+
- We recommend all users upgrade to 0.1.0+ and take advantage of the new architecture.
35+
36+
### How to Extend
37+
38+
- See the [Extending tfsumpy](docs/extending.md) documentation for examples and best practices.
39+
- Write your own analyzer or reporter, place it in the `plugins/` directory, and tfsumpy will auto-load it.
40+
41+
---
42+
43+
## [Older releases]
44+
45+
Older versions of tfsumpy are deprecated and will not be supported going forward. Please upgrade to 0.1.0+ for the latest features.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Notry
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)