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

Python API reference #77

Open
ericpre opened this issue Jul 13, 2023 · 3 comments
Open

Python API reference #77

ericpre opened this issue Jul 13, 2023 · 3 comments

Comments

@ericpre
Copy link
Contributor

ericpre commented Jul 13, 2023

I couldn't find the python API reference in the documentation, did I miss it? This would be very useful to write python plugins (schema/parser), because at the moment, to know what class, argument can/should be used, I need to find relevant examples in the documentation, tutorial or existing plugins/parsers and this is tedious.

By the way, the python schema plugin capability is great, this is much more convenient to use than the yaml schema! :)

@lauri-codes
Copy link
Contributor

Hi @ericpre!

You are right that our python API is not included in the documentation. Currently, the best way to understand the call signatures of functions is to explore the codebase with an IDE such as VSCode.

In principle, it should be easy to autogenerate such reference, but I think we are unsure how helpful this will be. Maybe we should at least document the core python API, so that it could be linked together with the how-to-guides..?

@ericpre
Copy link
Contributor Author

ericpre commented Jul 18, 2023

What I am after is an overview of the classes expected to be used by plugins, how they related to each other and how they can used by plugins. There is already some narrative documentation but I suspect that if it were links to the API reference, it would much easier to get deeper understanding by navigating easily to the docstring when necessary.
I find that a html version of the API is particularly useful to get familiar with the API because it is easier to navigate with the links, etc. and it give a good overview of the structure.
Using docstrings from an IDE works and works well when you are looking for specific piece of information and you know where to look for it but it is tedious to use when not familiar with the API.

I don't know what is the core python API but I would happy with anything expected to be used by plugins! :)

@lauri-codes
Copy link
Contributor

lauri-codes commented Jul 18, 2023

Ok, I see. I think one of the most important things to understand when writing plugins is the classes used to construct the schema. E.g. what are the classes that represent sections and quantities etc. This at least could be valuable to document.

I will try to see what I can do about this, and how I could connect this to our plugin how-to-guides.

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

No branches or pull requests

2 participants