pyinfra icon indicating copy to clipboard operation
pyinfra copied to clipboard

Add documentation on extending

Open goetzk opened this issue 9 months ago • 1 comments

While working on my custom stuff I gathered up my notes (and will likely gather more). I haven't worked with custom facts or operations yet so haven't put anything in those sections but if I do (eg for #1288) I'd be able to expand this further.

@Fizzadar Would this sort of information be useful if I rounded out the page created in this commit? Would you like the information, but rather it was placed somewhere else in the documentation?

goetzk avatar Feb 24 '25 02:02 goetzk

I need to think about where this fits in, there's a lot of overlap with the contributing doc: https://docs.pyinfra.com/en/3.x/contributing.html, might be best to expand there?

There is definitely overlap and I'm really not sure of the best angle to approach. The perspective I took with this PR was "What did I need to know/do in order to create an installable custom connector package", and left stub bits in to explain how (eg) custom libraries and facts could be added to that same installable package.

Perhaps what really drives this PR is 'how can custom pyinfra bits be made easily distributable'. If thats a question you want answered in the documentation it would lead to a restructuring of what I've done along these lines:

  • docs/extending.rst retitled something like 'packaging custom code'
  • custom libraries, custom facts, custom connectors, tests sections all removed from the page
  • exceptions section moved elsewhere? unsure
  • debugging section moved elsewhere?

Then I imagine writing operations/facts/connectors would all have a footnote added saying 'look at packaging plugins section for information on making your code distributable'

goetzk avatar Mar 27 '25 22:03 goetzk