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

Faster docs extraction #197

Merged
merged 11 commits into from
Nov 3, 2020

Conversation

felixfontein
Copy link
Collaborator

Uses a script to efficiently extract documentation. For my local set of collections, antsibull-docs current --dest-dir ... finishes in 25 seconds (!).

@felixfontein felixfontein changed the title [WIP] Faster docs extraction II Faster docs extraction Oct 2, 2020
venv_python = venv.get_command('python')

with tempfile.NamedTemporaryFile() as tmp_file:
tmp_file.write(get_antsibull_data('collection-enum.py'))
Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking we should have this run in-process instead of being a separate, internal script. Is that something we can do? Is the dependence on ansible-base code the reason it was easier to write this as a separate script at first?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For the stable subcommand, we really must run it in the venv, otherwise it does not necessarily have access to the correct ansible-base version. (For the current subcommand it doesn't matter.)

@felixfontein
Copy link
Collaborator Author

This includes the changes from #206 that don't modify the output. It also contains one commit which repliaces ansible/ansible#72359's behavior for the new extraction backend.

@abadger abadger merged commit edee741 into ansible-community:main Nov 3, 2020
@abadger
Copy link
Contributor

abadger commented Nov 3, 2020

Thanks felixfontein! This will be very appreciated by everyone :-)

@felixfontein felixfontein deleted the faster-ansible-doc-2 branch November 3, 2020 15:56
@felixfontein
Copy link
Collaborator Author

@abadger thanks again for reviewing! :)

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