Skip to content

Commit

Permalink
Merge pull request #33 from pawelzny/untangle_devdeps
Browse files Browse the repository at this point in the history
Remove pipenv from requirements in production
  • Loading branch information
pawelzny authored Nov 18, 2018
2 parents 2408496 + d06a677 commit c040a96
Show file tree
Hide file tree
Showing 10 changed files with 363 additions and 294 deletions.
185 changes: 88 additions & 97 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,127 +1,118 @@
# Python CircleCI 2.0 configuration file
# Check https://circleci.com/docs/2.0/language-python/ for more details
version: 2

defaults: &defaults
working_directory: ~/repo

read_cache: &read_cache
keys:
- v1-dependencies-{{ checksum "Pipfile.lock" }}
- v1-dependencies-

install_devdeps: &install_devdeps
name: install dependencies
command: |
pip install pipenv
pipenv install --three --ignore-pipfile
pipenv install --three --dev --ignore-pipfile
store_cache: &store_cache
paths:
- ./repo
key: v1-dependencies-{{ checksum "Pipfile.lock" }}

run_tests: &run_tests
name: run tests
command: pipenv run pytest

jobs:
py35:
<<: *defaults
docker:
- image: circleci/python:3.5.5
working_directory: ~/repo
- image: circleci/python:3.5.6
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Pipfile.lock" }}
- v1-dependencies-
- run:
name: install dependencies
command: |
pip install pipenv
pipenv install --three --ignore-pipfile
pipenv install --three --dev --ignore-pipfile
- save_cache:
paths:
- ./repo
key: v1-dependencies-{{ checksum "Pipfile.lock" }}
- run:
name: run tests
command: pipenv run pytest
- checkout
- restore_cache: *read_cache
- run: *install_devdeps
- save_cache: *store_cache
- run: *run_tests
py36:
<<: *defaults
docker:
- image: circleci/python:3.6.4
working_directory: ~/repo
- image: circleci/python:3.6.7
steps:
- checkout
- restore_cache: *read_cache
- run: *install_devdeps
- save_cache: *store_cache
- run: *run_tests
py37:
<<: *defaults
docker:
- image: circleci/python:3.7.1
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Pipfile.lock" }}
- v1-dependencies-
- run:
name: install dependencies
command: |
pip install pipenv
pipenv install --three --ignore-pipfile
pipenv install --three --dev --ignore-pipfile
- save_cache:
paths:
- ./repo
key: v1-dependencies-{{ checksum "Pipfile.lock" }}
- run:
name: run tests
command: pipenv run pytest
- checkout
- restore_cache: *read_cache
- run: *install_devdeps
- save_cache: *store_cache
- run: *run_tests

pypy35:
docker:
- image: pypy:3-5.10
working_directory: ~/repo
- image: pypy:3-5.10
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Pipfile.lock" }}
- v1-dependencies-
- run:
name: install dependencies
command: |
pip install pipenv==11.7.4
pipenv install --python `which pypy3` --ignore-pipfile
pipenv install --python `which pypy3` --dev --ignore-pipfile
- save_cache:
paths:
- ./repo
key: v1-dependencies-{{ checksum "Pipfile.lock" }}
- run:
name: run tests
command: pipenv run pytest
- checkout
- restore_cache: *read_cache
- run:
name: Install pipenv
command: pip install pipenv==11.7.4
- run:
name: Install missing libraries
command: |
pipenv --python `which pypy3` run pip install pathlib2
- run:
name: install dependencies
command: |
pipenv install --python `which pypy3` --ignore-pipfile
pipenv install --python `which pypy3` --dev --ignore-pipfile
- save_cache: *store_cache
- run: *run_tests

flake8:
docker:
- image: circleci/python:3.6.4
working_directory: ~/repo
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Pipfile.lock" }}
- v1-dependencies-
- run:
name: install dependencies
command: |
pip install pipenv
pipenv install --three --ignore-pipfile
pipenv install --three --dev --ignore-pipfile
- save_cache:
paths:
- ./repo
key: v1-dependencies-{{ checksum "Pipfile.lock" }}
- run:
name: run tests
command: pipenv run flake8 vo tests
- checkout
- restore_cache: *read_cache
- run: *install_devdeps
- save_cache: *store_cache
- run:
name: run tests
command: pipenv run flake8 vo tests

docs:
docker:
- image: circleci/python:3.6.4
working_directory: ~/repo
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Pipfile.lock" }}
- v1-dependencies-
- run:
name: install dependencies
command: |
pip install pipenv
pipenv install --three --dev --ignore-pipfile
- save_cache:
paths:
- ./repo
key: v1-dependencies-{{ checksum "Pipfile.lock" }}
- run:
name: build docs
command: pipenv run make docs
- checkout
- restore_cache: *read_cache
- run: *install_devdeps
- save_cache: *store_cache
- run:
name: build docs
command: pipenv run make docs

workflows:
version: 2
test_all:
jobs:
- py35
- py36
- py37
- pypy35
- flake8
- docs
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ help:

install: ## install dependencies
pipenv install

install-dev: install ## install dev dependencies
pipenv install --dev

clean: clean-build clean-pyc clean-cache
Expand Down Expand Up @@ -52,4 +50,4 @@ release: sdist ## package and upload a release
sdist: clean ## package
pipenv run python setup.py sdist
gpg --detach-sign -a dist/*.tar.gz
ls -l dist
ls -l dist
6 changes: 3 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ url = "https://pypi.org/simple/"
verify_ssl = true
name = "pypi"


[packages]

[dev-packages]
bumpversion = "*"
coverage = "*"
coverage = "==4.5.2"
"flake8" = "*"
"flake8-bandit" = "*"
"flake8-bugbear" = "*"
Expand All @@ -17,10 +16,11 @@ coverage = "*"
"flake8-import-order" = "*"
"flake8-rst-docstrings" = "*"
"pep8-naming" = "*"
pytest = "*"
pytest = "==4.0.0"
setuptools-scm = "*"
sphinx = "*"
sphinx-rtd-theme = "*"
tox-pyenv = "*"
tox = "*"
twine = "*"
pathlib2 = "*"
Loading

0 comments on commit c040a96

Please sign in to comment.