https://github.com/RadioAstronomySoftwareGroup/pyuvdata
Raw File
Tip revision: d1829efacb60da384f64a8f25a280441bfa9d68a authored by Bryna Hazelton on 24 May 2019, 01:18 UTC
increase version to 1.4.0
Tip revision: d1829ef
config.yml
version: 2.1
orbs:
  codecov: codecov/codecov@1.0.2 # to get this to work, had to opt-in to using third party orbs in Organization Security settings.
jobs:
  linter:
    parameters:
      python_version:
        type: string
    docker:
      - image: continuumio/miniconda:latest
    environment:
      PYTHON: << parameters.python_version >>
      ENV_NAME: pyuvdata_linting
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_linting.yml" }}
      - run:
          name: configure conda environment
          command: ./ci/install-circle.sh
      - run:
          name: linting for PEP8 compliance
          command: |
            source activate ${ENV_NAME}
            pycodestyle --ignore=E501,W503
      - save_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_linting.yml" }}
          paths:
            - "/opt/conda/envs/${ENV_NAME}/"

  pyuvdata:
    parameters:
      python_version:
        type: string
    docker:
      - image: continuumio/miniconda:latest
    environment:
      PYTHON: << parameters.python_version >>
      ENV_NAME: pyuvdata_tests
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
      - run:
          name: configure conda environment
          command: ./ci/install-circle.sh
      - run:
          name: install
          command: |
            source activate ${ENV_NAME}
            python setup.py build_ext --force --inplace
      - run:
          name: run pyuvdata tests
          command: |
            source activate ${ENV_NAME}
            mkdir test-reports
            python -m pytest pyuvdata -v --cov=pyuvdata --cov-config=.coveragerc --cov-report xml:./coverage.xml --junitxml=test-reports/xunit.xml
      - save_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
          paths:
            - "/opt/conda/envs/${ENV_NAME}/"
      - store_test_results:
          path: test-reports
      - store_artifacts:
          path: test-reports
      - codecov/upload:
          file: ./coverage.xml

  pyuvdata_min_deps:
    parameters:
      python_version:
        type: string
    docker:
      - image: continuumio/miniconda:latest
    environment:
      PYTHON: << parameters.python_version >>
      ENV_NAME: pyuvdata_min_deps_tests
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_min_deps_tests.yml" }}
      - run:
          name: configure conda environment
          command: ./ci/install-circle.sh
      - run:
          name: install
          command: |
            source activate ${ENV_NAME}
            python setup.py build_ext --force --inplace
      - run:
          name: run pyuvdata tests
          command: |
            source activate ${ENV_NAME}
            mkdir test-reports
            python -m pytest pyuvdata -v --cov=pyuvdata --cov-config=.coveragerc --cov-report xml:./coverage.xml --junitxml=test-reports/xunit.xml
      - save_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_min_deps_tests.yml" }}
          paths:
            - "/opt/conda/envs/${ENV_NAME}/"
      - store_test_results:
          path: test-reports
      - store_artifacts:
          path: test-reports
      - codecov/upload:
          file: ./coverage.xml

  doctest:
    parameters:
      python_version:
        type: string
    docker:
      - image: continuumio/miniconda:latest
    environment:
      PYTHON: << parameters.python_version >>
      ENV_NAME: pyuvdata_tests
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
      - run:
          name: configure conda environment
          command: ./ci/install-circle.sh
      - run:
          name: install
          command: |
            source activate ${ENV_NAME}
            python setup.py build_ext --force --inplace
      - run:
          name: run tutorial tests
          command: |
            source activate ${ENV_NAME}
            python -m doctest docs/tutorial.rst
      - save_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
          paths:
            - "/opt/conda/envs/${ENV_NAME}/"

  hera_cal:
    parameters:
      python_version:
        type: string
    docker:
      - image: continuumio/miniconda:latest
    environment:
      PYTHON: << parameters.python_version >>
      ENV_NAME: "hera_cal"
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/hera_cal.yml" }}
      - run:
          name: configure conda environment
          command: ./ci/install-circle.sh
      - run:
          name: install related repos
          command: |
            source activate ${ENV_NAME}
            pip install .
            pip install git+https://github.com/HERA-Team/linsolve.git
            pip install git+https://github.com/HERA-Team/hera_qm.git
            pip install git+https://github.com/HERA-Team/uvtools.git
            pip install git+https://github.com/HERA-Team/hera_sim.git
      - run:
          name: run hera_cal tests
          command: |
            source activate ${ENV_NAME}
            cd ../
            git clone git@github.com:HERA-Team/hera_cal.git
            cd hera_cal
            mkdir test-reports
            python -m pytest hera_cal -v --junitxml=test-reports/xunit.xml
      - save_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/hera_cal.yml" }}
          paths:
            - "/opt/conda/envs/${ENV_NAME}/"
      - store_test_results:
          path: hera_cal/test-reports
      - store_artifacts:
          path: hera_cal/test-reports

  hera_qm:
    parameters:
      python_version:
        type: string
    docker:
      - image: continuumio/miniconda:latest
    environment:
      PYTHON: << parameters.python_version >>
      ENV_NAME: "hera_qm"
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/hera_qm.yml" }}
      - run:
          name: configure conda environment
          command: ./ci/install-circle.sh
      - run:
          name: install related repos
          command: |
            source activate ${ENV_NAME}
            pip install .
            pip install git+https://github.com/HERA-Team/omnical.git
            pip install git+https://github.com/HERA-Team/linsolve.git
            pip install git+https://github.com/HERA-Team/uvtools.git
            pip install git+https://github.com/HERA-Team/hera_cal.git
      - run:
          name: run hera_qm tests
          command: |
            source activate ${ENV_NAME}
            cd ../
            git clone git@github.com:HERA-Team/hera_qm.git
            cd hera_qm
            mkdir test-reports
            python -m pytest hera_qm -v --junitxml=test-reports/xunit.xml

      - save_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/hera_qm.yml" }}
          paths:
            - "/opt/conda/envs/${ENV_NAME}/"
      - store_test_results:
          path: hera_qm/test-reports
      - store_artifacts:
          path: hera_qm/test-reports

workflows:
  version: 2
  build_and_test:
    jobs:
      - linter:
          python_version: "3.6"
      - pyuvdata:
          name: pyuvdata_2.7
          python_version: "2.7"
      - pyuvdata:
          name: pyuvdata_3.6
          python_version: "3.6"
      - pyuvdata:
          name: pyuvdata_3.7
          python_version: "3.7"
      - pyuvdata_min_deps:
          python_version: "3.6"
      - doctest:
          python_version: "3.6"

  external_tests:
    jobs:
      - hera_cal:
          python_version: "3.6"
      - hera_qm:
          python_version: "3.6"
back to top