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

chore(CI): Report coverage as a PR comment #787

Merged

Conversation

rouk1
Copy link
Contributor

@rouk1 rouk1 commented Nov 21, 2024

A bot will now push(and edit) a single comment with coverage information.
Screenshot 2024-11-22 at 11 51 51

To achieve that this PR:

  • uses a market place action to generate the comment
  • to optimize action's duration coverage as been disable in the matrixed testing step
  • to optimize action's and as frontend serving test was not pertinent it has been removed
  • coverage is only run once in another task (linux | python 3.12)
  • frontend artifact related stuff have been removed

@rouk1 rouk1 linked an issue Nov 21, 2024 that may be closed by this pull request
@rouk1 rouk1 marked this pull request as draft November 21, 2024 10:00
@rouk1 rouk1 force-pushed the 361-add-a-comment-in-prs-that-prints-the-backend-coverage branch 4 times, most recently from 44890fd to 43e5880 Compare November 21, 2024 10:37
@probabl-ai probabl-ai deleted a comment from github-actions bot Nov 21, 2024
@probabl-ai probabl-ai deleted a comment from github-actions bot Nov 21, 2024
@probabl-ai probabl-ai deleted a comment from github-actions bot Nov 21, 2024
@probabl-ai probabl-ai deleted a comment from github-actions bot Nov 21, 2024
@probabl-ai probabl-ai deleted a comment from github-actions bot Nov 21, 2024
@rouk1 rouk1 force-pushed the 361-add-a-comment-in-prs-that-prints-the-backend-coverage branch from 43e5880 to 3830c25 Compare November 21, 2024 10:59
Copy link
Contributor

github-actions bot commented Nov 22, 2024

Coverage

pytest coverage report
FileStmtsMissCoverMissing
src/skore
   __init__.py180100% 
   __main__.py811 80%
   exceptions.py40100% 
src/skore/cli
   __init__.py80100% 
   cli.py320100% 
   launch_dashboard.py22120 42%
   quickstart_command.py1220 83%
src/skore/item
   __init__.py210100% 
   cross_validation_item.py11654 94%
   item.py2210 95%
   item_repository.py4221 93%
   media_item.py6041 93%
   numpy_array_item.py2111 92%
   pandas_dataframe_item.py3011 94%
   pandas_series_item.py3011 94%
   polars_dataframe_item.py2811 94%
   polars_series_item.py2311 93%
   primitive_item.py2321 91%
   sklearn_base_estimator_item.py2911 94%
   skrub_table_report_item.py1011 86%
src/skore/persistence
   __init__.py00100% 
   abstract_storage.py2210 95%
   disk_cache_storage.py2711 94%
   in_memory_storage.py200100% 
src/skore/project
   __init__.py40100% 
   create.py5080 88%
   load.py2330 89%
   project.py6322 95%
src/skore/sklearn
   __init__.py30100% 
   cross_validate.py7043 91%
   find_ml_task.py1923 85%
   types.py20100% 
src/skore/sklearn/train_test_split
   __init__.py00100% 
   train_test_split.py3411 96%
src/skore/sklearn/train_test_split/warning
   __init__.py80100% 
   high_class_imbalance_too_few_examples_warning.py1732 78%
   high_class_imbalance_warning.py1721 87%
   random_state_unset_warning.py1111 87%
   shuffle_true_warning.py901 91%
   stratify_is_set_warning.py1111 87%
   time_based_column_warning.py2212 89%
   train_test_split_warning.py510 80%
src/skore/ui
   __init__.py00100% 
   app.py2552 71%
   dependencies.py710 86%
   project_routes.py80251 59%
src/skore/utils
   __init__.py00100% 
   _show_versions.py290100% 
src/skore/view
   __init__.py00100% 
   view.py50100% 
   view_repository.py1621 83%
TOTAL115810089% 

Tests Skipped Failures Errors Time
160 0 💤 0 ❌ 0 🔥 1m 6s ⏱️

@rouk1 rouk1 marked this pull request as ready for review November 22, 2024 11:02
@augustebaum
Copy link
Contributor

Remind me, why does the coverage report include the tests directory? I also have it when I run locally

@rouk1
Copy link
Contributor Author

rouk1 commented Nov 25, 2024

Remind me, why does the coverage report include the tests directory? I also have it when I run locally

You right, this makes no sense. Hence I've added the tests folder to the omit rule of coverage.

@augustebaum augustebaum changed the title chore(CI): Coverage report as a PR comment chore(CI): Report coverage as a PR comment Nov 27, 2024
augustebaum
augustebaum previously approved these changes Nov 27, 2024
Copy link
Contributor

@augustebaum augustebaum left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@thomass-dev
Copy link
Collaborator

Please don't merge, my review is not finished.

Copy link
Collaborator

@thomass-dev thomass-dev left a comment

Choose a reason for hiding this comment

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

Strong work, thanks.

@thomass-dev thomass-dev merged commit 8221ccf into main Nov 28, 2024
14 checks passed
@thomass-dev thomass-dev deleted the 361-add-a-comment-in-prs-that-prints-the-backend-coverage branch November 28, 2024 14:09
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.

Add a comment in PRs that prints the backend coverage
3 participants