Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create DateData class #778

Merged
merged 16 commits into from
Oct 29, 2020
Merged

Conversation

noviluni
Copy link
Collaborator

@noviluni noviluni commented Sep 7, 2020

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 added this to the v1.0.0 milestone Sep 7, 2020
dateparser/calendars/__init__.py Outdated Show resolved Hide resolved
dateparser/date.py Outdated Show resolved Hide resolved
dateparser/date.py Outdated Show resolved Hide resolved
dateparser/date.py Outdated Show resolved Hide resolved
dateparser/freshness_date_parser.py Show resolved Hide resolved
dateparser/date.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 27, 2020

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
Collaborator 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
Collaborator Author

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

@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