Skip to content

Kirill_Ulich_k.ulitch@yandex.ru#19

Open
Kirill-Ulich wants to merge 11 commits into
epam-python-courses-7-bsu:masterfrom
Kirill-Ulich:master
Open

Kirill_Ulich_k.ulitch@yandex.ru#19
Kirill-Ulich wants to merge 11 commits into
epam-python-courses-7-bsu:masterfrom
Kirill-Ulich:master

Conversation

@Kirill-Ulich

Copy link
Copy Markdown

Iteration 1 completed

@HenadziStantchik

HenadziStantchik commented Nov 12, 2019

Copy link
Copy Markdown
Collaborator

Here is some feedback on your application work:

  1. User should be able to use --version without RSS source url, e.g. python rss_reader.py --version

  2. Your app has encoding problem (check image below)

  3. Sometimes link to an image is not provided (check image below)

kulitch

  1. --verbose does not work

Comment thread final_task/rss_reader/items.py Outdated
Comment thread final_task/rss_reader/parser_rss.py Outdated
Comment thread final_task/rss_reader/parser_rss.py Outdated
Comment thread final_task/rss_reader/parser_rss.py Outdated
Comment thread final_task/rss_reader/rss_reader.py Outdated
@HenadziStantchik HenadziStantchik changed the title Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Kirill_Ulich_k.ulitch@yandex.ru Nov 12, 2019
Comment thread final_task/rss_reader/items.py Outdated
from parser_rss import format_description


@dataclass()

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.

You dont need brakets here, since you dont pass any arguments into this decorator

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.

fixed

Comment thread final_task/rss_reader/items.py Outdated
if not isinstance(item, Item):
raise TypeError(f'Object with type {type(item)} is not serializable. Expected type: {Item}')

return {'title': item.title,

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.

dataclasses lib has function as_dict which you can use to cast your dataclass object into a dictionary

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.

fixed

@Kirill-Ulich Kirill-Ulich changed the title Kirill_Ulich_k.ulitch@yandex.ru Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Nov 14, 2019
@Kirill-Ulich

Copy link
Copy Markdown
Author

Iteration 2 completed

Comment thread final_task/rss_reader/items.py Outdated

logging.info('Loop for creating items.')
for item in parser.entries:
text_, img_links_ = format_description(item.description)

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 do you need underscores after text and img_links?

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.

fixed

Comment thread final_task/rss_reader/news_converter.py Outdated
:rtype: str
"""
logging.info('Converting items to dicts.')
map_of_dict_items = map(lambda item: asdict(item), items_)

@dzhigailo dzhigailo Nov 14, 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.

You can replace this with simple list comprehension, e.g. [asdict(item) for item in items_]

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.

fixed

Comment thread final_task/rss_reader/parser_rss.py Outdated
return parser


class GettingRSSException(Exception):

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's better to create separate module exceptions.py, where you store your custom exception objects.

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.

done

@dzhigailo dzhigailo changed the title Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Kirill_Ulich_k.ulitch@yandex.ru Nov 14, 2019
@HenadziStantchik

Copy link
Copy Markdown
Collaborator

tar.gz and whl files should not be checked to GIT.

Also for Iteration 2 it would be great if you could add step-by-step guide on how to run your application an a clean machine using setup tools

@Kirill-Ulich

Copy link
Copy Markdown
Author

Iteration 3 completed.

@Kirill-Ulich Kirill-Ulich changed the title Kirill_Ulich_k.ulitch@yandex.ru Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Nov 17, 2019
Comment thread final_task/README.md Outdated
Comment thread final_task/README.md Outdated
Comment thread final_task/rss_reader/exceptions.py Outdated
Comment thread final_task/rss_reader/exceptions.py Outdated
Comment thread final_task/rss_reader/items.py Outdated
Comment thread final_task/rss_reader/news_storage.py Outdated
Comment thread final_task/rss_reader/news_storage.py
Comment thread final_task/rss_reader/tools.py
Comment thread final_task/README.md Outdated
@HenadziStantchik

Copy link
Copy Markdown
Collaborator

User should be able to specify RSS feed url without using --source option.
Apart from this and some issues ;isted in comments I did not discover any issues with Iteration 3 functionality. Good job

@HenadziStantchik HenadziStantchik changed the title Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Kirill_Ulich_k.ulitch@yandex.ru Nov 18, 2019
@Kirill-Ulich

Copy link
Copy Markdown
Author

Iteration 4 completed

@Kirill-Ulich Kirill-Ulich changed the title Kirill_Ulich_k.ulitch@yandex.ru Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Nov 21, 2019
Comment thread final_task/rss_reader/news_converter.py Outdated
@HenadziStantchik

Copy link
Copy Markdown
Collaborator
  1. Pdf conversion does not work:

k

Please make sure that lib you are using for conversion does not require any additional packages on Linux OS.

@HenadziStantchik HenadziStantchik changed the title Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Kirill_Ulich_k.ulitch@yandex.ru Nov 22, 2019
@Kirill-Ulich

Copy link
Copy Markdown
Author

From git repository of xhtml2pdf: "All additional requirements are listed in requirements.txt file and are installed automatically using the pip install xhtml2pdf method." On Windows application works correctly. I not sure, but maybe neccessery version 0.2.1 of xhtml2pdf. But I cannot check it, because I do not have Linux.

@Kirill-Ulich Kirill-Ulich changed the title Kirill_Ulich_k.ulitch@yandex.ru Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Nov 22, 2019
text, img_links = format_description(item.description)

if not text:
continue

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's better to try to avoid using continue. In this particular case it looks fine, but in more complex logic you may want to do something like:
if text: new_item = Item( ...
And you will not need to use continue

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.

fixed

@HenadziStantchik

Copy link
Copy Markdown
Collaborator

Unfortunately pdf conversion still does not work for me together with --date:
k

@HenadziStantchik HenadziStantchik changed the title Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Kirill_Ulich_k.ulitch@yandex.ru Nov 23, 2019
@Kirill-Ulich Kirill-Ulich changed the title Kirill_Ulich_k.ulitch@yandex.ru Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Nov 23, 2019
@HenadziStantchik

Copy link
Copy Markdown
Collaborator

I did not discover any issues with iteration 5.

But pdf conversion still does not work: you forgot to push your font file.

Comment thread final_task/rss_reader/news_converter.py Outdated
@HenadziStantchik HenadziStantchik changed the title Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Kirill_Ulich_k.ulitch@yandex.ru Nov 24, 2019
@Kirill-Ulich Kirill-Ulich changed the title Kirill_Ulich_k.ulitch@yandex.ru Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Nov 24, 2019
@HenadziStantchik

Copy link
Copy Markdown
Collaborator

I did not discover any issues with Iteration 4 work, but please be sure to test it thoroughly in case I missed something

@HenadziStantchik HenadziStantchik changed the title Kirill_Ulich_k.ulitch@yandex.ru - PLEASE REVIEW Kirill_Ulich_k.ulitch@yandex.ru Nov 24, 2019
@HenadziStantchik

Copy link
Copy Markdown
Collaborator

Here is feedback on your application work:

Iteration 1:
Everything work fine.
Iteration 2:
Installs fine, but does not work:
image
Iteration 3:
Everything works fine. Good job implementing search by rss source.
Iteration 4:
Everything works fine. Great job on news news formatting in converted files.
Iteration 5:
Everything works fine.

Tests are ok, coverage is high enough. The code is readable, decently structured, absolutely corresponds to the PEP8 guidelines. Commit messages are informative, but do not correspond to the recommended commit message style.

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