<commit_before># Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
      - image: circleci/python:3.6.1

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/postgres:9.4
      - image: circleci/mysql:5.7
      - image: memcached

    branches:
      only:
        - master
        - develop

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      # - restore_cache:
      #     keys:
      #     - TBD

      - setup_remote_docker

      - run:
          name: build docker images
          command: |
            docker build -f docker/Dockerfile -t elmo_webapp .

      - run:
          name: launch memcached
          command: |
            docker run --name my-memcache -d memcached

      - run:
          name: test container
          command: |
            docker run \
            --rm -t \
            --link my-memcache:memcache \
            --env-file .circleci/test.env \
            -e ELMO_TEST_COMPRESS_ENABLED=0 -e ELMO_TEST_COMPRESS_OFFLINE=0 \
            elmo_webapp \
            /app/env/bin/python manage.py test -k --noinput

      - run:
          name: stop memcached
          command: |
            docker stop my-memcache

      - run:
          name: upload docker images
          command: |
            ./.circleci/docker-hub-upload elmo_webapp
<commit_msg>forward mysql port to container in test<commit_after># Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
      - image: circleci/python:3.6.1

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/postgres:9.4
      - image: circleci/mysql:5.7
      - image: memcached

    branches:
      only:
        - master
        - develop

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      # - restore_cache:
      #     keys:
      #     - TBD

      - setup_remote_docker

      - run:
          name: build docker images
          command: |
            docker build -f docker/Dockerfile -t elmo_webapp .

      - run:
          name: launch memcached
          command: |
            docker run --name my-memcache -d memcached

      - run:
          name: test container
          command: |
            docker run \
            --rm -t \
            --link my-memcache:memcache \
            -p 3306:3306/tcp \
            --env-file .circleci/test.env \
            -e ELMO_TEST_COMPRESS_ENABLED=0 -e ELMO_TEST_COMPRESS_OFFLINE=0 \
            elmo_webapp \
            /app/env/bin/python manage.py test -k --noinput

      - run:
          name: stop memcached
          command: |
            docker stop my-memcache

      - run:
          name: upload docker images
          command: |
            ./.circleci/docker-hub-upload elmo_webapp

{'fraction_non_alphanumeric': 0.09109137782870237, 'fraction_numerical': 0.013176740189057576, 'mean_word_length': 1.5396363636363637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7088498', 'n_tokens_mistral': 1082, 'n_tokens_neox': 1026, 'n_words': 272}