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: 3876
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager Redesign 2021

Post by chennes »

Let's discuss Dev Mode here: https://forum.freecadweb.org/viewtopic.php?f=10&t=71769

(This topic is already pretty far afield from things normal users care about!)
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Addon Manager Redesign 2021

Post by GeneFC »

chennes wrote: Tue Sep 20, 2022 2:09 pm (This topic is already pretty far afield from things normal users care about!)
Not still an "announcement" at this time. :shock:

https://forum.freecadweb.org/viewtopic.php?f=9&t=38145

Gene
User avatar
mnesarco
Posts: 446
Joined: Thu Mar 26, 2020 8:52 pm

Re: Addon Manager Redesign 2021

Post by mnesarco »

chennes wrote: Fri Sep 16, 2022 3:59 am No, the Addon Manager isn't itself an Addon, so the only "update" to it is to update your FreeCAD. Can you paste in your version info?
Hi Chennes,
I think that the AddonManager can be extracted as an Addon itself. It would have advantages:

1. More collaboration PRs because more people are able to try/patch it.
2. Self update. It enables support for self upgrade of the AddonManager.
3. Custom versions, anyone can fork and have a customized version.

The main FreeCAD can have an AddonManagerLoader that looks for an installed version of the AddonManager and download the latest official version if missing. But there could be a configuration param to change the repository used to look the the addon.

Also the package.xml could have some field to mark the package as an AddonManager (special kind of addon). also there could be some compatibility field to specify versions of FreeCAD compatible with the AddonManager version.
User avatar
chennes
Veteran
Posts: 3876
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager Redesign 2021

Post by chennes »

mnesarco wrote: Tue Sep 20, 2022 6:41 pm 1. More collaboration PRs because more people are able to try/patch it.
2. Self update. It enables support for self upgrade of the AddonManager.
3. Custom versions, anyone can fork and have a customized version.
I'm not sure I buy that having it as a separate Addon would have more people collaborating on it, but you would certainly know better than me: was that your experience with your addon manager?

Certainly being able to self-update would be an advantage: in fact, I think that's the main reason the Help system was extracted to an external addon.

As for 3, already anyone who wants to can extract its code into an Addon and have their own Addon Manager -- it would be marginally easier to do if the base code were already split out, but it is a 100% Python workbench, so it's straightforward to make a new copy as an addon, and of course the licensing permits this. If you want to make a Mod as a proof-on-concept I'd say go ahead with it, and we can evaluate the process for making it dynamically (and automatically) loaded by FreeCAD once that exists.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
mnesarco
Posts: 446
Joined: Thu Mar 26, 2020 8:52 pm

Re: Addon Manager Redesign 2021

Post by mnesarco »

You are right, it is difficult to attract contributions.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Addon Manager Redesign 2021

Post by onekk »

chennes wrote: Wed Sep 21, 2022 8:05 pm ...
I'm not sure I buy that having it as a separate Addon would have more people collaborating on it,
...
Probably not more collaboration in development, but, as example, I have a conda-install and a limited horsepower machine, so recompiling FC is not a viable option.


if AddOn Manager is made an external WB, maybe with a mechanism if the "internal AddOn Manager" see that a "AddOn Manager installed Addon Manager" (very ugly wording) :D it pass the control to the external one.

Or maybe, if you make a zipped contained of the "AddOn Manager" so one "advanced user" could delete the proper directory and replace it with the zipped copy, (I have done something similar when helping to test some Path WB scripting problems), it will be more easy and quick to test changes.

Side note: @GeneFC is complaining about the position of this thread, so it will not a better move to lock this thread and point to the developer corner or maybe making two "Addon Manager" thread, on in the "Help forum" and another in "developer"?

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
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Addon Manager Redesign 2021

Post by adrianinsaval »

if the addon manager is all python and doesn't require files generated at compile time you could simply copy the addon directory from https://github.com/FreeCAD/FreeCAD/tree ... donManager into your user Mod directory and FreeCAD should prefer that over the system version.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Addon Manager Redesign 2021

Post by onekk »

adrianinsaval wrote: Mon Sep 26, 2022 5:58 am ...
Thanks.

Yes it is another way, I have not thought.

But this means that I had to have a source tree on disk, or it is possible to clone say only :

https://github.com/FreeCAD/FreeCAD/tree ... donManager

to disk?

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
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Addon Manager Redesign 2021

Post by adrianinsaval »

not that I know of, you can always download a zip, extract just that directory and remove the zip if you don't want to keep a clone of the source in your disk, a full clone is massive so that's understandable, you could do a shallow clone but you would still have a lot of extra stuff. If you don't mind having a clone of the repo (even if it's shallow) you can then symlink only the addon manager directory into your Mod directory then to update the addon manager you just need to make a git pull in the repo. That's not to say that it wouldn't be a good idea to have the addon manager as an actual addon but it's a workaround if you want to test changes to it without compiling/waiting for an updated package.
I haven't actually tested this so perhaps it isn't as smooth as I make it out to be :)
User avatar
mnesarco
Posts: 446
Joined: Thu Mar 26, 2020 8:52 pm

Re: Addon Manager Redesign 2021

Post by mnesarco »

If the user's Mod copy has precedence over builtin Mod, it is very easy to support self upgrade indeed:

1. Extract AddonManager to its own git repo.
2. Include it back into FreeCAD main repo as a git submodule.
3. Include it also as a git submodule in FreeCAD-Addons.

This way, the AddonManager can install new versions of the AddonManager.
Post Reply