From 799481bf2bb253ee260e7e8e65b5952d6503625b Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Wed, 1 May 2024 15:19:58 -0500 Subject: [PATCH 1/2] chore: template updates --- .github/workflows/codeql.yml | 2 +- .github/workflows/commitlint.yaml | 4 ++-- .github/workflows/prtitle.yaml | 4 ++-- .github/workflows/publish.yaml | 4 ++-- .github/workflows/test.yaml | 20 +++++++++++--------- .pre-commit-config.yaml | 10 +++++----- setup.py | 6 +++--- 7 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2cdc07b..eb3711c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/commitlint.yaml b/.github/workflows/commitlint.yaml index d63f5a2..f5ce092 100644 --- a/.github/workflows/commitlint.yaml +++ b/.github/workflows/commitlint.yaml @@ -9,12 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/prtitle.yaml b/.github/workflows/prtitle.yaml index a6cd3b0..6e8999f 100644 --- a/.github/workflows/prtitle.yaml +++ b/.github/workflows/prtitle.yaml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2c88013..081d138 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 93e175a..5bcc479 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -42,10 +42,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -62,11 +62,13 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest] # eventually add `windows-latest` + # TODO: Replace with macos-latest when works again. + # https://github.com/actions/setup-python/issues/808 + os: [ubuntu-latest, macos-12] # eventually add `windows-latest` python-version: [3.8, 3.9, "3.10", "3.11"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 @@ -74,7 +76,7 @@ jobs: version: nightly - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -102,10 +104,10 @@ jobs: # fail-fast: true # # steps: -# - uses: actions/checkout@v3 +# - uses: actions/checkout@v4 # # - name: Setup Python -# uses: actions/setup-python@v4 +# uses: actions/setup-python@v5 # with: # python-version: "3.10" # diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fd5e61d..8a17bb2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,16 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-yaml -- repo: https://github.com/pre-commit/mirrors-isort - rev: v5.10.1 +- repo: https://github.com/PyCQA/isort + rev: v5.13.2 hooks: - id: isort - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.4.2 hooks: - id: black name: black @@ -21,7 +21,7 @@ repos: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.10.0 hooks: - id: mypy additional_dependencies: [types-PyYAML, types-requests, types-setuptools, pydantic] diff --git a/setup.py b/setup.py index 65eb22f..7568c81 100644 --- a/setup.py +++ b/setup.py @@ -14,15 +14,15 @@ "ape-polygon", # For running polygon fork tests ], "lint": [ - "black>=23.12.1,<24", # Auto-formatter and linter - "mypy>=1.8.0,<2", # Static type analyzer + "black>=24.4.2,<25", # Auto-formatter and linter + "mypy>=1.10.0,<2", # Static type analyzer "types-setuptools", # Needed for mypy type shed "types-requests", # Needed for mypy type shed "types-PyYAML", # Needed for mypy type shed "flake8>=7.0.0,<8", # Style linter "flake8-breakpoint>=1.1.0,<2", # Detect breakpoints left in code "flake8-print>=5.0.0,<6", # Detect print statements left in code - "isort>=5.10.1,<6", # Import sorting linter + "isort>=5.13.2,<6", # Import sorting linter "mdformat>=0.7.17", # Auto-formatter for markdown "mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown "mdformat-frontmatter>=0.4.1", # Needed for frontmatters-style headers in issue templates From 273480389b5e14e4c1902bb35a0c97fa8cd43815 Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Wed, 1 May 2024 15:20:31 -0500 Subject: [PATCH 2/2] feat: python 312 support --- .github/workflows/test.yaml | 2 +- README.md | 2 +- pyproject.toml | 2 +- setup.py | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5bcc479..c6483ac 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -65,7 +65,7 @@ jobs: # TODO: Replace with macos-latest when works again. # https://github.com/actions/setup-python/issues/808 os: [ubuntu-latest, macos-12] # eventually add `windows-latest` - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index f4f5401..476cd69 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Foundry is a development framework written in Rust for Ethereum that includes a ## Dependencies -- [python3](https://www.python.org/downloads) version 3.8 up to 3.11. +- [python3](https://www.python.org/downloads) version 3.8 up to 3.12. - Foundry. See Foundry's [Installation](https://github.com/foundry-rs/foundry#installation) documentation for steps. ## Installation diff --git a/pyproject.toml b/pyproject.toml index dc6543e..47303cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ write_to = "ape_foundry/version.py" [tool.black] line-length = 100 -target-version = ['py38', 'py39', 'py310', 'py311'] +target-version = ['py38', 'py39', 'py310', 'py311', 'py312'] include = '\.pyi?$' [tool.pytest.ini_options] diff --git a/setup.py b/setup.py index 7568c81..a53f51e 100644 --- a/setup.py +++ b/setup.py @@ -101,5 +101,6 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], )