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

[Improvements] Refactor unittest folder structre #386

Merged
merged 3 commits into from
Jun 23, 2021

Conversation

Yshuo-Li
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Jun 22, 2021

Codecov Report

Merging #386 (eb506a0) into master (7f71f74) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #386      +/-   ##
==========================================
- Coverage   80.50%   80.41%   -0.10%     
==========================================
  Files         186      186              
  Lines        9936     9936              
  Branches     1450     1450              
==========================================
- Hits         7999     7990       -9     
- Misses       1744     1750       +6     
- Partials      193      196       +3     
Flag Coverage Δ
unittests 80.41% <100.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmedit/models/backbones/__init__.py 100.00% <ø> (ø)
mmedit/datasets/pipelines/matting_aug.py 94.25% <100.00%> (ø)
mmedit/models/common/generation_model_utils.py 95.19% <0.00%> (-4.81%) ⬇️
...ls/components/stylegan2/generator_discriminator.py 84.93% <0.00%> (-1.21%) ⬇️
mmedit/models/components/stylegan2/modules.py 63.92% <0.00%> (-0.49%) ⬇️

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 7f71f74...eb506a0. Read the comment docs.


import pytest

# yapf: disable
Copy link
Contributor

Choose a reason for hiding this comment

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

Can yapf be enabled?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It will conflict with isort

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes isort is a stubborn package, and it often conflicts with yapf.

As a fix, please copy the yapf config section here https://github.com/open-mmlab/mmpose/blob/202983d24665a909ae1c45f4025d66794b9e32fd/setup.cfg#L10 and try again.

Really hope there's a better alternative for isort. Before that, pls try the above method and enable yapf


# yapf: enable


def check_keys_contain(result_keys, target_keys):
Copy link
Contributor

Choose a reason for hiding this comment

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

This helper function is defined many times. Please

@innerlee
Copy link
Contributor

Good to go modulus the above two comments.

liyinshuo and others added 2 commits June 23, 2021 09:51
@innerlee innerlee merged commit 48942b2 into open-mmlab:master Jun 23, 2021
@Yshuo-Li Yshuo-Li deleted the test branch June 23, 2021 02:35
Yshuo-Li added a commit to Yshuo-Li/mmediting that referenced this pull request Jul 15, 2022
* [Improvements] Refactor unittest folder structre

* Fix

* Enable yapf

Signed-off-by: lizz <[email protected]>

Co-authored-by: liyinshuo <[email protected]>
Co-authored-by: lizz <[email protected]>
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