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

Simpler duplicates #171

Merged
merged 5 commits into from
Oct 24, 2019
Merged

Simpler duplicates #171

merged 5 commits into from
Oct 24, 2019

Conversation

manycoding
Copy link
Contributor

@manycoding manycoding commented Oct 11, 2019

Closes #131, #117

  • Add uniques arg to the main class

Rendered notebook

  1. Refactored all find_by_ into two methods:
  • the one which reads tags and used in report_all
  • API
  1. find_by now accepts list of columns and any combinations of columns. Combination means we check the equality by all the values in the given combination together, e.g. arche.rules.duplicates.find_by(df, [["url", "name"], "upc"]).show() will check that ups is unique, and all rows have unique url and name combination

  2. Main find_by message changed from

997 duplicate(s) with same upc

to

product_source_url, product_name contains 23 duplicated values
upc contains 23 duplicated values
  1. uniques is added to report_all. If schema contains any tag used in find_by_tag, it overwrites uniques
    a.report_all(uniques=[["url", "name"], "upc"])

@peonone

@manycoding manycoding requested review from andersonberg, ejulio and simoess and removed request for ejulio October 11, 2019 16:47
@codecov
Copy link

codecov bot commented Oct 11, 2019

Codecov Report

Merging #171 into master will decrease coverage by 0.21%.
The diff coverage is 80.48%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #171      +/-   ##
========================================
- Coverage   81.21%    81%   -0.22%     
========================================
  Files          24     24              
  Lines        1624   1606      -18     
  Branches      279    279              
========================================
- Hits         1319   1301      -18     
+ Misses        252    251       -1     
- Partials       53     54       +1
Impacted Files Coverage Δ
src/arche/figures/tables.py 61.9% <ø> (+3.47%) ⬆️
src/arche/quality_estimation_algorithm.py 40.9% <0%> (-1.57%) ⬇️
src/arche/data_quality_report.py 77.27% <100%> (-0.26%) ⬇️
src/arche/arche.py 85.21% <50%> (-2.56%) ⬇️
src/arche/rules/duplicates.py 97.29% <96.55%> (-2.71%) ⬇️

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 f46c40e...e2b8fea. Read the comment docs.

@manycoding manycoding merged commit 476a9dd into master Oct 24, 2019
@manycoding manycoding deleted the simpler_duplicates branch October 24, 2019 19:13
Copy link
Contributor

@simoess simoess left a comment

Choose a reason for hiding this comment

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

Looks good. It will be useful.

@@ -126,8 +101,7 @@ def generate_quality_estimation(
else:
quality_estimation = (
adherence_to_schema_percent * 40 / 100
+ duplicated_items_percent * 10 / 100
+ duplicated_skus_percent * 5 / 100
+ duplicated_items_percent * 15 / 100
Copy link
Contributor

Choose a reason for hiding this comment

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

From where these percentages come from? Why 15 percent of duplicated_items_percent?

Copy link
Contributor Author

@manycoding manycoding Oct 24, 2019

Choose a reason for hiding this comment

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

They were set 1.5 years ago based on the experience of qa team at that moment.
I set 15 because it's the sum for duplicates, to keep the compatibility for now (see #154)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicates are confusing
3 participants