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

feat: add documentation build environment to tox.ini #2015

Merged
merged 6 commits into from
Jan 15, 2025

Conversation

moe-ad
Copy link
Contributor

@moe-ad moe-ad commented Jan 14, 2025

As the title states. This closes #2011.

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.45%. Comparing base (c95bb99) to head (238d405).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2015      +/-   ##
==========================================
- Coverage   88.50%   88.45%   -0.06%     
==========================================
  Files          90       90              
  Lines       10269    10269              
==========================================
- Hits         9089     9083       -6     
- Misses       1180     1186       +6     

tox.ini Outdated Show resolved Hide resolved
Copy link
Member

@jorgepiloto jorgepiloto left a comment

Choose a reason for hiding this comment

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

Suggesting to implement a clean and links environment.

Copy link
Member

@jorgepiloto jorgepiloto left a comment

Choose a reason for hiding this comment

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

Awesome, @moe-ad. Would it be possible to have the commands_post at [testenv] level? That would apply it for every environment, right?

@moe-ad moe-ad marked this pull request as ready for review January 15, 2025 14:10
@moe-ad
Copy link
Contributor Author

moe-ad commented Jan 15, 2025

@jorgepiloto Yes, indeed, that is possible at the [testenv] level. It will affect all environments and in environments where the commands are not needed, we can override command_pre/post to do nothing in those.

One problem is when you want to run some environments in parallel, the nature of what we are doing in commands_pre/post for PyDPF means that environments that finish executing earlier will try to kill the processes of currently running environments.

Another problem even in a sequential run is this:

  • This workflow is not possible: commands_pre -> test_a -> test_b -> commands_post
  • What will instead happen is: commands_pre -> test_a -> commands_post -> commands_pre -> test_b -> commands_post

And the first workflow is desired in the case of PyDPF.

@jorgepiloto
Copy link
Member

Thanks for the detailed explanation, @moe-ad. Then, feel free to merge when ready.

@moe-ad moe-ad merged commit 404befa into master Jan 15, 2025
69 checks passed
@moe-ad moe-ad deleted the feat/add-docbuild-tox-environment branch January 15, 2025 15:29
@moe-ad moe-ad self-assigned this Jan 15, 2025
@PProfizi PProfizi added this to the 0.13.4 milestone Jan 20, 2025
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 doc build environment to tox.ini
3 participants