version: 2
jobs:
  build:
    docker:
      - image: circleci/python:2.7.15-stretch
    steps:
      - checkout
      - run:
          name: Update packages
          command: sudo apt-get update
      - run:
          name: Install PROJ data
          command: sudo apt-get install proj-data
      - restore_cache:
          key: python-requirements-{{ .Branch }}-{{ checksum "requirements.txt" }}
      - run:
          name: Install Pip dependencies
          command: |
            virtualenv ~/env
            . ~/env/bin/activate
            pip install -Ur requirements.txt
      - save_cache:
          key: python-requirements-{{ .Branch }}-{{ checksum "requirements.txt" }}
          paths:
            - "~/env"
      - run:
          name: Setup.py develop
          command: |
            . ~/env/bin/activate
            python setup.py develop
      - run:
          name: Install Python packages for testing
          command: |
            . ~/env/bin/activate
            pip install -U flake8 'mock==1.2.0' httptestserver
      - run:
          name: Check PEP8 compliance
          command: |
            . ~/env/bin/activate
            find . -not -path '*/.eggs/*' -not -path '*OSciMap4*' -name '*.py' | xargs flake8
      - run:
          name: Unit tests
          command: |
            . ~/env/bin/activate
            python setup.py test

version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.7.8-stretch
    steps:
      - checkout
      - run:
          name: Update packages
          command: sudo apt-get update
      - run:
          name: Install PROJ data
          command: sudo apt-get install proj-data
      - restore_cache:
          key: python-requirements-{{ .Branch }}-{{ checksum "requirements.txt" }}
      - run:
          name: Install Pip dependencies
          command: |
            virtualenv ~/env
            . ~/env/bin/activate
            pip install -Ur requirements.txt
      - save_cache:
          key: python-requirements-{{ .Branch }}-{{ checksum "requirements.txt" }}
          paths:
            - "~/env"
      - run:
          name: Setup.py develop
          command: |
            . ~/env/bin/activate
            python setup.py develop
      - run:
          name: Install Python packages for testing
          command: |
            . ~/env/bin/activate
            pip install -U flake8 'mock==1.2.0' httptestserver
      - run:
          name: Check PEP8 compliance
          command: |
            . ~/env/bin/activate
            find . -not -path '*/.eggs/*' -not -path '*OSciMap4*' -name '*.py' | xargs flake8
      - run:
          name: Unit tests
          command: |
            . ~/env/bin/activate
            python setup.py test

Use python 3.7.8 on circle
Use python 3.7.8 on circle
