Closed wolflu05 closed 1 year ago
@matmair are there any naming conventions of plugin names, repository name, sub folder, plugin slug, plugin name, plugin title, ...? What would you recommend me to name it?
@wolflu05 tbh: no. Plugins are classes so the plugin class should use camel case per pep 8. I name the main module the same as the class but that is not up to pep 8.
I should probably write a bit more about writing plugins, conventions etc. are there any other questions/things that are non obvious?
@matmair I am struggling if
@matmair There are even inconsistencies in the built in plugins naming.
Viele Köche und so
I'll fix that in a bit. Plugins are currently very much driven by the integration needs/wishes of Oliver and me, with growing usage by the userbase I think we will find more of those oddities and need to fix/clarify them.
@matmair I now choose the following naming (implemented in #20 ), is that matching the "conventions"?
setup.py
entry_points={
"inventree_plugins": [
"InvenTreeBulkPlugin = inventree_bulk_plugin.InvenTreeBulkPlugin:InvenTreeBulkPlugin"
]
},
inventree_bulk_plugin/InvenTreeBulkPlugin.py
:
TITLE = "InvenTree Bulk Plugin"
SLUG = "inventree-bulk-plugin"
NAME = "InvenTreeBulkPlugin"
I fixed some of the default names. The sample plugins are only shown when the server is in debug so I left those out
Originally posted by @eeintech in https://github.com/inventree/InvenTree/discussions/4084#discussioncomment-4470781