minimaxir / person-blocker

Automatically "block" people in images (like Black Mirror) using a pretrained neural network.
Other
2.02k stars 212 forks source link

Add Travis CI to do automated testing #2

Closed cclauss closed 6 years ago

cclauss commented 6 years ago

Flake8 tests can help to find Python syntax errors, undefined names, and other code quality issues. Travis CI is a framework for running flake8 and other tests which is free for open source projects like this one. The owner of the this repo would need to go to https://travis-ci.org/profile and flip the repository switch on to enable free automated flake8 testing of each pull request.

flake8 testing of https://github.com/minimaxir/person-blocker on Python 3.6.3

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./coco.py:108:16: F821 undefined name 'COCO'
        coco = COCO("{}/annotations/instances_{}{}.json".format(dataset_dir, subset, year))
               ^
./coco.py:288:20: F821 undefined name 'maskUtils'
            rles = maskUtils.frPyObjects(segm, height, width)
                   ^
./coco.py:289:19: F821 undefined name 'maskUtils'
            rle = maskUtils.merge(rles)
                  ^
./coco.py:292:19: F821 undefined name 'maskUtils'
            rle = maskUtils.frPyObjects(segm, height, width)
                  ^
./coco.py:304:13: F821 undefined name 'maskUtils'
        m = maskUtils.decode(rle)
            ^
./coco.py:333:33: F821 undefined name 'maskUtils'
                "segmentation": maskUtils.encode(np.asfortranarray(mask))
                                ^
./coco.py:378:16: F821 undefined name 'COCOeval'
    cocoEval = COCOeval(coco, coco_results, eval_type)
               ^
7     F821 undefined name 'COCO'
minimaxir commented 6 years ago

This is intended to be a simple project; it doesn't need linting CI at the moment.