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

new: _LoaderBase.collect() #855

Merged
merged 3 commits into from
Jun 26, 2021
Merged

new: _LoaderBase.collect() #855

merged 3 commits into from
Jun 26, 2021

Conversation

lisphilar
Copy link
Owner

Related issues

#851 and #853

What was changed

Close #853.
.collect() method was added to _LoaderBase class, which is the parent class of DataLoader. _LoaderBase will be also used as the parent class of LocalDataLoader class, which will be implemented for #851.

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

sourcery-ai bot commented Jun 26, 2021

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 3.82%.

Quality metrics Before After Change
Complexity 1.99 ⭐ 1.55 ⭐ -0.44 👍
Method Length 38.12 ⭐ 39.15 ⭐ 1.03 👎
Working memory 6.43 🙂 5.89 ⭐ -0.54 👍
Quality 70.60% 🙂 74.42% 🙂 3.82% 👍
Other metrics Before After Change
Lines 191 231 40
Changed files Quality Before Quality After Quality Change
covsirphy/loading/loaderbase.py 100.00% ⭐ 99.80% ⭐ -0.20% 👎
example/scenario_analysis.py 54.12% 🙂 54.34% 🙂 0.22% 👍
tests/test_loading.py 82.38% ⭐ 84.34% ⭐ 1.96% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
example/scenario_analysis.py main 4 ⭐ 376 ⛔ 9 🙂 49.48% 😞 Try splitting into smaller methods
tests/test_loading.py TestDataLoader.test_dataloader 0 ⭐ 83 🙂 10 😞 71.41% 🙂 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 Jun 26, 2021

Code Climate has analyzed commit 83189d8 and detected 0 issues on this pull request.

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

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

View more on Code Climate.

@lisphilar lisphilar merged commit 5e92641 into master Jun 26, 2021
@delete-merged-branch delete-merged-branch bot deleted the issue853 branch June 26, 2021 13:56
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.

[New] DataLoader.collect() to collect all datasets for scenario analysis
1 participant