Skip to content

Commit

Permalink
Merge pull request #239 from DontShaveTheYak/develop
Browse files Browse the repository at this point in the history
Release 0.6.2
  • Loading branch information
shadycuz committed Nov 26, 2023
2 parents 28c3898 + 9bfa939 commit 4e5dd55
Show file tree
Hide file tree
Showing 37 changed files with 18,389 additions and 244 deletions.
11 changes: 6 additions & 5 deletions .devcontainer/Dockerfile
Expand Up @@ -49,11 +49,12 @@ ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH

# Install the required python versions (this takes a bit usually) so we do lots of cacheing
RUN --mount=type=cache,target=/home/vscode/.pyenv/cache,uid=1000 \
pyenv install -s 3.7.13 && \
pyenv install -s 3.8.13 && \
pyenv install -s 3.9.12 && \
pyenv install -s 3.10.4 && \
pyenv global 3.9.12 && \
pyenv install -s 3.8.18 && \
pyenv install -s 3.9.18 && \
pyenv install -s 3.10.13 && \
pyenv install -s 3.11.6 && \
pyenv install -s 3.12.0 && \
pyenv global 3.11.6 && \
pyenv rehash

# Install poetry to manage our python project
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Expand Up @@ -17,14 +17,14 @@ jobs:
steps:

- name: Checkout Code
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0

- name: Setup Python 3.9
uses: actions/setup-python@v4.7.0
- name: Setup Python 3.11
uses: actions/setup-python@v4.7.1
with:
python-version: '3.9'
python-version: '3.11'
architecture: x64

- name: Install dependencies
Expand Down Expand Up @@ -72,12 +72,12 @@ jobs:
needs: tag
steps:
- name: Checkout Code
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.1

- name: Setup Python 3.9
uses: actions/setup-python@v4.7.0
- name: Setup Python 3.11
uses: actions/setup-python@v4.7.1
with:
python-version: '3.9'
python-version: '3.11'
architecture: x64

- name: Setup Poetry
Expand All @@ -104,7 +104,7 @@ jobs:
needs: [tag, publish]
steps:
- name: Create Draft Release
uses: release-drafter/release-drafter@v5.24.0
uses: release-drafter/release-drafter@v5.25.0
if: github.base_ref == 'develop'
with:
tag: ${{needs.tag.outputs.tag}}
Expand All @@ -114,7 +114,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: release-drafter/release-drafter@v5.24.0
uses: release-drafter/release-drafter@v5.25.0
if: github.base_ref == 'master'
with:
tag: ${{needs.tag.outputs.tag}}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Expand Up @@ -12,15 +12,15 @@ on:
jobs:
single:
runs-on: ubuntu-latest
name: Python 3.9
name: Python 3.11
steps:
- name: Checkout Code
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.1

- name: Setup Latest Python
uses: actions/setup-python@v4.7.0
uses: actions/setup-python@v4.7.1
with:
python-version: 3.9
python-version: 3.11
architecture: x64

- name: Setup Poetry
Expand All @@ -32,10 +32,10 @@ jobs:
run: pip install nox nox_poetry coverage[toml]

- name: Run Tests
run: nox -s tests -p 3.9
run: nox -s tests -p 3.11

- name: Combine Coverage reports
run: nox -s coverage -p 3.9
run: nox -s coverage -p 3.11

- name: Convert Coverage
run: coverage xml --fail-under=0
Expand All @@ -52,14 +52,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.10"] # 3.9 is done in the job above
python-version: ["3.8", "3.9", "3.10", "3.12"] # 3.11 is done in the job above
name: Python ${{ matrix.python-version }}
steps:
- name: Checkout Code
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.1

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.0
uses: actions/setup-python@v4.7.1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Expand Up @@ -9,7 +9,7 @@ repos:
language: python
language_version: python3
types: ["python"]
args: ["-rs", "black", "-p", "3.9"]
args: ["-rs", "black", "-p", "3.11"]
require_serial: true
additional_dependencies: []
- id: lint
Expand All @@ -18,7 +18,7 @@ repos:
language: python
language_version: python3
types: ["python"]
args: ["-rs", "lint", "-p", "3.9"]
args: ["-rs", "lint", "-p", "3.11"]
require_serial: true
additional_dependencies: []
- id: mypy
Expand All @@ -27,7 +27,7 @@ repos:
language: python
language_version: python3
types: ["python"]
args: ["-rs", "mypy", "-p", "3.9"]
args: ["-rs", "mypy", "-p", "3.11"]
require_serial: true
additional_dependencies: []
- id: tests
Expand All @@ -36,6 +36,6 @@ repos:
language: python
language_version: python3
types: ["python"]
args: ["-rs", "tests", "-p", "3.9"]
args: ["-rs", "tests", "-p", "3.11"]
require_serial: true
additional_dependencies: []
9 changes: 5 additions & 4 deletions .python-version
@@ -1,4 +1,5 @@
3.9.12
3.7.13
3.8.13
3.10.4
3.11.6
3.12.0
3.10.13
3.9.18
3.8.18
2 changes: 1 addition & 1 deletion .scripts/requirements.txt
@@ -1,2 +1,2 @@
requests==2.31.0
semver==3.0.1
semver==3.0.2
6 changes: 3 additions & 3 deletions .vscode/launch.json
Expand Up @@ -5,17 +5,17 @@
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"name": "cf2tf: Test Template",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/cf2tf/app.py",
"console": "integratedTerminal",
"args": [
"-v",
"debug",
"tests/data/log_bucket.yaml"
"tests/data/templates/log_bucket.yaml"
],
"justMyCode": true
}
]
}
}
14 changes: 10 additions & 4 deletions README.md
Expand Up @@ -76,7 +76,7 @@

### Prerequisites

Cloudformation 2 Terraform requires python >= 3.7
Cloudformation 2 Terraform requires python >= 3.8

### Installation

Expand All @@ -85,6 +85,12 @@ cf2tf is available as an easy to install pip package.
pip install cf2tf
```

If you are a [Homebrew](https://brew.sh/) user, can you install via brew:

```
$ brew install cf2tf
```

## Usage

To convert a template to terraform.
Expand Down Expand Up @@ -119,13 +125,13 @@ Contributions are what make the open-source community such an amazing place to l



This project uses poetry to manage dependencies and pre-commit to run formatting, linting and tests. You will need to have both installed to your system as well as python 3.9.
This project uses poetry to manage dependencies and pre-commit to run formatting, linting and tests. You will need to have both installed to your system as well as python 3.11.

1. Fork the Project
2. Setup the environment.
2. Setup the environment.
This project uses vscode devcontainer to provide a completly configured development environment. If you are using vscode and have the remote container extension installed, you should be asked to use the devcontainer when you open this project inside of vscode.

If you are not using devcontainers then you will need to have python installed. Install the `poetry`, `nox`, `nox_poetry` and `pre-commit` packages. Then run `poetry install` and `pre-commit install` commands.
If you are not using devcontainers then you will need to have python installed. Install the `poetry`, `nox`, `nox_poetry` and `pre-commit` packages. Then run `poetry install` and `pre-commit install` commands.

Most of the steps can be found in the [Dockerfile](.devcontainer/Dockerfile).
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Expand Up @@ -17,7 +17,7 @@
raise SystemExit(dedent(message)) from None


python_versions = ["3.10", "3.9", "3.8", "3.7"]
python_versions = ["3.12", "3.11", "3.10", "3.9", "3.8"]

nox.options.sessions = (
# "pre-commit",
Expand Down

0 comments on commit 4e5dd55

Please sign in to comment.