Add ons manager - development and bugs topic

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Add ons manager - development and bugs topic

Post by Kunda1 »

yorik wrote: Fri Oct 25, 2019 2:36 pm Fixed in git commit eb3dafb56b
:+1:
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Add ons manager - development and bugs topic

Post by Kunda1 »

Yorik, https://stackoverflow.com/a/38780917 shows how to use progress in gitpython, i bet it can be adapted to the GUI. I'm trying to use it in the Headless script https://forum.freecadweb.org/viewtopic. ... 91#p343291
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Add ons manager - development and bugs topic

Post by Kunda1 »

Python console command completion, is it possible to do when FreeCAD GUI is active?
I'll ask the question another way:How do I import python packages in to the AppImage ?

BTW, i'm able to run external python modules in the Appimage if I tell FreeCAD.AppImage -c which drops me in to python console.
Example:

Code: Select all

$ ./FreeCAD_0.19-18644-Linux-Conda_Py3Qt5_glibc2.12-x86_64.AppImage -c -M /usr/lib/python3.7/site-packages
/tmp/.mount_FreeCAdTvwWa
[FreeCAD Console mode <Use Ctrl-D (i.e. EOF) to exit.>]
>>> import readline
>>> import fancycompleter
>>> fancycompleter.interact(persist_history=True)
>>> import FreeCAD
>>> FreeCAD.<TAB press>
                        Console                 Placement               __doc__                 activeDocument          getActiveTransaction    getLogLevel             open
ActiveDocument          EndingAdd               Qt                      __loader__              addDocumentObserver     getDependentObjects     getResourceDir          openDocument
Axis                    EndingGet               Rotation                __name__                addExportType           getDocument             getUserAppDataDir       removeDocumentObserver
Base                    GuiUp                   Units                   __package__             addImportType           getExportType           getUserMacroDir         saveParameter
BoundBox                Logger                  Vector                  __path__                checkAbort              getHelpDir              isRestoring             setActiveDocument
ConfigDump              Material                Version                 __spec__                checkLinkDepth          getHomePath             listDocuments           setActiveTransaction
ConfigGet               Matrix                  __ModDirs__             __unit_test__           closeActiveTransaction  getImportType           loadFile                setLogLevel
ConfigSet               ParamGet                __cmake__               _importFromFreeCAD      closeDocument           getLinksTo              newDocument             
>>> FreeCAD.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Add ons manager - development and bugs topic

Post by looo »

Kunda1 wrote: Tue Nov 05, 2019 2:40 pm How do I import python packages in to the AppImage ?
This is not really supported. But I guess appending to sys.path is equivalent to -M option.

Trying to import readline or fancycompleter is crashing freecad-gui in my case. i guess this is somehow connflicting with the internal autocomplete mechanism.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Add ons manager - development and bugs topic

Post by Kunda1 »

looo wrote: Tue Nov 05, 2019 3:02 pm Trying to import readline or fancycompleter is crashing freecad-gui in my case. i guess this is somehow connflicting with the internal autocomplete mechanism.
Does the AppImage support internal autocomplete ?

FYI, pdbpp redraws the screen..so it wouldn't be necessarily compatible with running in freecad-gui
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Add ons manager - development and bugs topic

Post by looo »

Kunda1 wrote: Tue Nov 05, 2019 4:14 pm
looo wrote: Tue Nov 05, 2019 3:02 pm Trying to import readline or fancycompleter is crashing freecad-gui in my case. i guess this is somehow connflicting with the internal autocomplete mechanism.
Does the AppImage support internal autocomplete ?

FYI, pdbpp redraws the screen..so it wouldn't be necessarily compatible with running in freecad-gui
I meant the suggestions shown after pressing ".". I think in freecad it's called callhints.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Add ons manager - development and bugs topic

Post by Kunda1 »

looo wrote: Tue Nov 05, 2019 8:40 pm
Kunda1 wrote: Tue Nov 05, 2019 4:14 pm
looo wrote: Tue Nov 05, 2019 3:02 pm Trying to import readline or fancycompleter is crashing freecad-gui in my case. i guess this is somehow connflicting with the internal autocomplete mechanism.
Does the AppImage support internal autocomplete ?
I meant the suggestions shown after pressing ".". I think in freecad it's called callhints.
How could we integrate tab completion as well ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Add ons manager - development and bugs topic

Post by looo »

Kunda1 wrote: Wed Nov 06, 2019 4:09 pm How could we integrate tab completion as well ?
Try "ctrl-space".
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Add ons manager - development and bugs topic

Post by Kunda1 »

looo wrote: Wed Nov 06, 2019 9:26 pm
Kunda1 wrote: Wed Nov 06, 2019 4:09 pm How could we integrate tab completion as well ?
Try "ctrl-space".
Cool!
BTW, this only worked after I invoked

Code: Select all

import FreeCAD
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
zacl
Posts: 63
Joined: Wed Jul 31, 2019 1:15 pm

Re: Add ons manager - development and bugs topic

Post by zacl »

Hello,
I want to do some works on Addon Manager.

Present and near future work
  • I just pull-request a proxy improvement because I was painfully blocked behind a proxy at work :( (NTLM support is not scheduled until someone ask).
  • Now I plan to continue to devellop the Headless script of Kunda1.
Part I want to improve in the future
  • Description display of workbench (and maybe macro).

Image take time to load or never load (thank you urllib and github). It is worst behind my corporate proxy.
It is ankward to not know when a picture will be loaded and sometimes it never come :roll:

And I never managed to see a thumbnail for video in the A2plus description ( even if it seems to be a broken picture :lol:)

Code: Select all

[![A2plus - Gripper assembly](https://i9.ytimg.com/vi/QMxcQ5tssWk/mq3.jpg?sqp=CIGWo_AF&rs=AOn4CLDXtUiVBWVImLrsddeNpxLEa3M3tw)]( https://youtu.be/QMxcQ5tssWk)
So I may work on the parser to make appear a beautiful description quickly :D
I already have tried alternative strategie like mardown download -> convert to html (markdown module or github API) -> browse in QWebEngineView()
We obtain a beatifull webview and can view youtube video and surf on the web trought link... it is fast like chrome! but maybe a bit dangerous...

Ask
  • I must try to keep py2 compatibilty to ease the work of the guys who try to maintain py2 version (until next year at least)?
  • It is possible to switch from urllib to requests? I know you don't like to add module+dependancies but it is recomended and coder friendly (ssl, proxy, utf8...)
  • Is a cached local version of descriptions a good idea. Like a local database compared to web version when Addon Manager is loaded to not have to wait for the description (image!) to load... And word research throught database (or local file + word database) is easy...
  • Maco description seems a bit light. I would like to add their icon somewhere.
  • By the way, have you any will/idea/request for this module?
Post Reply