pypa / cibuildwheel

🎡 Build Python wheels for all the platforms with minimal configuration.

Home Page:https://cibuildwheel.pypa.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separate 'mkdocs_include_markdown_plugin' from project

mondeja opened this issue · comments

First of all, thanks for this utility, it's really useful.

Reading the documentation I've discovered the clean and concise way to include part of the README inside the Home in the documentation that this project has. It would be awesome if the plugin mkdocs_include_markdown_plugin could be separated of this project so could be installed as a PyPI library for reuse it in other projects. Do you plan this separation at some point or is it something that you are not willing to maintain?

Hey @mondeja! Thanks! It was just a workflow that made sense to me. and I can see that other projects might find it useful. But I do wonder how much work it would be to make it generally useful for a variety of projects, and I think I've got enough open source maintenance in my life at the moment! :) however, if you'd like to spin it out as a separate project and publish it on PyPI, please do.

I guess it should be reasonably easy to vendor this one file in a project? Not as clean, but a nice first solution?

If you do extract the project, do let us know, @mondeja! It might be interesting to reuse in cibuildwheel, then :-)

Perfect, thanks! I schedule it to organize the package when I have a gap and will comment on it here when it's done.

I've separated the package. You can found the project at mondeja/mkdocs-include-markdown-plugin with the documentation in the README. Can be installed with:

pip install mkdocs-include-markdown-plugin
plugins:
  - include-markdown

Let me know if you want to change something. These are the details of the implementation:

  • Released in version 0.1.0 instead of 1.0.0 of setup.py. I would plan the bumping to 1.0.0 soon if everything works.
  • Used the Apache 2.0 License included in the setup.py file of the package, using "2017-2020" as years and "Joe Rickerby and contributors" as authors.
  • Changed the name of the directive includemarkdown by include-markdown, so it's more unified with the name of the package.
  • Changed the name of the plugin in setup.py from importmarkdown to include-markdown, so it's more unified with the name of the package and the main directive.
  • Added tests and restructured modules to make testing possible (almost all the code of plugin.py has been separated to event.py).
  • Added flake8 and isort linting to the library.

I've tested in one of my projects and it works at expected.

Nice one, all sounds great!

I'm going to release the stable 1.0.0 version. Would you accept a pull to use the package in cibuildwheel documentation @joerick?

Absolutely.