Skip to content

create DateData class - #778

Merged
noviluni merged 16 commits into
scrapinghub:masterfrom
noviluni:implement_DateData_class
Oct 29, 2020
Merged

noviluni merged 16 commits into
scrapinghub:masterfrom
noviluni:implement_DateData_class

Conversation

@noviluni

@noviluni noviluni commented Sep 7, 2020 •

Copy link
Copy Markdown
Contributor

This was motivated by this comment: #729 (comment)

Changing from returning a dict to returning an object seems a better decision, as it gives more control over the results and allows to document the API easier.

This should probably be improved by adding more docs, etc.

This is blocking:

@noviluni
noviluni requested a review from Gallaecio September 7, 2020 11:13
@noviluni noviluni added this to the v1.0.0 milestone Sep 7, 2020
Comment thread dateparser/calendars/__init__.py Resolved
Comment thread dateparser/date.py Resolved
Comment thread dateparser/date.py Resolved
Comment thread dateparser/date.py Resolved
Comment thread dateparser/freshness_date_parser.py Resolved
Comment thread dateparser/date.py Resolved
@noviluni
noviluni force-pushed the implement_DateData_class branch from aa6ef69 to 2e48121 Compare September 16, 2020 14:51
@codecov

codecov Bot commented Oct 27, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #778 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #778      +/-   ##
==========================================
+ Coverage   98.24%   98.30%   +0.05%     
==========================================
  Files         231      231              
  Lines        2569     2590      +21     
==========================================
+ Hits         2524     2546      +22     
+ Misses         45       44       -1     
Impacted Files Coverage Δ
dateparser/calendars/__init__.py 95.50% <100.00%> (+0.05%) ⬆️
dateparser/date.py 100.00% <100.00%> (+0.42%) ⬆️
dateparser/freshness_date_parser.py 98.09% <100.00%> (+0.01%) ⬆️
dateparser/search/search.py 99.33% <100.00%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc0424a...0efff30. Read the comment docs.

@noviluni

Copy link
Copy Markdown
Contributor Author

I removed the is_relative property as it wasn't necessary. It was only used in the search part and it could be avoided.

I changed that part and moved the undocumented ExactLanguageSearch to the private scope (_ExactLanguageSearch), as we will probably need to change some behaviors in the future and this would avoid deprecating it in the future. Of course, this breaking change will be noted in the release notes.

@noviluni

Copy link
Copy Markdown
Contributor Author

I improved the coverage @Gallaecio, would you mind to take a look again? 🙂

@noviluni
noviluni requested a review from Gallaecio October 28, 2020 15:57
@noviluni noviluni mentioned this pull request Oct 28, 2020
@noviluni
noviluni merged commit d1128d2 into scrapinghub:master Oct 29, 2020
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.

2 participants