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

✨ Test Documentation code snippets #3386

Merged
merged 9 commits into from
Jun 28, 2024
Merged

✨ Test Documentation code snippets #3386

merged 9 commits into from
Jun 28, 2024

Conversation

je-cook
Copy link
Contributor

@je-cook je-cook commented Jun 24, 2024

Description

This is a possible addition to our CI suite that tests all code snippets in documentation and docstrings.
The documentation tests cant be run in parallel currently because each file shares a namespace.

The choice of using Sybil needs to be discussed but so far looks promising

Interface Changes

Checklist

I confirm that I have completed the following checks:

  • Tests run locally and pass pytest tests --reactor
  • Code quality checks run locally and pass pre-commit run --from-ref develop --to-ref HEAD
  • Documentation built locally and checked sphinx-build -W documentation/source documentation/build

@je-cook je-cook added documentation Improvements or additions to documentation continuous_integration Tasks relating to the CI infrastructure and workflows tests Tasks relating to testing issues / improvements labels Jun 24, 2024
@je-cook je-cook marked this pull request as ready for review June 24, 2024 15:40
@je-cook je-cook requested review from a team as code owners June 24, 2024 15:40
.github/workflows/ci.yml Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.61%. Comparing base (2a2c8b0) to head (85be89b).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3386      +/-   ##
===========================================
+ Coverage    74.51%   74.61%   +0.10%     
===========================================
  Files          230      230              
  Lines        26813    26812       -1     
===========================================
+ Hits         19979    20007      +28     
+ Misses        6834     6805      -29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Jun 24, 2024

⚠️ Warning Report

Found 0 new warnings, 0 fixed warnings. 🎉

All warnings (5)

On runtest

  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ufl/core/expr.py:275: DeprecationWarning: Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/basix/ufl.py:1909: DeprecationWarning: Converting elements created in UFL to Basix elements is deprecated. You should create the elements directly using basix.ufl.element instead
  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ffcx/element_interface.py:23: DeprecationWarning: Use of elements created by UFL is deprecated. You should create elements directly using Basix.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ffcx/element_interface.py:26: DeprecationWarning: Converting elements created in UFL to Basix elements is deprecated. You should create the elements directly using basix.ufl.element instead

On collect

  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ufl/core/ufl_type.py:56: DeprecationWarning: attach_operators_from_hash_data deprecated, please use UFLObject instead.

Copy link

sonarcloud bot commented Jun 24, 2024

Copy link
Contributor

@oliverfunk oliverfunk left a comment

Choose a reason for hiding this comment

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

Great feature and getting the docs more up to scratch!

documentation/source/mesh/mesh.rst Show resolved Hide resolved
@je-cook je-cook merged commit 34d3743 into develop Jun 28, 2024
7 checks passed
@je-cook je-cook deleted the je-cook/doctests branch June 28, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous_integration Tasks relating to the CI infrastructure and workflows documentation Improvements or additions to documentation tests Tasks relating to testing issues / improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants