From 3edf4caa3b4deb3440192e48f8dbe371731ce434 Mon Sep 17 00:00:00 2001 From: Barak Merdler Date: Tue, 26 Nov 2019 10:35:36 +0200 Subject: [PATCH 1/5] adding app.py to solved the challenge Cheange after review from Aviad, used with.. open, variable names cheanged, pass flake8 lint rules broke the last print into 2 prints commands added yml for testing flake8 on travis CI comiited the wrong file before Delete app.py only want on this PR .travis.yml --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..02e5e5d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: python +python: + - "3.6" + - "3.7" + - "3.8" + +install: + - pip install flake8 + +script: + - flake8 . From 2e060ae71ff940777115350dbf444e1eac1f2948 Mon Sep 17 00:00:00 2001 From: Barak Merdler Date: Fri, 29 Nov 2019 14:23:30 +0200 Subject: [PATCH 2/5] commiting python file that is not going to pass flake8 rules to check the script --- Python-Home-Challenges/app.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Python-Home-Challenges/app.py diff --git a/Python-Home-Challenges/app.py b/Python-Home-Challenges/app.py new file mode 100644 index 0000000..4c1b443 --- /dev/null +++ b/Python-Home-Challenges/app.py @@ -0,0 +1,10 @@ +with open("./Python-Home-Challenges/Challenge_01.txt") as file: + fileArr = file.read().split() + words = {} + for word in fileArr: + if word in words: + words[word] += 1 + else: + words[word] = 1 + print( + f'Most recurring word in that file: {max(words, key=words.get)} And it appears {words[max(words, key=words.get)]} times') From 1e5cc32871e192204e87c41d7815038b13ae5b74 Mon Sep 17 00:00:00 2001 From: Barak Merdler Date: Fri, 29 Nov 2019 14:28:43 +0200 Subject: [PATCH 3/5] commiting python file that is going to pass flake8 rules to check the script --- Python-Home-Challenges/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Python-Home-Challenges/app.py b/Python-Home-Challenges/app.py index 4c1b443..b438fa2 100644 --- a/Python-Home-Challenges/app.py +++ b/Python-Home-Challenges/app.py @@ -6,5 +6,5 @@ words[word] += 1 else: words[word] = 1 - print( - f'Most recurring word in that file: {max(words, key=words.get)} And it appears {words[max(words, key=words.get)]} times') + print(f'Most recurring word in that file: {max(words, key=words.get)}') + print(f'And it appears {words[max(words, key=words.get)]} times') From 687918f4365913f4c0cfa25874387ea7cec2d42a Mon Sep 17 00:00:00 2001 From: Barak Merdler <39872010+BarakMerdler@users.noreply.github.com> Date: Fri, 29 Nov 2019 14:31:03 +0200 Subject: [PATCH 4/5] delete app.js delete from this PR added just to check if .yml is working as expected --- Python-Home-Challenges/app.py | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 Python-Home-Challenges/app.py diff --git a/Python-Home-Challenges/app.py b/Python-Home-Challenges/app.py deleted file mode 100644 index b438fa2..0000000 --- a/Python-Home-Challenges/app.py +++ /dev/null @@ -1,10 +0,0 @@ -with open("./Python-Home-Challenges/Challenge_01.txt") as file: - fileArr = file.read().split() - words = {} - for word in fileArr: - if word in words: - words[word] += 1 - else: - words[word] = 1 - print(f'Most recurring word in that file: {max(words, key=words.get)}') - print(f'And it appears {words[max(words, key=words.get)]} times') From b7139cbcb469455f35ac0fef8ce34c8d5c3ae297 Mon Sep 17 00:00:00 2001 From: Barak Merdler <39872010+BarakMerdler@users.noreply.github.com> Date: Fri, 29 Nov 2019 21:08:45 +0200 Subject: [PATCH 5/5] Add Travis CI with Flaks8 validation issue #5