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

Prevent package finders from processing the wrapped directory #136

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

rkent
Copy link
Contributor

@rkent rkent commented Jul 25, 2024

Fixes #125

Adds a blank COLCON_IGNORE file to the wrapped directory, to prevent package finders from thinking this is a package to process, as suggested by @damien-robotsix in #125

@rkent rkent requested review from audrow and tfoote as code owners July 25, 2024 04:28
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.

I'm general we want to discourage having the content in the source, but in the workspace makes sense. So avoiding the colcon walk makes sense. One request for the code.

@@ -417,6 +417,9 @@ def build(self, *, doc_build_folder, output_staging_directory):
wrapped_sphinx_directory = os.path.abspath(
os.path.join(doc_build_folder, 'wrapped_sphinx_directory'))
os.makedirs(wrapped_sphinx_directory, exist_ok=True)
ignore_path = os.path.join(wrapped_sphinx_directory, 'COLCON_IGNORE')
with open(ignore_path, 'a'):
Copy link
Member

Choose a reason for hiding this comment

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

There's a new Path.touch option which I think is cleaner:

https://docs.python.org/3/library/pathlib.html#pathlib.Path.touch

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 iteration. lgtm

@tfoote tfoote merged commit 9dbce82 into ros-infrastructure:main Aug 1, 2024
5 checks passed
@rkent rkent deleted the ignore-wrapped-folder branch August 3, 2024 04:07
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 COLCON_IGNORE to the generated documentation?
2 participants