From cc879184bdbebe6a9aa682c39b645da2714b4d32 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 18:33:29 -0400 Subject: [PATCH 01/16] Adding auto-generated CircleCI 2.0 config file --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..d5974c8f --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,3 @@ +{ + "message" : "Permission denied" +} \ No newline at end of file From b27e704a34595f5ea657ca5078d108fc410ae14a Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 18:56:23 -0400 Subject: [PATCH 02/16] Add a real Circle file --- .circleci/config.yml | 85 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d5974c8f..9f226f68 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,3 +1,82 @@ -{ - "message" : "Permission denied" -} \ No newline at end of file +# Python CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-python/ for more details +# +version: 2 +jobs: + build-linux-36: + docker: + - image: circleci/python:3.6.1 + working_directory: ~/repo + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - linux-dependencies-{{ checksum "requirements.txt" }} + # fallback to using the latest cache if no exact match is found + - linux-dependencies- + + - run: + name: install dependencies + command: | + python3 -m venv venv + . venv/bin/activate + pip install -e . + + - save_cache: + paths: + - ./venv + key: linux-dependencies-{{ checksum "requirements.txt" }} + + # run tests! + # this example uses Django's built-in test-runner + # other common Python testing frameworks include pytest and nose + # https://pytest.org + # https://nose.readthedocs.io + - run: + name: run tests + command: | + . venv/bin/activate + python manage.py test + + build-mac-36: + + # Specify the Xcode version to use + macos: + xcode: "8.3.3" + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - mac-dependencies-{{ checksum "requirements.txt" }} + # fallback to using the latest cache if no exact match is found + - mac-dependencies- + + - run: + name: install dependencies + command: | + python3 -m venv venv + . venv/bin/activate + pip install -e . + + - save_cache: + paths: + - ./venv + key: mac-dependencies-{{ checksum "requirements.txt" }} + + # run tests! + # this example uses Django's built-in test-runner + # other common Python testing frameworks include pytest and nose + # https://pytest.org + # https://nose.readthedocs.io + - run: + name: run tests + command: | + . venv/bin/activate + python manage.py test From e2b879ea2b0e14f8d5b003b6878d09f89ce0497c Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 19:09:57 -0400 Subject: [PATCH 03/16] Kick CI From d4a944ab2d6f5c048cb5170f2557ed7adcd26475 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 19:12:19 -0400 Subject: [PATCH 04/16] Add workflows --- .circleci/config.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9f226f68..470e2382 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,3 +80,10 @@ jobs: command: | . venv/bin/activate python manage.py test + +workflows: + version: 2 + build_and_test: + jobs: + - build-linux-36 + - build-mac-36 From 8d40e666c3c8921f9e94060a9b8055b3c37528a7 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 19:23:49 -0400 Subject: [PATCH 05/16] Replace circle with travis --- .circleci/config.yml | 89 -------------------------------------------- .travis.yml | 48 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 89 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 470e2382..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,89 +0,0 @@ -# Python CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-python/ for more details -# -version: 2 -jobs: - build-linux-36: - docker: - - image: circleci/python:3.6.1 - working_directory: ~/repo - - steps: - - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - linux-dependencies-{{ checksum "requirements.txt" }} - # fallback to using the latest cache if no exact match is found - - linux-dependencies- - - - run: - name: install dependencies - command: | - python3 -m venv venv - . venv/bin/activate - pip install -e . - - - save_cache: - paths: - - ./venv - key: linux-dependencies-{{ checksum "requirements.txt" }} - - # run tests! - # this example uses Django's built-in test-runner - # other common Python testing frameworks include pytest and nose - # https://pytest.org - # https://nose.readthedocs.io - - run: - name: run tests - command: | - . venv/bin/activate - python manage.py test - - build-mac-36: - - # Specify the Xcode version to use - macos: - xcode: "8.3.3" - - steps: - - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - mac-dependencies-{{ checksum "requirements.txt" }} - # fallback to using the latest cache if no exact match is found - - mac-dependencies- - - - run: - name: install dependencies - command: | - python3 -m venv venv - . venv/bin/activate - pip install -e . - - - save_cache: - paths: - - ./venv - key: mac-dependencies-{{ checksum "requirements.txt" }} - - # run tests! - # this example uses Django's built-in test-runner - # other common Python testing frameworks include pytest and nose - # https://pytest.org - # https://nose.readthedocs.io - - run: - name: run tests - command: | - . venv/bin/activate - python manage.py test - -workflows: - version: 2 - build_and_test: - jobs: - - build-linux-36 - - build-mac-36 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..e82e46dd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,48 @@ +language: python +matrix: + include: + # Travis does not yet support Python 3.7 on Linux + # uncomment the following when it does + #- os: linux + # python: 3.7 + # env: + # - MINICONDA_OS="Linux" + # - CI=true + # - TRAVIS=true + - os: linux + python: 3.6 + env: + - MINICONDA_OS="Linux" + - os: linux + python: 3.7-dev + - os: linux + python: "pypy3" + - os: osx + language: generic + env: PYTHON="3.6" MINICONDA_OS="MacOSX" + - os: osx + language: generic + env: PYTHON="3.7" MINICONDA_OS="MacOSX" + allow_failures: + - python: "3.7-dev" + - python: "pypy3" + +before_install: + - if [[ $MINICONDA_OS ]]; then + URL="https://repo.continuum.io/miniconda/Miniconda3-latest-${MINICONDA_OS}-x86_64.sh"; + wget "${URL}" -O miniconda.sh; + bash miniconda.sh -b -p $HOME/miniconda; + export PATH="$HOME/miniconda/bin:$PATH"; + hash -r; + conda config --set always_yes yes --set changeps1 no; + conda update -q conda; + conda info -a; + fi + +install: + - pip install -e .; + - pip install pytest + +script: + - set -e + - pytest From 8a1aa37ef5dca7622f7305649b42dec5bd73162c Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 19:25:12 -0400 Subject: [PATCH 06/16] Kick CI From 8fb2489ed16de80716362e8d7e3b9ab51e9e7203 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 19:28:15 -0400 Subject: [PATCH 07/16] Remove PyPy, it's not a new enough language version --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e82e46dd..0931f062 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,6 @@ matrix: - MINICONDA_OS="Linux" - os: linux python: 3.7-dev - - os: linux - python: "pypy3" - os: osx language: generic env: PYTHON="3.6" MINICONDA_OS="MacOSX" @@ -25,7 +23,6 @@ matrix: env: PYTHON="3.7" MINICONDA_OS="MacOSX" allow_failures: - python: "3.7-dev" - - python: "pypy3" before_install: - if [[ $MINICONDA_OS ]]; then From d90554ad0b98275f9293e94403da69ffe0051d18 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 19:29:31 -0400 Subject: [PATCH 08/16] Add python night --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0931f062..e2934f10 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,20 @@ language: python matrix: include: + - os: linux + python: 3.6 + env: + - MINICONDA_OS="Linux" # Travis does not yet support Python 3.7 on Linux # uncomment the following when it does #- os: linux # python: 3.7 # env: # - MINICONDA_OS="Linux" - # - CI=true - # - TRAVIS=true - - os: linux - python: 3.6 - env: - - MINICONDA_OS="Linux" - os: linux python: 3.7-dev + - os: linux + python: nightly - os: osx language: generic env: PYTHON="3.6" MINICONDA_OS="MacOSX" From 4c83b2d4bcd3457aa123077f0be6d5aae5dbc325 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 19:36:42 -0400 Subject: [PATCH 09/16] Add appveyor --- .appveyor.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 00000000..9d6d5eb3 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,15 @@ +environment: + + matrix: + # https://www.appveyor.com/docs/windows-images-software/#python + - PYTHON: "C:\\Python36" + - PYTHON: "C:\\Python37" + - PYTHON: "C:\\Python36-x64" + - PYTHON: "C:\\Python37-x64" + +install: + - %PYTHON%\Scripts\pip install -e . + - %PYTHON%\Scripts\pip install pytest +build: off +test_script: + - %PYTHON%\Scripts\pytest From b7c5f1ba25ff3e2cc674b93b75cc2974cbb2152f Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 19:39:27 -0400 Subject: [PATCH 10/16] s/.appveyor/appveyor/ --- .appveyor.yml => appveyor.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .appveyor.yml => appveyor.yml (100%) diff --git a/.appveyor.yml b/appveyor.yml similarity index 100% rename from .appveyor.yml rename to appveyor.yml From 34d9f55b09b5018b06be50bdbcdad8e9bb28d961 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 19:40:48 -0400 Subject: [PATCH 11/16] Valid yaml --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9d6d5eb3..0b3b88fe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,8 +8,8 @@ environment: - PYTHON: "C:\\Python37-x64" install: - - %PYTHON%\Scripts\pip install -e . - - %PYTHON%\Scripts\pip install pytest + - '%PYTHON%\Scripts\pip install -e .' + - '%PYTHON%\Scripts\pip install pytest' build: off test_script: - - %PYTHON%\Scripts\pytest + - '%PYTHON%\Scripts\pytest' From 63937f0b601a7c66ce0cbe593458aef269113cbc Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 19:48:18 -0400 Subject: [PATCH 12/16] Attempt to use regular 3.7 on travis --- .travis.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2934f10..12f4cc60 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,10 @@ matrix: python: 3.6 env: - MINICONDA_OS="Linux" - # Travis does not yet support Python 3.7 on Linux - # uncomment the following when it does - #- os: linux - # python: 3.7 - # env: - # - MINICONDA_OS="Linux" - os: linux - python: 3.7-dev + python: 3.7 + env: + - MINICONDA_OS="Linux" - os: linux python: nightly - os: osx @@ -22,7 +18,7 @@ matrix: language: generic env: PYTHON="3.7" MINICONDA_OS="MacOSX" allow_failures: - - python: "3.7-dev" + - python: "nightly" before_install: - if [[ $MINICONDA_OS ]]; then From a263b9e9dca56ec701b423d3787a5ff2b2bcf3f4 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 20:00:51 -0400 Subject: [PATCH 13/16] Use conda for Linux-3.7. Also install specific versions of python with conda --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 12f4cc60..45a4bcb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,11 @@ matrix: - os: linux python: 3.6 env: - - MINICONDA_OS="Linux" - os: linux - python: 3.7 + language: generic env: - MINICONDA_OS="Linux" + - PYTHON="3.7" - os: linux python: nightly - os: osx @@ -30,6 +30,8 @@ before_install: conda config --set always_yes yes --set changeps1 no; conda update -q conda; conda info -a; + conda create -q -n test-environment python=$PYTHON + source activate test-environment fi install: From 71dac0d8078dd565a65ba2dd23df0239199dcccd Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 20:03:31 -0400 Subject: [PATCH 14/16] Forgot semicolons --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45a4bcb3..bb5d0e53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ matrix: include: - os: linux python: 3.6 - env: - os: linux language: generic env: @@ -30,13 +29,13 @@ before_install: conda config --set always_yes yes --set changeps1 no; conda update -q conda; conda info -a; - conda create -q -n test-environment python=$PYTHON - source activate test-environment - fi + conda create -q -n test-environment python=$PYTHON; + source activate test-environment; + fi; install: - pip install -e .; - - pip install pytest + - pip install pytest; script: - set -e From 35f54e1c6fd8e7eddcae9c86f1e43412aae63d56 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 20:08:20 -0400 Subject: [PATCH 15/16] Add dataclasses if installing on 3.6 --- setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 79e0e206..932d1c87 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,16 @@ from setuptools import setup +import sys def readme(): with open('README.md') as file: return file.read() +backports = [] + +if sys.version_info < (3, 7): + backports += ['dataclasses'] + setup( name='ppb', version='0.3.0', @@ -12,7 +18,7 @@ def readme(): install_requires=[ 'pygame', 'ppb-vector', - ], + ] + backports, url='https://github.com/pathunstrom/pursuedpybear', license='', author='Piper Thunstrom', From 0c790c35417459d119c8899034342977fca85b02 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 19 Sep 2018 21:53:31 -0400 Subject: [PATCH 16/16] Clean up travis a little bit, so it's more readable --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index bb5d0e53..c95cf670 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,7 @@ matrix: python: 3.6 - os: linux language: generic - env: - - MINICONDA_OS="Linux" - - PYTHON="3.7" + env: PYTHON="3.7" MINICONDA_OS="Linux" - os: linux python: nightly - os: osx @@ -38,5 +36,4 @@ install: - pip install pytest; script: - - set -e - pytest