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

Configure pytest to run on staging by default + flags in config #1093

Merged
merged 4 commits into from
Sep 30, 2022

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Sep 29, 2022

This PR updates pytest configuration:

  • HUGGINGFACE_CO_STAGING=1 is now automagic 🎉 (using pytest-env)
  • -sv --log-cli-level=INFO is set by default
  • use --durations=0 to measure and print execution time of each test (I am curious to know where we can improve)

Basically it guarantees that local tests are run the same way as CI tests:

# no more flags !
pytest tests

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 29, 2022

The documentation is not available anymore as the PR was closed or merged.

@codecov
Copy link

codecov bot commented Sep 30, 2022

Codecov Report

Base: 78.48% // Head: 84.84% // Increases project coverage by +6.36% 🎉

Coverage data is based on head (771f830) compared to base (e28646c).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1093      +/-   ##
==========================================
+ Coverage   78.48%   84.84%   +6.36%     
==========================================
  Files          38       38              
  Lines        3913     3913              
==========================================
+ Hits         3071     3320     +249     
+ Misses        842      593     -249     
Impacted Files Coverage Δ
src/huggingface_hub/repository.py 79.72% <0.00%> (+0.51%) ⬆️
src/huggingface_hub/hf_api.py 87.35% <0.00%> (+0.52%) ⬆️
src/huggingface_hub/_snapshot_download.py 96.00% <0.00%> (+2.00%) ⬆️
src/huggingface_hub/utils/_runtime.py 94.54% <0.00%> (+7.27%) ⬆️
src/huggingface_hub/fastai_utils.py 81.37% <0.00%> (+53.92%) ⬆️
src/huggingface_hub/hub_mixin.py 86.23% <0.00%> (+58.71%) ⬆️
src/huggingface_hub/keras_mixin.py 90.41% <0.00%> (+70.65%) ⬆️

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.

@Wauplin Wauplin changed the title [WIP] testing some stuff in the tests Configure pytest to run on staging by default + flags in config Sep 30, 2022
@Wauplin Wauplin marked this pull request as ready for review September 30, 2022 07:20
@osanseviero
Copy link
Member

Very nice Quality of Life improvement for developing!

@Wauplin
Copy link
Contributor Author

Wauplin commented Sep 30, 2022

Very nice Quality of Life improvement for developing!

Exactly what I thought when googling for a solution 😄

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

This is a very welcome change, thank you @Wauplin

@Wauplin Wauplin merged commit af1d49e into main Sep 30, 2022
@Wauplin Wauplin deleted the try-to-speed-up-tests branch September 30, 2022 16:01
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.

None yet

4 participants