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

small IO and biology fixes #33

Merged
merged 3 commits into from
Feb 9, 2023
Merged

small IO and biology fixes #33

merged 3 commits into from
Feb 9, 2023

Conversation

Thomzoy
Copy link
Collaborator

@Thomzoy Thomzoy commented Feb 8, 2023

3 small fixes:

Saving tables locally

In spark client or cluster mode, saving a table as parquet won't work because of permission error: executors and driver aren't the same user.

How its solved:

Tables are first collected, and then saved locally by the driver only.

Incorrect timestamp error

When collecting tables, pyarrow throws an error when stumbling upon incorrect timestamps (smaller than pd.Timestamp.min or bigger than pd.Timestamp.max).

How it's solved

A filtering is done in HiveData, which remplace incorrect timestamps

Biology configuration file

When creating a configuration file via create_config_from_stats, one row per code AND care site is created, along with a line aggregating all care sites. We only want to keep this row (identified by df.care_site_short_name == "ALL")

How it's solved

Filtering, when necessary, on the care_site_short_name column

  • If this PR is a bug fix, the bug is documented in the test suite.
  • Changes were documented in the changelog (pending section).
  • If necessary, changes were made to the documentation (eg new pipeline).

@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2023

Codecov Report

Base: 91.89% // Head: 91.92% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (bd30bca) compared to base (e29f4a5).
Patch coverage: 91.30% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
+ Coverage   91.89%   91.92%   +0.02%     
==========================================
  Files          66       67       +1     
  Lines        2123     2143      +20     
==========================================
+ Hits         1951     1970      +19     
- Misses        172      173       +1     
Impacted Files Coverage Δ
eds_scikit/io/i2b2_mapping.py 12.65% <0.00%> (ø)
eds_scikit/utils/custom_implem/custom_implem.py 87.50% <87.50%> (ø)
eds_scikit/event/consultations.py 98.36% <100.00%> (+0.08%) ⬆️
eds_scikit/io/data_quality.py 100.00% <100.00%> (ø)
eds_scikit/io/hive.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Thomzoy Thomzoy changed the title fix: saving DF locally in client mode small IO and biology fixes Feb 8, 2023
Copy link
Collaborator

@Vincent-Maladiere Vincent-Maladiere left a comment

Choose a reason for hiding this comment

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

LGTM!

@Thomzoy Thomzoy merged commit af2a40f into main Feb 9, 2023
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.

3 participants