Addon Manager Redesign 2021

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager Redesign 2021

Post by chennes »

Yeah, the cache strategy needs a little work, right now it's an all-or-nothing update, so it's not possible to update the contents of just a single addon. It's dumb.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Addon Manager Redesign 2021

Post by easyw-fc »

I cannot disable any WB
here the error:

Code: Select all

Traceback (most recent call last):
  File "C:\FreeCAD\Mod\AddonManager\package_details.py", line 670, in disable_clicked
    self.repo.disable()
  File "C:\FreeCAD\Mod\AddonManager\Addon.py", line 524, in disable
    stopfile = os.path.join(mod_directory, self.name, "ADDON_DISABLED")
NameError: name 'mod_directory' is not defined
and FC info

Code: Select all

OS: Windows 10 Version 1909
Word size of FreeCAD: 64-bit
Version: 0.21.30305 (Git)
Build type: Release
Branch: master
Hash: 5ffc2e10b69971e2cdcd798c4deacf44d407fd77
Python 3.8.13, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager Redesign 2021

Post by chennes »

Sorry about that: should be fixed by git commit 6347f90b1532ffe8b9018f825a7bc713b2250e26
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Addon Manager Redesign 2021

Post by easyw-fc »

chennes wrote: Fri Sep 09, 2022 6:06 pm Sorry about that: should be fixed by git commit 6347f90b1532ffe8b9018f825a7bc713b2250e26
thanks for your work on the new AM :D
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Addon Manager Redesign 2021

Post by onekk »

Maybe a stupid question:

dependencies installe by a package, like gmsh for GDML WB are left over when uninstalling the package that has pulled them.

There is a way to check if there are some "not needed" external packages installed?

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager Redesign 2021

Post by chennes »

I haven’t written the code to do it, but in principle that is possible. You could basically loop over all the installed Addons and ask for their dependencies: the set you get out is the ones still needed.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Addon Manager Redesign 2021

Post by adrianinsaval »

Is it possible to install dependencies after the fact? Or to reinstall/update after an upgrade of python for example? It might also be a good idea to have the directory for those dependencies be specific to the python version since it's possible to have multiple versions installed at the same time (on windows conda builds and libpack, on Linux appimage/conda and distro package) and I think some pip packages are supposed to be specific to the version of python you are running. All of this would be nice but are low priority.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Addon Manager Redesign 2021

Post by onekk »

Hello.

I've noted today this strange behaviour:

Code: Select all

OS: Artix Linux (openbox)
Word size of FreeCAD: 64-bit
Version: 0.21.30265 (Git)
Build type: Release
Branch: master
Hash: c35244e74f326a04c5bcab31e984742db582ac78
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: Italian/Italy (it_IT)
Installed mods: 
  * Curves.backup1662281788.2751102 0.4.1
  * fcgear.backup1662281841.5151978 1.0.0
  * test_wb
  * fcgear 1.0.0
  * Curves 0.5.7
  * Help.backup1662281850.737508 1.0.3
  * Help 1.0.3

backup directory created by AddOn Manager are visualized as installed WB.

It is intended, or it is glitch in AddOn Manager?

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager Redesign 2021

Post by chennes »

Not a glitch in the Addon Manager so much as naïveté on the part of the code that lists out the Addons, which was written before the backup code was added. I'll have to adjust it so it doesn't show those. And I think the backup code is probably not aggressive enough about deleting those backups when they aren't needed anymore.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Addon Manager Redesign 2021

Post by onekk »

quote=chennes user_id=11959] ! [/quote]

Probably a silly question, but I can't find a proper answer or most probably I could not see the informations in the documentation:

a .gitmodules "stanza" that resemble like this:

Code: Select all

[submodule "WBName"]
	path = WBdirName
	url = https://github.com/...
	branch = main
submodule
will contain the "WBName" that is the name shown as a name in the AddOn Manager?


path

will make a subdir named "WBdirName" in the /Mod/ dir


url

is the url of the github repo, but with or without the .git

as example

Code: Select all

https://github.com/KeithSloan/OpenSCAD_Alt_Import
that is copied simple from the url bar of a webbrowser is good, as I find mixed writings in the .gitmodules like:

Code: Select all

[submodule "ArchTextures"]
	path = ArchTextures
	url = https://github.com/furti/FreeCAD-ArchTextures
[submodule "assembly2"]
	path = assembly2
	url = https://github.com/hamish2014/FreeCAD_assembly2.git


branch

Ok you have already explained that is the branch name on the git repo from which the AddOn Manager should "clone" the file to be put in /Mod/ dir


I have guessed correctly or something is wrong?

TIA and Regards

Carlo D.

Sorry for the multiple edits, but my sight is not good, or probably the webbrowser minimun font size is too small for my old eyes.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply