Skip to content

Ilya_Khonenko_honenkoi@gmail.com#7

Open
kingofmidas wants to merge 15 commits into
epam-python-courses-7-bsu:masterfrom
kingofmidas:master
Open

Ilya_Khonenko_honenkoi@gmail.com#7
kingofmidas wants to merge 15 commits into
epam-python-courses-7-bsu:masterfrom
kingofmidas:master

Conversation

@kingofmidas

Copy link
Copy Markdown

[Iteration 4] Format converter. Without unit tests.

Comment thread final_task/README.md Outdated
@HenadziStantchik HenadziStantchik added the please review I want mentors to review my PR ASAP label Nov 5, 2019
Comment thread final_task/rss_reader/get_cache.py Outdated
Comment thread final_task/rss_reader/rss_reader.py Outdated
@HenadziStantchik

Copy link
Copy Markdown
Collaborator

Please change commit messages or squash commits. Unfortunatelly right now half of the commit messages are really uninforamtive.

@HenadziStantchik

Copy link
Copy Markdown
Collaborator

Here is some feedback of your application work:

  1. Encoding problem (check your own example in README.md)
  2. You cannot get app version without specifying some RSS resource (e.g. python rss_parser.py --version does not work)
  3. In command line it would be nice to see at what place in the description exactly image was. (see the example in FinalTask.md)
  4. When using --json option your app prints BOTH json and normal versions.
  5. When reading news from cache using --date news are not separated by empty lines or any other separators. Looks a bit messy.
  6. When using --date with no internet connection script does not work even if I have cached news file for specified date. It is kind of eliminates purpose of using cache if you cannot access it without internet connection.
  7. HTML conversion does not work with --verbose argument
  8. PDF conversion does not work at all for me. Even got traceback and this should not happen at all.

image

  1. HTML conversion does not work with --date argument
  2. --date argument does not get limited by --limit argument.
  3. It would be nice if resulting HTML files names were a bit more specific. 33.html is hardly tells user anything useful

Comment thread final_task/README.md
Comment thread final_task/rss_reader/parse_news.py Outdated
Comment thread final_task/rss_reader/rss_reader.py Outdated
Comment thread final_task/rss_reader/rss_reader.py Outdated
Comment thread final_task/rss_reader/rss_reader.py Outdated
Comment thread final_task/rss_reader/rss_reader.py Outdated
Comment thread final_task/rss_reader/rss_reader.py Outdated
Comment thread final_task/rss_reader/rss_reader.py Outdated
Comment thread final_task/setup.py Outdated
@HenadziStantchik HenadziStantchik added reviewed Review was performed and removed please review I want mentors to review my PR ASAP reviewed Review was performed labels Nov 5, 2019
@kingofmidas

Copy link
Copy Markdown
Author

Here is some feedback of your application work:

  1. Encoding problem (check your own example in README.md)
  2. You cannot get app version without specifying some RSS resource (e.g. python rss_parser.py --version does not work)
  3. In command line it would be nice to see at what place in the description exactly image was. (see the example in FinalTask.md)
  4. When using --json option your app prints BOTH json and normal versions.
  5. When reading news from cache using --date news are not separated by empty lines or any other separators. Looks a bit messy.
  6. When using --date with no internet connection script does not work even if I have cached news file for specified date. It is kind of eliminates purpose of using cache if you cannot access it without internet connection.
  7. HTML conversion does not work with --verbose argument
  8. PDF conversion does not work at all for me. Even got traceback and this should not happen at all.

image

  1. HTML conversion does not work with --date argument
  2. --date argument does not get limited by --limit argument.
  3. It would be nice if resulting HTML files names were a bit more specific. 33.html is hardly tells user anything useful

Fixed

@kingofmidas kingofmidas changed the title Ilya_Khonenko_honenkoi@gmail.com Ilya_Khonenko_honenkoi@gmail.com PLEASE REVIEW Nov 9, 2019
Comment thread final_task/rss_reader/converter.py Outdated
Comment thread final_task/rss_reader/get_cache.py Outdated
Comment thread final_task/rss_reader/get_cache.py Outdated
Comment thread final_task/rss_reader/news_parser.py Outdated
Comment thread final_task/rss_reader/news_parser.py Outdated
Comment thread final_task/rss_reader/news_parser.py Outdated
Comment thread final_task/rss_reader/rss_reader.py Outdated
Comment thread final_task/rss_reader/topdf.py
Comment thread final_task/rss_reader/topdf.py
Comment thread final_task/rss_reader/topdf.py Outdated
@HenadziStantchik

Copy link
Copy Markdown
Collaborator

Good job, everything works fine.
Resolve these small issues in comments and proceed to Iteration 5.

@HenadziStantchik HenadziStantchik changed the title Ilya_Khonenko_honenkoi@gmail.com PLEASE REVIEW Ilya_Khonenko_honenkoi@gmail.com Nov 10, 2019
… create web server on flask with postgresql. create dockerfile and docker-compose for docker containers.
@kingofmidas kingofmidas changed the title Ilya_Khonenko_honenkoi@gmail.com Ilya_Khonenko_honenkoi@gmail.com - PLEASE REVIEW Nov 22, 2019
Comment thread final_task/README.md Outdated
Comment thread final_task/rss_reader/client/parser.log Outdated
@HenadziStantchik

HenadziStantchik commented Nov 22, 2019

Copy link
Copy Markdown
Collaborator
  1. There is SQL-related error on the server. Looks like it occurs when there is already such news entry in the db:

khon

  1. --json output is not colorized

  2. Please make colorization from --colorize more complex

  3. Please add some sort of additional functionality to the server, for example client authorization, make the server have list of RSS sources and fetch news from them form time to time and the clients can add/remove rss source and etc.

Comment thread final_task/rss_reader/app.py
Comment thread final_task/rss_reader/news_parser.py Outdated
@HenadziStantchik HenadziStantchik changed the title Ilya_Khonenko_honenkoi@gmail.com - PLEASE REVIEW Ilya_Khonenko_honenkoi@gmail.com Nov 22, 2019
@HenadziStantchik

Copy link
Copy Markdown
Collaborator

Please make parser.log not read-only

Comment thread final_task/rss_reader/client/parser.log Outdated
DEBUG [2019-11-25 21:10:55,763] http://127.0.0.1:5000 "GET /version/ HTTP/1.1" 200 3
INFO [2019-11-25 21:10:57,182] Website is working
DEBUG [2019-11-25 21:10:57,189] Starting new HTTP connection (1): 127.0.0.1:5000
DEBUG [2019-11-25 21:11:41,580] http://127.0.0.1:5000 "GET /print/ HTTP/1.1" 200 10160

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging files should not be checked in to GIT

Comment on lines +26 to +27
if (index == limit):
break

@HenadziStantchik HenadziStantchik Nov 26, 2019

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to use slices instead of comparing index with limit on each iteration

Same for other occurrences.

Comment thread final_task/rss_reader/get_cache.py Outdated
Comment on lines +39 to +40
finally:
con.close()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may potentially cause UnboundLocalError when variable referenced before assignment.
This is possible in case we will fail to connect to DB for some reason.

It is better to do as stated in docs:

con = psycopg2.connect....
try:
    ...
finally:
    con.close()

Same for another similar situation in news_parser file.

@HenadziStantchik

Copy link
Copy Markdown
Collaborator

Here is feedback on your application work:
Iteration 1 functionality:
Apart from minor encoding problems when using --json option, everything works fine.
Iteration 2:
Builds fine.
Iteration 3:
Everything works fine, but it would be nice to have a bit more info when printing cached news: date and etc. Also it would be nice if you had implemented search in cache not just by date, but by the source too (optional)
Iteration 4:
Everything works fine.
Iteration 5:
Everything works fine.
Iteration 6:
Everything works fine.

Overall aside from couple mishaps the code looks decent, commit messages informative and correspond to the recommended commit message style. Codestyle mostly corresponds to the PEP8 guidelines. Code is readable and clear. The application is decently structured.

Comment thread final_task/rss_reader/app.py Outdated


if __name__ == '__main__':
app.run(debug=True)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug should not be True

links:
- localhost

localhost:

@dzhigailo dzhigailo Nov 27, 2019

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you database service is called localhost? It may cause misunderstanding

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after testing forgot to change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants