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

Update supported Python versions #92

Merged
merged 2 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ jobs:
strategy:
matrix:
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
24 changes: 1 addition & 23 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,10 @@

import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

__version__ = "0.0.26"


class PyTest(TestCommand):
user_options = [("pytest-args=", "a", "Arguments to pass to py.test")]

def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ["-x", "tests"]

def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest

errno = pytest.main(self.pytest_args)
sys.exit(errno)


def readme():
with open("README.rst") as f:
return f.read()
Expand All @@ -44,11 +23,11 @@ def readme():
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Developers",
],
keywords="validate CSV vampires",
Expand All @@ -63,7 +42,6 @@ def readme():
install_requires=[],
extras_require={"s3": ["boto"]},
tests_require=["pretend", "pytest", 'black;python_version>="3.6"'],
cmdclass={"test": PyTest},
entry_points={
"console_scripts": [
"vladiate = vladiate.main:main",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_parse_args():
assert options.processes == 1
assert options.show_version is False
assert options.vladfile == "vladfile"
assert options.vlads == ["test"]
assert options.vlads == ["tests"]


@pytest.mark.parametrize(
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ deps =
black

[testenv]
commands = coverage run --append --source=vladiate setup.py test
commands = coverage run --append --source=vladiate -m pytest tests
deps =
pretend
pytest
coverage

Expand Down
4 changes: 2 additions & 2 deletions vladiate/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from importlib.metadata import version
from multiprocessing import Pool, Queue
from vladiate import Vlad
from vladiate import logs
Expand All @@ -7,7 +8,6 @@
import sys
import inspect
from argparse import ArgumentParser
from pkg_resources import get_distribution


def parse_args():
Expand Down Expand Up @@ -187,7 +187,7 @@ def main():
logger = logs.logger

if arguments.show_version:
print("Vladiate %s" % (get_distribution("vladiate").version,))
print("Vladiate %s" % (version("vladiate"),))
return exits.OK

vladfile = find_vladfile(arguments.vladfile)
Expand Down
Loading