Skip to content

Commit

Permalink
chore: upgrade dependencies (#22)
Browse files Browse the repository at this point in the history
update dependencies and python versions for tests
  • Loading branch information
DanielSchiavini authored Sep 10, 2024
1 parent 19acbc1 commit c6e273b
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 100 deletions.
93 changes: 16 additions & 77 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,98 +28,37 @@ 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] }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true
# for now not failing, this may be reverted once we set it up properly
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/
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased](https://github.com/vyperlang/vvm/)
### Changed
- Update contact information in `CONTRIBUTING.md`
- Update dependencies. Minimum python version is now 3.8 ([#22](https://github.com/vyperlang/vvm/pull/22))

## [0.1.0](https://github.com/vyperlang/vvm/tree/v0.1.0) - 2020-10-07
### Added
Expand Down
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"):
pytest.skip("vyper 0.4.0b1 to 0.4.0b5 have a bug with combined_json")
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"):
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

0 comments on commit c6e273b

Please sign in to comment.