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

Upgrading to python 3.12 after dependency cleanup #162

Merged
merged 8 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/actions/setup_environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ runs:
if: ${{ inputs.os == 'windows-latest' }}
run: rm.exe "C:/WINDOWS/system32/bash.EXE"


- name: Install MLStacks
shell: bash
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false
uses: ./.github/workflows/setup-python-environment.yml
with:
Expand All @@ -38,7 +38,7 @@ jobs:
strategy:
matrix:
os: [windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false
uses: ./.github/workflows/setup-python-environment.yml
with:
Expand All @@ -51,7 +51,7 @@ jobs:
strategy:
matrix:
os: [macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false
uses: ./.github/workflows/setup-python-environment.yml
with:
Expand All @@ -64,7 +64,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false
uses: ./.github/workflows/lint-unit-test.yml
with:
Expand All @@ -77,7 +77,7 @@ jobs:
strategy:
matrix:
os: [windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false
uses: ./.github/workflows/lint-unit-test.yml
with:
Expand All @@ -90,7 +90,7 @@ jobs:
strategy:
matrix:
os: [macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false
uses: ./.github/workflows/lint-unit-test.yml
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ on:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
required: false
default: '3.8'
enable_tmate:
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,14 @@ exclude = [
]

[tool.poetry.dependencies]
# pydantic = {version = "2.0.2"}
# compatible with Core ZenML
python = ">=3.8,<3.12"
python = ">=3.8,<3.13"
pydantic = { version = "~2.7" }
pyyaml = { version = ">=6.0.1" }
click = { version = "^8.0.1,<8.1.4" }
python-terraform = { version = "^0.10.1" }
rich = { version = "^12.0.0" }
analytics-python = { version = "^1.4.0" }
setuptools = "*"

# dev dependencies
ruff = { version = ">=0.1.7", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions scripts/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -x
SRC=${1:-"src/mlstacks tests scripts"}

# autoflake replacement: removes unused imports and variables
ruff $SRC --select F401,F841 --fix --exclude "__init__.py" --isolated
ruff check $SRC --select F401,F841 --fix --exclude "__init__.py" --isolated

# sorts imports
ruff $SRC --select I --fix --ignore D
ruff check $SRC --select I --fix --ignore D
ruff format $SRC
4 changes: 2 additions & 2 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ SRC=${1:-"src/mlstacks tests"}
SRC_NO_TESTS=${1:-"src/mlstacks"}
TESTS=${1:-"tests"}

ruff $SRC_NO_TESTS
ruff check $SRC_NO_TESTS

# autoflake replacement: checks for unused imports and variables
ruff $SRC --select F401,F841 --exclude "__init__.py" --isolated
ruff check $SRC --select F401,F841 --exclude "__init__.py" --isolated

ruff format $SRC --check

Expand Down
12 changes: 6 additions & 6 deletions src/mlstacks/utils/terraform_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ def include_files(
or filename.endswith(".md")
or filename.endswith(".yaml")
or filename.endswith(".sh")
or filename == ".terraformignore"
or filename == MLSTACKS_INITIALIZATION_FILE_FLAG
or filename
in {".terraformignore", MLSTACKS_INITIALIZATION_FILE_FLAG}
)
]

Expand Down Expand Up @@ -1007,8 +1007,8 @@ def verify_infracost_installed() -> bool:
bool: True if Infracost is installed, otherwise False.
"""
try:
subprocess.run(
["infracost", "configure", "get", "api_key"], # noqa: S607,S603
subprocess.run( # noqa: S603
["infracost", "configure", "get", "api_key"], # noqa: S607
check=True,
capture_output=True,
text=True,
Expand Down Expand Up @@ -1079,9 +1079,9 @@ def infracost_breakdown_stack(
infracost_cmd += f" --terraform-var {k}={v}"

# Execute the command
process = subprocess.run(
process = subprocess.run( # noqa: S602
infracost_cmd,
shell=True, # noqa: S602
shell=True,
check=True,
capture_output=True,
text=True,
Expand Down
Loading