Ship WB problems and it's future in core (0.18)

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Posts: 5205
Joined: Thu Jan 05, 2017 9:03 pm

Ship WB problems and it's future in core (0.18)

Postby Kunda1 » Sat Sep 22, 2018 9:23 am

Ship is broken on both 0.17 and 0.18dev Appimages: issue #3607
It's also throwing an error for 0.17

This begs the discussion...that this WB won't likely be ported to py3 and Qt5 unless someone steps up to do it. If they don't then it will be broken for >=0.18 and so therefore we need to discuss how to handle it. Can it become an Addon (even though it has parts of it (IIRC) in C++ and needs to be compiled? Can it be split off in to a separate package?
Last edited by Kunda1 on Sat Sep 22, 2018 11:28 am, edited 1 time in total.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
looo
Posts: 2744
Joined: Mon Nov 11, 2013 5:29 pm

Re: Ship WB problems and it's future in core (0.18)

Postby looo » Sat Sep 22, 2018 9:52 am

Kunda1 wrote:
Sat Sep 22, 2018 9:23 am
Can it become an Addon (even though it has parts of it (IIRC) in C++ and needs to be compiled? Can it be split off in to a separate package?
good idea. I guess externalizing ship is not a big deal. But I guess the reported problems are more related to matpplotlib than the ship-workbench.

What are the main-devs think of externalizing ship? Does anyone have contact to the creator of the workbench?
wmayer
Site Admin
Posts: 14637
Joined: Thu Feb 19, 2009 10:32 am

Re: Ship WB problems and it's future in core (0.18)

Postby wmayer » Sat Sep 22, 2018 12:09 pm

I agree that it would be best to move Ship and Plot to the Add-ons repo. Its author Jose Luis Cercos Pita announced a few years ago that he will stop maintaining these modules and there is nobody else who does it. Also, I think the user base of these modules is very small.
looo
Posts: 2744
Joined: Mon Nov 11, 2013 5:29 pm

Re: Ship WB problems and it's future in core (0.18)

Postby looo » Sat Sep 22, 2018 12:17 pm

wmayer wrote:
Sat Sep 22, 2018 12:09 pm
I agree that it would be best to move Ship and Plot to the Add-ons repo. Its author Jose Luis Cercos Pita announced a few years ago that he will stop maintaining these modules and there is nobody else who does it. Also, I think the user base of these modules is very small.
ok I will try to externalize the workbenches. Any ideas if there is a way to reuse the commits?
wmayer
Site Admin
Posts: 14637
Joined: Thu Feb 19, 2009 10:32 am

Re: Ship WB problems and it's future in core (0.18)

Postby wmayer » Sat Sep 22, 2018 12:28 pm

Any ideas if there is a way to reuse the commits?
No idea.
traverseda
Posts: 2
Joined: Sat Sep 22, 2018 12:31 pm

Re: Ship WB problems and it's future in core (0.18)

Postby traverseda » Sat Sep 22, 2018 12:35 pm

Are you using pypi/python-packages to distribute addons? Python packages have allowed you to ship compiled code via python's "wheels" for a while now, so I don't think the add-on being partially written in cpp should be a problem.
looo
Posts: 2744
Joined: Mon Nov 11, 2013 5:29 pm

Re: Ship WB problems and it's future in core (0.18)

Postby looo » Sat Sep 22, 2018 1:08 pm

traverseda wrote:
Sat Sep 22, 2018 12:35 pm
Are you using pypi/python-packages to distribute addons? Python packages have allowed you to ship compiled code via python's "wheels" for a while now, so I don't think the add-on being partially written in cpp should be a problem.
Yes it's possible to ship compiled binaries with pip. But it's still not very useful for freecad as the linux-build-env of pip (centos5-based?) is maybe not compatible with all available FreeCAD-binaries. We can solve this problem by using conda, but this will solve packaging only for conda (there are many other package-managers, build-systems, ...) So better make addons python-only.

Anyway the ship and plot wb's are python only and therefor it should be easy to package them with pip. I have some experience in this area, so this will be a good example how to do packaging with pypi/pip the right way...
looo
Posts: 2744
Joined: Mon Nov 11, 2013 5:29 pm

Re: Ship WB problems and it's future in core (0.18)

Postby looo » Sat Sep 22, 2018 10:38 pm

first steps: https://github.com/looooo/freecad_plot

But now I have some questions:

how to create the resource-file with setup.py (calling pyside-rcc in subprocess?)
how to integrate the translation-stuff?
wmayer
Site Admin
Posts: 14637
Joined: Thu Feb 19, 2009 10:32 am

Re: Ship WB problems and it's future in core (0.18)

Postby wmayer » Sat Sep 22, 2018 10:54 pm

pyside-rcc -help wrote: PySide resource compiler
Usage: pyside-rcc [options] <inputs>

Options:
-o file Write output to file rather than stdout
-py2 Generate code for any Python v2.x version (default)
-py3 Generate code for any Python v3.x version
-name name Create an external initialization function with name
-threshold level Threshold to consider compressing files
-compress level Compress input files by level
-root path Prefix resource access path with root path
-no-compress Disable all compression
-version Display version
-help Display this information
So this should work:

Code: Select all

pyside-rcc -o Ship_rc.py resources/Ship.qrc
how to integrate the translation-stuff?
The .qm files are added to the .qrc file and thus pyside-rcc puts them all into the Ship_rc.py module.
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ship WB problems and it's future in core (0.18)

Postby NormandC » Sun Sep 23, 2018 12:42 am

wmayer wrote:
Sat Sep 22, 2018 12:09 pm
Its author Jose Luis Cercos Pita announced a few years ago that he will stop maintaining these modules
I couldn't find any mention on the forum, but he stopped being active on the forum 5 years ago. (For others interested, his account name was sanguinariojoe).

He was the second contributor (after Yorik) to see his python module merged to FreeCAD... But back then (in 2011!), it was different. For a while I've wondered why such specialized modules as Ship and Plot were in main FreeCAD, when many much popular and "mainstream" modules are add-ons.

looo wrote:
Sat Sep 22, 2018 12:17 pm
ok I will try to externalize the workbenches.
Thank you for doing this. And thanks to Kunda1 for bringing this issue to light.