2017-11-24 23:10:39 +00:00
|
|
|
|
language: python
|
2019-07-03 07:21:03 +00:00
|
|
|
|
dist: xenial # required for Python >= 3.7
|
|
|
|
|
python: 3.7
|
2019-07-08 15:27:51 +00:00
|
|
|
|
cache: pip
|
2019-07-10 04:59:39 +00:00
|
|
|
|
before_install: pip install --upgrade pip setuptools
|
2019-07-08 15:27:51 +00:00
|
|
|
|
install: pip install -r requirements.txt
|
2019-08-06 19:53:12 +00:00
|
|
|
|
matrix:
|
|
|
|
|
include:
|
|
|
|
|
- name: "Main tests"
|
|
|
|
|
# The following files currently fail pytests. See issues: #1016, #1044, #1080
|
|
|
|
|
# Here they are run allow_failures mode and when each passes pytest, it can be
|
|
|
|
|
# removed BOTH lists below. Complex now but simple once all files pass pytest.
|
|
|
|
|
# - env: FILE=pytest file_transfer_protocol/ftp_client_server.py
|
|
|
|
|
# before_script: true
|
|
|
|
|
# script: pytest ${FILE} --doctest-modules
|
|
|
|
|
- env: FILE=pytest file_transfer_protocol/ftp_send_receive.py
|
|
|
|
|
before_script: true
|
|
|
|
|
script: pytest ${FILE} --doctest-modules
|
|
|
|
|
- env: FILE=pytest machine_learning/linear_regression.py
|
|
|
|
|
before_script: true
|
|
|
|
|
script: pytest ${FILE} --doctest-modules
|
|
|
|
|
- env: FILE=pytest machine_learning/perceptron.py
|
|
|
|
|
before_script: true
|
|
|
|
|
script: pytest ${FILE} --doctest-modules
|
|
|
|
|
- env: FILE=pytest machine_learning/random_forest_classification/random_forest_classification.py
|
|
|
|
|
before_script: true
|
|
|
|
|
script: pytest ${FILE} --doctest-modules
|
|
|
|
|
- env: FILE=pytest machine_learning/random_forest_regression/random_forest_regression.py
|
|
|
|
|
before_script: true
|
|
|
|
|
script: pytest ${FILE} --doctest-modules
|
|
|
|
|
allow_failures:
|
|
|
|
|
- before_script: true
|
2019-07-08 15:27:51 +00:00
|
|
|
|
before_script:
|
|
|
|
|
- black --check . || true
|
2019-07-25 07:49:00 +00:00
|
|
|
|
- flake8 . --count --select=E9,F401,F63,F7,F82 --show-source --statistics
|
2019-07-08 15:27:51 +00:00
|
|
|
|
script:
|
2019-08-06 19:53:12 +00:00
|
|
|
|
- scripts/validate_filenames.py # no uppercase, no spaces, in a directory
|
2019-07-08 15:27:51 +00:00
|
|
|
|
- mypy --ignore-missing-imports .
|
2019-07-18 22:34:29 +00:00
|
|
|
|
- pytest . --doctest-modules
|
|
|
|
|
--ignore=file_transfer_protocol/ftp_send_receive.py
|
|
|
|
|
--ignore=machine_learning/linear_regression.py
|
|
|
|
|
--ignore=machine_learning/perceptron.py
|
|
|
|
|
--ignore=machine_learning/random_forest_classification/random_forest_classification.py
|
|
|
|
|
--ignore=machine_learning/random_forest_regression/random_forest_regression.py
|
2019-07-08 15:27:51 +00:00
|
|
|
|
after_success:
|
2019-07-28 15:27:23 +00:00
|
|
|
|
- scripts/build_directory_md.py > DIRECTORY.md
|
2019-07-08 15:27:51 +00:00
|
|
|
|
- cat DIRECTORY.md
|