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

Run sphinx-build as a module, ensures pipx compatibility #99

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

rkent
Copy link
Contributor

@rkent rkent commented Apr 13, 2024

This PR, a followup to PR #95, changes calling sphinx-build from a subprocess to a module. I claim this is useful regardless of any long-term plan of ros2 to recommend use of pipx, as spawning a new subprocess is probably more time consuming than simply running a python module, and we are not really using the subprocess for parallel processing in any way.

But yes this does ensure pipx compatibility, as demonstrated by the included extra testing.

Pragmatically though I'd like to land this now because it is top-of-mind at the moment, and if we revisit in a few months I'd have to figure this out again. I don't see any downside to this.

@rkent rkent requested review from audrow and tfoote as code owners April 13, 2024 16:48
Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

Running it as a module will make it easier to debug/track etc as well as faster as you mention w/o invoking the additional interpreter startup time too. And we're not using any benefits of parallelism or memory isolation so this looks good to me.

Knowing that the pipx approach sill works too is reasonable for us to keep, but I think that it would be better as a parallel test instead of just being inline here.

- name: Install apt dependencies
run: apt update && apt install -y doxygen graphviz

- name: Smoke test of pipx install
Copy link
Member

Choose a reason for hiding this comment

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

Can we drop this into a separate test to keep it clear that it's a separable test. It will run in parallel and get a separate report then too.

@rkent rkent requested a review from tfoote April 14, 2024 23:03
Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

Thanks for making the pipx test separate. Please remove the copy from the Unit Tests so we don't run it twice.

@rkent
Copy link
Contributor Author

rkent commented Apr 16, 2024

Oops, sorry about that. I'll fix it.

Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

Thanks for the revisions. lgtm

@tfoote tfoote merged commit 1de6556 into ros-infrastructure:main Apr 17, 2024
4 checks passed
@tfoote
Copy link
Member

tfoote commented Apr 17, 2024

I'm not sure what happened here. This fails CI when running on main:

https://github.com/ros-infrastructure/rosdoc2/actions/runs/8726584290

@tfoote tfoote mentioned this pull request Apr 17, 2024
@rkent rkent deleted the sphinx-as-module branch April 18, 2024 16:53
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