diff --git a/.circleci/config.yml b/.circleci/config.yml index ad0e46f2e8fc978921994cc6204badf0fe1818b9..b4c20110e27cdcab5d031f3dd7e1c843f02219e8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -90,7 +90,7 @@ jobs: export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH conda create -y -n habitat python=3.6 . activate habitat - conda install -q -y -c conda-forge ninja ccache numpy pytest pytest-mock + conda install -q -y -c conda-forge ninja ccache numpy pytest pytest-mock pytest-cov fi - run: name: Install pytorch @@ -191,6 +191,7 @@ jobs: . activate habitat; cd habitat-api python setup.py develop --all python setup.py test + bash <(curl -s https://codecov.io/bash) -f coverage.xml workflows: diff --git a/README.md b/README.md index 9e0882f11b893b6b023534fefe7fe8d7f0c0c3aa..a697fe2bc095a5299aa80578133ef171f0129208 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [](https://github.com/facebookresearch/habitat-api/blob/master/LICENSE) [](https://circleci.com/gh/facebookresearch/habitat-api) +[](https://codecov.io/gh/facebookresearch/habitat-api) Habitat-API ============================== diff --git a/setup.cfg b/setup.cfg index f856acc6a93e2abeae62c6bfdfba2a86af2d6398..28dcb2b4a430d520a52280d850dc3a405d449896 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,5 +2,5 @@ test=pytest [tool:pytest] -addopts = --verbose -rsxX -q +addopts = --verbose -rsxX -q --cov-report=xml --cov=./ testpaths = test diff --git a/test/test_relative_camera.py b/test/test_relative_camera.py deleted file mode 100644 index 0911861d419af66568d4b2e144ec8d4d76454bf8..0000000000000000000000000000000000000000 --- a/test/test_relative_camera.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) Facebook, Inc. and its affiliates. -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. -import gc - -import pytest - -import habitat -from habitat.datasets.pointnav.pointnav_dataset import PointNavDatasetV1 - -try: - import torch # noqa # pylint: disable=unused-import - - has_torch = True -except ImportError: - has_torch = False - - -@pytest.mark.skipif(not has_torch, reason="Test needs torch") -def test_demo_notebook(): - config = habitat.get_config("configs/tasks/pointnav_rgbd.yaml") - config.defrost() - config.DATASET.SPLIT = "val" - - if not PointNavDatasetV1.check_config_paths_exist(config.DATASET): - pytest.skip("Please download the habitat test scenes") - else: - pytest.main( - [ - "--nbval-lax", - "notebooks/relative_camera_views_transform_and_warping_demo.ipynb", - ] - ) - - # NB: Force a gc collect run as it can take a little bit for - # the cleanup to happen after the notebook and we get - # a double context crash! - gc.collect()