<commit_before>version: 2.1

orbs:
  python: circleci/python@1.2

workflows:
  build:
    jobs:
      - build

jobs:
  build:
    docker:
      - image: cimg/python:3.8
      - image: circleci/postgres:9.6.9-postgis
        auth:
          username: mydockerhub-user
          password: <PASSWORD>  # context / project UI env-var reference
        environment:
          POSTGRES_USER: root
          POSTGRES_DB: circle_test
          POSTGRES_PASSWORD: ""
    steps:
      - checkout
      - restore_cache:
          key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
      - run:
          name: Build and validate
          command: |
            sudo apt-get update && sudo apt-get install -y gdal-bin python3-gdal
            python3 -m venv ../venv
            . ../venv/bin/activate
            pip install -r requirements.txt --progress-bar off
            cd ..
            mv project passive_data_kit
            mkdir django
            cd django
            django-admin.py startproject pdk
            mv ../passive_data_kit pdk
            cd pdk
            ls
            pwd
            cp passive_data_kit/circle_settings.py pdk/settings.py
            python manage.py migrate
            python manage.py test
            cp passive_data_kit/.pylintrc .
            pylint passive_data_kit
            bandit -r .      
      - save_cache:
          key: deps1-{{ .Branch }}-{{ checksum "/home/circleci/project/pdk/passive_data_kit/requirements.txt" }}
          paths:
            - "venv"
      - store_test_results:
          path: test-results/
      - store_artifacts:
          path: test-reports/
          destination: python_app
<commit_msg>CircleCI fixes<commit_after>version: 2.1

orbs:
  python: circleci/python@1.2

workflows:
  build:
    jobs:
      - build

jobs:
  build:
    docker:
      - image: cimg/python:3.8
      - image: circleci/postgres:9.6.9-postgis
        auth:
          username: mydockerhub-user
          password: <PASSWORD>  # context / project UI env-var reference
        environment:
          POSTGRES_USER: root
          POSTGRES_DB: circle_test
          POSTGRES_PASSWORD: ""
    steps:
      - checkout
      - restore_cache:
          key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
      - run:
          name: Build and validate
          command: |
            sudo apt-get update && sudo apt-get install -y gdal-bin python3-gdal
            python3 -m venv ../venv
            . ../venv/bin/activate
            pip install -r requirements.txt --progress-bar off
            cd ..
            mv project passive_data_kit
            mkdir django
            cd django
            django-admin.py startproject pdk
            mv ../passive_data_kit pdk
            cd pdk
            ls
            pwd
            cp passive_data_kit/circle_settings.py pdk/settings.py
            python manage.py migrate
            python manage.py test
            cp passive_data_kit/.pylintrc .
            pylint passive_data_kit
            bandit -r .      
      - save_cache:
          key: deps1-{{ .Branch }}-{{ checksum "/home/circleci/pdk/passive_data_kit/requirements.txt" }}
          paths:
            - "venv"
      - store_test_results:
          path: test-results/
      - store_artifacts:
          path: test-reports/
          destination: python_app

{'fraction_non_alphanumeric': 0.08683974932855863, 'fraction_numerical': 0.007758877946881528, 'mean_word_length': 1.4485025566106646, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1028477', 'n_tokens_mistral': 1027, 'n_tokens_neox': 991, 'n_words': 231}