<commit_before>version: 2.0

common: &common
  working_directory: ~/repo
  steps:
    - checkout
    - restore_cache:
        keys:
          - v1-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}
          - v1-deps-
    - run:
        name: install dependencies
        command: pip install --user $DJANGO coverage codecov
    - run:
        name: run tests
        command: PATH=~/.local/bin:$PATH coverage run setup.py test
    - save_cache:
        paths:
          - ~/.local
          - ./eggs
        key: v1-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}
    - run:
        name: upload coverage results
        command: PATH=~/.local/bin:$PATH codecov --required --flags $CIRCLE_JOB

jobs:
  lint:
    docker:
      - image: circleci/python:3.6
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
            - v1-lint-deps
      - run:
          name: install dependencies
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install flake8 flake8-quotes==0.11.0
      - save_cache:
          paths:
            - ./venv
          key: v1-lint-deps
      - run:
          name: lint code
          command: |
            . venv/bin/activate
            flake8 pinax

  py27dj18:
    <<: *common
    docker:
      - image: circleci/python:2.7
        environment:
          DJANGO=Django>=1.8,<1.9
  py27dj19:
    <<: *common
    docker:
      - image: circleci/python:2.7
        environment:
          DJANGO=Django>=1.9,<1.10
  py27dj110:
    <<: *common
    docker:
      - image: circleci/python:2.7
        environment:
          DJANGO=Django>=1.10,<1.11<commit_msg>Use latest version of flake8 and bust cache<commit_after>version: 2.0

common: &common
  working_directory: ~/repo
  steps:
    - checkout
    - restore_cache:
        keys:
          - v1-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}
          - v1-deps-
    - run:
        name: install dependencies
        command: pip install --user $DJANGO coverage codecov
    - run:
        name: run tests
        command: PATH=~/.local/bin:$PATH coverage run setup.py test
    - save_cache:
        paths:
          - ~/.local
          - ./eggs
        key: v1-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}
    - run:
        name: upload coverage results
        command: PATH=~/.local/bin:$PATH codecov --required --flags $CIRCLE_JOB

jobs:
  lint:
    docker:
      - image: circleci/python:3.6
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
            - v2-lint-deps
      - run:
          name: install dependencies
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install flake8==3.4.1 flake8-quotes==0.11.0
      - save_cache:
          paths:
            - ./venv
          key: v1-lint-deps
      - run:
          name: lint code
          command: |
            . venv/bin/activate
            flake8 pinax

  py27dj18:
    <<: *common
    docker:
      - image: circleci/python:2.7
        environment:
          DJANGO=Django>=1.8,<1.9
  py27dj19:
    <<: *common
    docker:
      - image: circleci/python:2.7
        environment:
          DJANGO=Django>=1.9,<1.10
  py27dj110:
    <<: *common
    docker:
      - image: circleci/python:2.7
        environment:
          DJANGO=Django>=1.10,<1.11
{'fraction_non_alphanumeric': 0.11973263586166812, 'fraction_numerical': 0.03080499854693403, 'mean_word_length': 1.5087463556851313, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3471864', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1145, 'n_words': 238}