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

Issue851 lock OWID coutry level vaccine data #873

Merged
merged 9 commits into from
Jul 6, 2021
Merged

Conversation

lisphilar
Copy link
Owner

Related issues

#851

What was changed

Lock "Our World In Data" vaccine dataset before calling DataLoader.vaccine() as well as "COVID-19 Data Hub" data. This was required to use local datasets at country level with VaccineData.

Not included in this pull request:

  • VaccineData parses province level data
  • Lock PCR data before calling DataLoader.pcr()

@lisphilar lisphilar added this to the Release v2.22.0 milestone Jul 6, 2021
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jul 6, 2021

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 1.06%.

Quality metrics Before After Change
Complexity 2.71 ⭐ 2.82 ⭐ 0.11 👎
Method Length 61.05 ⭐ 63.78 🙂 2.73 👎
Working memory 8.77 🙂 8.88 🙂 0.11 👎
Quality 69.80% 🙂 68.74% 🙂 -1.06% 👎
Other metrics Before After Change
Lines 1530 1556 26
Changed files Quality Before Quality After Quality Change
covsirphy/cleaning/cbase.py 68.75% 🙂 68.29% 🙂 -0.46% 👎
covsirphy/cleaning/population.py 73.41% 🙂 73.35% 🙂 -0.06% 👎
covsirphy/cleaning/vaccine_data.py 62.52% 🙂 60.72% 🙂 -1.80% 👎
covsirphy/loading/dataloader.py 71.70% 🙂 69.76% 🙂 -1.94% 👎
covsirphy/loading/db_base.py 86.33% ⭐ 85.61% ⭐ -0.72% 👎
covsirphy/loading/db_covid19dh.py 63.54% 🙂 63.21% 🙂 -0.33% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
covsirphy/loading/dataloader.py DataLoader.lock 5 ⭐ 315 ⛔ 13 😞 42.58% 😞 Try splitting into smaller methods. Extract out complex expressions
covsirphy/cleaning/vaccine_data.py VaccineData._cleaning 5 ⭐ 258 ⛔ 13 😞 44.72% 😞 Try splitting into smaller methods. Extract out complex expressions
covsirphy/cleaning/cbase.py CleaningBase._colored_map_global 6 ⭐ 215 ⛔ 11 😞 49.50% 😞 Try splitting into smaller methods. Extract out complex expressions
covsirphy/loading/dataloader.py DataLoader.read_csv 7 ⭐ 135 😞 14 😞 51.07% 🙂 Try splitting into smaller methods. Extract out complex expressions
covsirphy/loading/db_covid19dh.py _COVID19dh._download 2 ⭐ 210 ⛔ 12 😞 52.05% 🙂 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@codeclimate
Copy link

codeclimate bot commented Jul 6, 2021

Code Climate has analyzed commit 66fc1aa and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 85.7% (50% is the threshold).

This pull request will bring the total coverage in the repository to 83.0% (-0.2% change).

View more on Code Climate.

@lisphilar lisphilar merged commit 9d0a8cf into master Jul 6, 2021
@delete-merged-branch delete-merged-branch bot deleted the issue851_owid branch July 6, 2021 15:54
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.

1 participant