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

chore: upgrade dependencies #22

Merged
merged 16 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
94 changes: 17 additions & 77 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,98 +28,38 @@ jobs:
- name: Run Tox
run: tox -e lint

py36:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6

- name: Install Tox
run: pip install tox wheel

- name: Run Tox
run: tox -e py36

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true

py37:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install Tox
run: pip install tox wheel

- name: Run Tox
run: tox -e py37

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true

py38:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install Tox
run: pip install tox wheel

- name: Run Tox
run: tox -e py38

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true

py39:
runs-on: ${{ matrix.os }}
test:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [ubuntu-latest]
python-version: [["3.8", "38"], ["3.9", "39"], ["3.10", "310"], ["3.11", "311"], ["3.12", "312"]]
include:
- os: macos-latest
python-version: ["3.11", "311"]
- os: windows-latest
python-version: ["3.11", "311"]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Python 3.9
- name: Setup Python ${{ matrix.python-version[0] }}
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: ${{ matrix.python-version[0] }}

- name: Install Tox
run: pip install tox wheel

- name: Run Tox
run: tox -e py39
run: tox -e py${{ matrix.python-version[1] }}
env:
VVM_BINARY_PATH: ${{ matrix.os == 'windows-latest' && 'C:\Users\RUNNER~1\AppData\Local\Temp' || '' }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true
fail_ci_if_error: false
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

# PyCharm
.idea/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vvm

[![Pypi Status](https://img.shields.io/pypi/v/vvm.svg)](https://pypi.org/project/vvm/) [![Build Status](https://img.shields.io/github/workflow/status/vyperlang/vvm/vvm%20workflow)](https://github.com/vyperlang/vvm/actions) [![Coverage Status](https://img.shields.io/codecov/c/github/vyperlang/vvm)](https://codecov.io/gh/vyperlang/vvm)
[![Pypi Status](https://img.shields.io/pypi/v/vvm.svg)](https://pypi.org/project/vvm/) [![Build Status](https://img.shields.io/github/actions/workflow/status/vyperlang/vvm/main.yaml?branch=master)](https://github.com/vyperlang/vvm/actions) [![Coverage Status](https://img.shields.io/codecov/c/github/vyperlang/vvm)](https://codecov.io/gh/vyperlang/vvm)

Vyper version management tool.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 100
target-version = ['py36', 'py37', 'py38']
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
include = '\.pyi?$'
exclude = '''
/(
Expand Down
23 changes: 12 additions & 11 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
black==24.4.2
bumpversion==0.5.3
flake8==3.8.3
isort==4.3.21
mypy==0.982
pytest>6.0.0,<7.0.0
pytest-cov==2.10.1
tox==3.18.0
tqdm>=4.41.0,<5.0.0
twine>=4.0.2,<5.0.0
wheel>=0.35.1
black==24.8.0
bumpversion>=0.6.0,<1.0.0
flake8>=7.1.1,<8.0.0
isort>=5.13.2,<6.0.0
mypy>=1.11.2,<2.0.0
pytest>=8.3.2,<9.0.0
pytest-cov>=5.0.0,<6.0.0
tox>=4.18.0,<5.0.0
tqdm>=4.66.5,<5.0.0
twine>=5.1.1,<6.0.0
wheel>=0.44.0,<1.0.0
types-requests>2.32.0,<3.0.0
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
url="https://github.com/vyperlang/vvm",
include_package_data=True,
py_modules=["vvm"],
python_requires=">=3.6, <4",
install_requires=["requests>=2.19.0,<3", "packaging>=23.1,<24"],
python_requires=">=3.8, <4",
install_requires=["requests>=2.32.3,<3", "packaging>=24.1,<25"],
license="MIT",
zip_safe=False,
keywords="ethereum vyper",
Expand Down
6 changes: 4 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/python3

import pytest
from requests import ConnectionError
from packaging.version import Version
from requests import ConnectionError

import vvm

Expand Down Expand Up @@ -67,8 +67,10 @@ def all_versions(request):
@pytest.fixture
def foo_source(all_versions):
visibility = "external" if all_versions >= Version("0.2.0") else "public"
interface = "IERC20" if all_versions >= Version("0.4.0a") else "ERC20"
import_path = "ethereum.ercs" if all_versions >= Version("0.4.0a") else "vyper.interfaces"
yield f"""
from vyper.interfaces import ERC20
from {import_path} import {interface}

@{visibility}
def foo() -> int128:
Expand Down
9 changes: 7 additions & 2 deletions tests/test_compile_source.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import pytest
from packaging.version import Version

import vvm


def test_compile_source(foo_source):
def test_compile_source(foo_source, all_versions):
if Version("0.4.0b1") <= all_versions <= Version("0.4.0b5"):
raise pytest.skip("vyper 0.4.0b1 to 0.4.0b5 have a bug with combined_json")
DanielSchiavini marked this conversation as resolved.
Show resolved Hide resolved
output = vvm.compile_source(foo_source)
assert "<stdin>" in output


def test_compile_files(foo_path):
def test_compile_files(foo_path, all_versions):
if Version("0.4.0b1") <= all_versions <= Version("0.4.0b5"):
raise pytest.skip("vyper 0.4.0b1 to 0.4.0b5 have a bug with combined_json")
output = vvm.compile_files([foo_path])
assert foo_path.as_posix() in output

Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[tox]
envlist =
lint
py{36,37,38,39}
py{38,39,310,311,312}

[testenv]
passenv =
GITHUB_TOKEN
deps = -r{toxinidir}/requirements-dev.txt
commands =
py{36,37,38,39}: python -m pytest tests/
py{38,39,310,311,312}: python -m pytest tests/

[testenv:lint]
extras=linter
commands =
black --check {toxinidir}/vvm {toxinidir}/tests
flake8 {toxinidir}/vvm {toxinidir}/tests
isort --check-only --diff --recursive {toxinidir}/vvm {toxinidir}/tests
mypy --disallow-untyped-defs {toxinidir}/vvm
isort --check-only --diff {toxinidir}/vvm {toxinidir}/tests
mypy --disallow-untyped-defs {toxinidir}/vvm --implicit-optional
2 changes: 1 addition & 1 deletion vvm/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
import tempfile
from pathlib import Path
from pathlib import Path, WindowsPath
DanielSchiavini marked this conversation as resolved.
Show resolved Hide resolved
from typing import Any, Dict, List, Optional, Union

from packaging.version import Version
Expand Down