install two workbenches in parallel

Having trouble installing or compiling FreeCAD? Get help here.
Post Reply
User avatar
bernd
Posts: 9823
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

install two workbenches in parallel

Post by bernd » Wed Mar 11, 2020 11:27 am

Is it somehow possible to install a workbench from AddOn manager to do the daily work with and in parallel the same workbench to do some development.
User avatar
looo
Posts: 3295
Joined: Mon Nov 11, 2013 5:29 pm

Re: install two workbenches in parallel

Post by looo » Wed Mar 11, 2020 11:56 am

Virtual environments are the python solution for this problem. If you provide the workbench as a python package you can install different versions of the workbench in different environments.

I do this a lot. Lots of testing environments:
freecad_0.18_py3.7
freecad_0.19_py3.8_boost1.70
freecad_0.19_py3.8_boost1.72

And I installed openglider workbench 0.3 in one environment and development version in another.

Having multiple versions of the same package in one environment is always a mess (py2/py3, qt4/qt5). So I guess you will run into similar difficulties installing two different versions of a workbench into the same environment.
vocx
Posts: 3962
Joined: Thu Oct 18, 2018 9:18 pm

Re: install two workbenches in parallel

Post by vocx » Wed Mar 11, 2020 4:34 pm

bernd wrote:
Wed Mar 11, 2020 11:27 am
Is it somehow possible to install a workbench from AddOn manager to do the daily work with and in parallel the same workbench to do some development.
I think you can do that but you would have to rename the workbench so that there is no name collision.

This is why the new-style workbenches that looo proposes are a good idea, because if you have the workbench called freecad.my_workbench, you can easily create a second one called freecad.my_workbench_dev. You just have to fix the top level imports to get the correct modules for the commands that your development workbench needs.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
User avatar
sgrogan
Posts: 5800
Joined: Wed Oct 22, 2014 5:02 pm

Re: install two workbenches in parallel

Post by sgrogan » Wed Mar 11, 2020 4:58 pm

bernd wrote:
Wed Mar 11, 2020 11:27 am
Is it somehow possible to install a workbench from AddOn manager to do the daily work with and in parallel the same workbench to do some development.
If Addon manager is using gitpython the addon is a git repo.
Something like this should work if the BOLTSFC boltsfc-dev branch exists (haven't figured out how to create this with gitpython)

Code: Select all

import BOLTS
import git
repo = git.Repo(FreeCAD.getUserAppDataDir()+'/Mod/BOLTSFC')
repo.active_branch
repo.git.checkout('boltsfc-dev')
repo.active_branch
import importlib
importlib.reload(BOLTS)
Edited with more relevant example
User avatar
bernd
Posts: 9823
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: install two workbenches in parallel

Post by bernd » Wed Mar 18, 2020 10:57 pm

thanks guys ...

@sgrogan:
similar workflow, but with standard git is what I have been done already. Works great but is cumbersome.

@voxc:
this is what I had in mind, but for this I have to turn BOLTS in a new style wb, which I have not finished ...

@looo:
seams the smartest solution. These environments seams like git. They are like a beast, you do not want it but if you have domesticated it you will never give it away. I am still at the I do not want it (may be I just do not wand to spent the time to get into it.) Quite German like English ... :oops:

Anyway it seams I have to turn BOLTS in a real new style workbench ...

cheers bernd
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests