Skip to content

Commit

Permalink
Use tox for testing py versions (#16)
Browse files Browse the repository at this point in the history
* Use tox for testing py versions

* Update circleci config

* Use tox image for circleci

* Use separate images for py versions

* Add MANIFEST

* Remove circleci virtualenv

* Revert changes

* Skip py2 venv if using cache

* Remove cache

* Add update to CHANGES
  • Loading branch information
alecraso committed Sep 19, 2018
1 parent 8e43b37 commit a6a483c
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 27 deletions.
41 changes: 21 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
version: 2
jobs:
build:
test-27: &test-template
docker:
- image: circleci/python:3.6.4

working_directory: ~/repo

- image: circleci/python:2.7
working_directory: ~/comparator
steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "setup.py" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
name: install dependencies
command: |
make venv
. venv/bin/activate
make install
pip3 install coveralls
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "setup.py" }}

pip install coveralls
- run:
name: run tests
command: |
. venv/bin/activate
make test
coveralls
test-36:
<<: *test-template
docker:
- image: circleci/python:3.6
test-37:
<<: *test-template
docker:
- image: circleci/python:3.7

workflows:
version: 2
comparator:
jobs:
- test-27
- test-36
- test-37
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.2.1 (2018-09-19)
- officially support Python 2.7, 3.6, and 3.7

## 0.2.0 (2018-09-18)
- add `query_df` methods for returning pandas DataFrames
- add `output` kwarg to Comparator to allow calling the `query_df` method
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

.PHONY: venv
venv:
python3 -m venv ./venv
python -m venv ./venv || virtualenv venv

hooks:
bash bin/setup_hooks.sh

.PHONY: build
build:
python3 setup.py sdist
python setup.py sdist

.PHONY: install
install:
python3 setup.py install
python setup.py install

.PHONY: test
test:
python3 setup.py test
python setup.py test

.PHONY: clean
clean:
Expand Down
2 changes: 1 addition & 1 deletion comparator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from comparator.models import Comparator # noqa

__all__ = []
__version__ = '0.2.0'
__version__ = '0.2.1'
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
from io import open
from setuptools import setup, find_packages

with open('README.md', encoding='utf-8') as f:
Expand All @@ -10,7 +10,7 @@

setup(
name='comparator',
version='0.2.0',
version='0.2.1',
author='Aaron Biller',
author_email='aaronbiller@gmail.com',
description='Utility for comparing results between data sources',
Expand Down Expand Up @@ -45,8 +45,11 @@
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Database',
'Topic :: Utilities',
],
Expand Down
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[tox]
envlist = py{27,36,37}

[testenv]
whitelist_externals = make
commands = make test

0 comments on commit a6a483c

Please sign in to comment.