Skip to content

Commit

Permalink
Merge pull request #350 from DontShaveTheYak/develop
Browse files Browse the repository at this point in the history
Release v0.9.0
  • Loading branch information
shadycuz authored Nov 18, 2024
2 parents 1db4bcd + 4c60fbf commit 3dd7add
Show file tree
Hide file tree
Showing 12 changed files with 253 additions and 238 deletions.
25 changes: 9 additions & 16 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
FROM ubuntu:24.04

ARG USERNAME=ubuntu
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Ensure apt is in non-interactive to avoid prompts
ENV DEBIAN_FRONTEND=noninteractive

# Create the user
RUN apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache

# Install dependencies.
Expand All @@ -39,22 +31,23 @@ SHELL ["/bin/bash","--login", "-c"]

# Stuff needed to make pyenv work correctly since the login shell
# above doesnt seem to run bachrc
ENV PYENV_ROOT="/home/ubuntu/.pyenv"
ENV PYENV_ROOT="/home/${USERNAME}/.pyenv"
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/ubuntu/.pyenv/cache,uid=1000 \
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 && \
RUN --mount=type=cache,target=/home/${USERNAME}/.pyenv/cache,uid=1000 \
pyenv install -s 3.9.20 && \
pyenv install -s 3.10.15 && \
pyenv install -s 3.11.10 && \
pyenv install -s 3.12.7 && \
pyenv install -s 3.13.0 && \
pyenv global 3.12.7 3.13.0 3.11.10 3.10.15 3.9.20 && \
pyenv rehash

# Install poetry to manage our python project
RUN curl -sSL https://install.python-poetry.org | python3 -

# Install nox and pre-commit to automate CI stuff
RUN pip install --user --upgrade nox nox_poetry pre-commit
RUN git config --global --add safe.directory /workspaces/cf2tf
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
steps:

- name: Checkout Code
uses: actions/checkout@v4.1.4
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0

- name: Setup Python 3.11
uses: actions/setup-python@v5.1.0
- name: Setup Python 3.12
uses: actions/setup-python@v5.3.0
with:
python-version: '3.11'
python-version: '3.12'
architecture: x64

- name: Install dependencies
Expand Down Expand Up @@ -75,12 +75,12 @@ jobs:
needs: tag
steps:
- name: Checkout Code
uses: actions/checkout@v4.1.4
uses: actions/checkout@v4.2.2

- name: Setup Python 3.11
uses: actions/setup-python@v5.1.0
- name: Setup Python 3.12
uses: actions/setup-python@v5.3.0
with:
python-version: '3.11'
python-version: '3.12'
architecture: x64

- name: Setup Poetry
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ on:
jobs:
single:
runs-on: ubuntu-latest
name: Python 3.11
name: Python 3.12
steps:
- name: Checkout Code
uses: actions/checkout@v4.1.4
uses: actions/checkout@v4.2.2

- name: Setup Latest Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.3.0
with:
python-version: 3.11
python-version: 3.12
architecture: x64

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

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

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

- name: Convert Coverage
run: coverage xml --fail-under=0

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.3.1
uses: codecov/codecov-action@v5.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
fail_ci_if_error: false

multi:
needs: single
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.12"] # 3.11 is done in the job above
python-version: ["3.9", "3.10", "3.11","3.13"] # 3.12 is done in the job above
name: Python ${{ matrix.python-version }}
steps:
- name: Checkout Code
uses: actions/checkout@v4.1.4
uses: actions/checkout@v4.2.2

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
language: python
language_version: python3
types: ["python"]
args: ["-rs", "black", "-p", "3.11"]
args: ["-rs", "black", "-p", "3.12"]
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.11"]
args: ["-rs", "lint", "-p", "3.12"]
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.11"]
args: ["-rs", "mypy", "-p", "3.12"]
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.11"]
args: ["-rs", "tests", "-p", "3.12"]
require_serial: true
additional_dependencies: []
5 changes: 0 additions & 5 deletions .python-version

This file was deleted.

2 changes: 1 addition & 1 deletion .scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
requests==2.31.0
requests==2.32.3
semver==3.0.2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ 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.11.
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.12.

1. Fork the Project
2. Setup the environment.
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
raise SystemExit(dedent(message)) from None


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

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

0 comments on commit 3dd7add

Please sign in to comment.