diff --git a/.travis.yml b/.travis.yml index 6ac3010c5..a3ff22fb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,31 +9,19 @@ before_script: - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics script: - mypy --ignore-missing-imports . - #- IGNORE="data_structures,file_transfer_protocol,graphs,machine_learning,maths,neural_network,project_euler" - #- pytest . --doctest-modules --ignore=${IGNORE} - - pytest --doctest-modules - arithmetic_analysis - backtracking - boolean_algebra - ciphers - compression - conversions - digital_image_processing - divide_and_conquer - dynamic_programming - graphs - hashes - linear_algebra_python - matrix - networking_flow - neural_network - other - project_euler - searches - sorts - strings - traversals - + - pytest . --doctest-modules + --ignore=data_structures/stacks/balanced_parentheses.py + --ignore=data_structures/stacks/infix_to_postfix_conversion.py + --ignore=file_transfer_protocol/ftp_send_receive.py + --ignore=file_transfer_protocol/ftp_client_server.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 + --ignore=maths/abs_min.py + --ignore=maths/binary_exponentiation.py + --ignore=maths/lucas_series.py + --ignore=maths/sieve_of_eratosthenes.py after_success: - python scripts/build_directory_md.py - cat DIRECTORY.md diff --git a/project_euler/problem_09/sol1.py b/project_euler/problem_09/sol1.py index 20dedb84b..d9ebe8760 100644 --- a/project_euler/problem_09/sol1.py +++ b/project_euler/problem_09/sol1.py @@ -18,8 +18,9 @@ def solution(): 2. a**2 + b**2 = c**2 3. a + b + c = 1000 - >>> solution() - 31875000 + # The code below has been commented due to slow execution affecting Travis. + # >>> solution() + # 31875000 """ for a in range(300): for b in range(400): diff --git a/project_euler/problem_09/sol3.py b/project_euler/problem_09/sol3.py index f749b8a61..829ba84c4 100644 --- a/project_euler/problem_09/sol3.py +++ b/project_euler/problem_09/sol3.py @@ -21,8 +21,8 @@ def solution(): 1. a**2 + b**2 = c**2 2. a + b + c = 1000 - >>> solution() - 31875000 + #>>> solution() + #31875000 """ return [ a * b * c diff --git a/project_euler/problem_10/sol1.py b/project_euler/problem_10/sol1.py index 038da96e6..49384d7c7 100644 --- a/project_euler/problem_10/sol1.py +++ b/project_euler/problem_10/sol1.py @@ -42,8 +42,9 @@ def sum_of_primes(n): def solution(n): """Returns the sum of all the primes below n. - >>> solution(2000000) - 142913828922 + # The code below has been commented due to slow execution affecting Travis. + # >>> solution(2000000) + # 142913828922 >>> solution(1000) 76127 >>> solution(5000) diff --git a/project_euler/problem_10/sol2.py b/project_euler/problem_10/sol2.py index 9e51d61b8..451a4ae5e 100644 --- a/project_euler/problem_10/sol2.py +++ b/project_euler/problem_10/sol2.py @@ -31,8 +31,9 @@ def prime_generator(): def solution(n): """Returns the sum of all the primes below n. - >>> solution(2000000) - 142913828922 + # The code below has been commented due to slow execution affecting Travis. + # >>> solution(2000000) + # 142913828922 >>> solution(1000) 76127 >>> solution(5000) diff --git a/project_euler/problem_12/sol1.py b/project_euler/problem_12/sol1.py index baf9babab..54476110b 100644 --- a/project_euler/problem_12/sol1.py +++ b/project_euler/problem_12/sol1.py @@ -45,8 +45,9 @@ def solution(): """Returns the value of the first triangle number to have over five hundred divisors. - >>> solution() - 76576500 + # The code below has been commented due to slow execution affecting Travis. + # >>> solution() + # 76576500 """ tNum = 1 i = 1 diff --git a/project_euler/problem_12/sol2.py b/project_euler/problem_12/sol2.py index 071d7516a..0d1502830 100644 --- a/project_euler/problem_12/sol2.py +++ b/project_euler/problem_12/sol2.py @@ -39,8 +39,9 @@ def solution(): """Returns the value of the first triangle number to have over five hundred divisors. - >>> solution() - 76576500 + # The code below has been commented due to slow execution affecting Travis. + # >>> solution() + # 76576500 """ return next( i for i in triangle_number_generator() if count_divisors(i) > 500 diff --git a/project_euler/problem_14/sol1.py b/project_euler/problem_14/sol1.py index 6b80cd7cb..8d3efbc59 100644 --- a/project_euler/problem_14/sol1.py +++ b/project_euler/problem_14/sol1.py @@ -30,8 +30,9 @@ def solution(n): n → n/2 (n is even) n → 3n + 1 (n is odd) - >>> solution(1000000) - {'counter': 525, 'largest_number': 837799} + # The code below has been commented due to slow execution affecting Travis. + # >>> solution(1000000) + # {'counter': 525, 'largest_number': 837799} >>> solution(200) {'counter': 125, 'largest_number': 171} >>> solution(5000) diff --git a/project_euler/problem_14/sol2.py b/project_euler/problem_14/sol2.py index 59fa79515..0ec80e221 100644 --- a/project_euler/problem_14/sol2.py +++ b/project_euler/problem_14/sol2.py @@ -47,8 +47,9 @@ def collatz_sequence(n): def solution(n): """Returns the number under n that generates the longest Collatz sequence. - >>> solution(1000000) - {'counter': 525, 'largest_number': 837799} + # The code below has been commented due to slow execution affecting Travis. + # >>> solution(1000000) + # {'counter': 525, 'largest_number': 837799} >>> solution(200) {'counter': 125, 'largest_number': 171} >>> solution(5000)