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

Ingest intl csvs #83

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Ingest intl csvs #83

wants to merge 16 commits into from

Conversation

lgarvey
Copy link
Member

@lgarvey lgarvey commented Nov 20, 2020

No description provided.

@codecov
Copy link

codecov bot commented Dec 8, 2020

Codecov Report

Merging #83 (91135b5) into master (3bd3b4d) will increase coverage by 94.05%.
The diff coverage is 88.32%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #83       +/-   ##
===========================================
+ Coverage        0   94.05%   +94.05%     
===========================================
  Files           0       92       +92     
  Lines           0     2929     +2929     
  Branches        0      198      +198     
===========================================
+ Hits            0     2755     +2755     
- Misses          0      150      +150     
- Partials        0       24       +24     
Impacted Files Coverage Δ
api/tests/test_views.py 100.00% <ø> (ø)
company/migrations/0011_auto_20200312_1720.py 100.00% <ø> (ø)
dnb_worldbase/constants.py 100.00% <ø> (ø)
dnb_worldbase/tests/test_mapping.py 100.00% <ø> (ø)
dnb_worldbase/ingest.py 61.05% <33.96%> (ø)
dnb_worldbase/tests/test_ingest.py 88.88% <92.85%> (ø)
company/constants.py 100.00% <100.00%> (ø)
company/migrations/0019_add_company_indices.py 100.00% <100.00%> (ø)
company/migrations/0020_auto_20201208_1235.py 100.00% <100.00%> (ø)
company/models.py 95.95% <100.00%> (ø)
... and 95 more

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 3bd3b4d...91135b5. Read the comment docs.

Copy link

@oisinmulvihill oisinmulvihill left a comment

Choose a reason for hiding this comment

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

generally looks ok. I have a two questions below.


except(KeyboardInterrupt, SystemExit):
raise

except BaseException as ex:

Choose a reason for hiding this comment

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

Is this no just Exception as ex instead of BaseException as ex to catch all?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, baseexcept is superfluous here. Will change it.

with open(file_path, 'rt', encoding='iso-8859-1') as wb_file:
stats = process_csv_data(csv_class(wb_file), creation_date)

return stats

Choose a reason for hiding this comment

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

Could you add test(s) to cover more of the ingest.py?

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, will do this.

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.

2 participants