Forum

Author Topic: [Request] Proper Python Documentation  (Read 2206 times)

marcel.d

  • Newbie
  • *
  • Posts: 22
    • View Profile
[Request] Proper Python Documentation
« on: February 14, 2024, 06:34:45 PM »
Dear Agisoft,

Thank you for the powerful Python API.

While the API itself is great, its documentation is not usable.

Finding anything in the PDF document with over 200 pages is super slow and only feasible when you already know the function name.
This issue (along with other vital points)  has already been raised in 2022 (https://www.agisoft.com/forum/index.php?topic=14910), but the problem has not been fixed yet.
There are better formats for documentation (e.g. https://numpy.org/doc/stable/reference/index.html), why do we get stuck with a PDF?
PDFs are nice for paper-printing, but that is not how most of us use software documentation.

Furthermore, writing code in any IDE but PyCharm or a notebook is like not using an IDE at all, because code completion, linting and checking do not work.

Again, thanks for the great API and please advise when we can expect its documentation to be at the same level.

Cheers,
Marcel

PS Here is what I mean with linting not working in e.g. VSCode:

« Last Edit: February 14, 2024, 06:47:06 PM by marcel.d »

specyfick

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: [Request] Proper Python Documentation
« Reply #1 on: February 26, 2024, 12:54:45 AM »
Install standalone metashape whl file in your python using Visual Studio Code Console.
Restart Commuter.
For me is working.
There is also the same function in terminal in the Metashape App.

Look on my attachment here

marcel.d

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [Request] Proper Python Documentation
« Reply #2 on: May 21, 2024, 12:58:10 PM »
Hi specyfick,

Thank you for your reply and sorry that I am getting back to you only now.

I find it really interesting that this works for you and am rather confused as to why it does not work for me.

Here is what I did in the VSCode Terminal from inside the virtual environment that I use with Metashape:

Code: [Select]
python -m pip uninstall Metashape
python -m pip install PATH/TO/Metashape-2.0.2-cp37.cp38.cp39.cp310.cp311-none-win_amd64.whl

Nothing changed for me. Maybe I missed some detail?

When you say "Visual Studio Code Console", you do mean the integrated Terminal, right?


PolarNick

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: [Request] Proper Python Documentation
« Reply #3 on: May 21, 2024, 01:46:28 PM »
Hi marcel.d,

support for autocompletion in VSCode was improved in Metashape 2.1 python wheel release, so you probably just need to update.

marcel.d

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [Request] Proper Python Documentation
« Reply #4 on: May 21, 2024, 02:27:40 PM »
Thank you, PolarNick!

I confirm that after installing the latest python wheel (Metashape 2.1.1), all the functionality I was asking about is indeed there. Writing code for Metashape just became a lot more fun.

Thank you, Agisoft Team!