Skip to content

Commit

Permalink
feat: updates python and dependency versions (#1826)
Browse files Browse the repository at this point in the history
Updates the Python versions and versions of several of the primary tools listed in the install commands.
  • Loading branch information
chalmerlowe authored Jul 28, 2023
1 parent eba60f2 commit c08afee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,34 @@

import nox

@nox.session(python=['3.6', '3.10'])
PYTHON_VERSIONS = ['3.8', '3.10']

# Error if a python version is missing
nox.options.error_on_missing_interpreters = True

@nox.session(python=PYTHON_VERSIONS)
def generate_protos(session):
session.install("grpcio-tools")
session.run(
"python", "-m", "grpc_tools.protoc", "-Isynthtool/protos", "--python_out=synthtool/protos", "synthtool/protos/metadata.proto", "synthtool/protos/preconfig.proto")

@nox.session(python=['3.6', '3.10'])
@nox.session(python=PYTHON_VERSIONS)
def blacken(session):
session.install('black==22.3.0', 'click>8.0')
session.install('black==23.3.0', 'click>8.0')
session.run('black', 'synthtool', 'tests')


@nox.session(python=['3.6', '3.10'])
@nox.session(python=PYTHON_VERSIONS)
def lint(session):
session.install('mypy==0.790', 'flake8', 'black==22.3.0')
session.install('mypy==0.790', 'flake8', 'black==23.3.0')
session.run('pip', 'install', '-e', '.')
session.run('pip', 'install', 'click>8.0')
session.run('black', '--check', 'synthtool', 'tests')
session.run('flake8', 'synthtool', 'tests')
session.run('mypy', 'synthtool')


@nox.session(python=['3.6', '3.10'])
@nox.session(python=PYTHON_VERSIONS)
def test(session):
session.install('pytest', 'pytest-cov', 'requests_mock', 'watchdog', 'flake8')
session.run('pip', 'install', '-e', '.')
Expand Down
2 changes: 1 addition & 1 deletion tests/test_language_java.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def assert_valid_yaml(file):

# lint xml, yaml files
# use os.walk because glob ignores hidden directories
for (dirpath, _, filenames) in os.walk(workdir):
for dirpath, _, filenames in os.walk(workdir):
for file in filenames:
(_, ext) = os.path.splitext(file)
if ext == ".xml":
Expand Down

0 comments on commit c08afee

Please sign in to comment.