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

Move markup code out #108

Merged
merged 15 commits into from
Mar 19, 2023
Merged

Conversation

felixfontein
Copy link
Collaborator

Start to separate the markup formatting code from antsibull / jinja2 specific code.

I'm currently thinking of separating out a small Python package similar to https://github.com/felixfontein/antsibull-docs-ts/ that can be used by other programs to parse / format Ansible markup, so that not everyone has to reimplement everything.

@felixfontein felixfontein marked this pull request as ready for review March 18, 2023 17:08
@felixfontein felixfontein changed the title [WIP] Move markup code out Move markup code out Mar 18, 2023
@felixfontein
Copy link
Collaborator Author

I'm currently thinking of separating out a small Python package similar to https://github.com/felixfontein/antsibull-docs-ts/ that can be used by other programs to parse / format Ansible markup, so that not everyone has to reimplement everything.

@gotmax23 any thoughts about ^? I would probably call that project antsibull-docs-lib and use hatchling instead of poetry. antsibull-docs 2.0.0 can then start using it, the 1.x.y branch should probably keep using its own copy of the code.

@gotmax23
Copy link
Collaborator

What projects do you envision as consumers of antsibull-docs-lib? antsibull-docs has a lot of dependencies, so it would be nice to have a smaller library to parse ansible docs especially now that we have more complicated semantic markup.

As for the name, I want to suggest antsibull-docs-core, but I think that's become a cliche at this point. antsibull-docs-lib sounds weird to me though. antsibull-doc-parser is a bit long but it's accurate. Naming is hard.

I agree about limiting this to antsibull-docs v2.

@felixfontein
Copy link
Collaborator Author

Three other projects could use this:

  1. https://github.com/ansible-network/collection_prep (I don't think they want to implement it themselves)
  2. https://github.com/xlab-steampunk/ansible-doc-extractor (assuming they don't want to implement it by themselves)
  3. the validate-modules sanity test in ansible-core (validate-modules: add support for semantic markup ansible/ansible#80243 can be quite simplified when using this parser)

About naming: I'm currently tending to antsibull-docs-parser, it's a bit longer but I think being accurate is more important (in particular since this isn't for end-users).

@felixfontein felixfontein merged commit 12469fc into ansible-community:main Mar 19, 2023
@felixfontein felixfontein deleted the refactor branch March 19, 2023 15:16
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