Help from Workbench Authors Needed
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Help from Workbench Authors Needed
We've now merged a new metadata standard into the main development branch, and I've just submitted a PR for an update to the Addon Manager that adds support for that metadata (https://github.com/FreeCAD/FreeCAD/pull/5131). I'd love for a few particularly daring workbench authors to try adding that metadata file to their workbench's git repository.
The standard was designed with backwards-compatibility in mind, so you won't need to make any changes to your workbench, just add the package.xml file (and potentially an icon file, if you don't already have one in your repo someplace). You can check out @Chris_G's Curves workbench for an example. What I'm particularly interested in is whether the documentation on the wiki is adequate, and makes sense, and if you run into anything in the standard that doesn't make sense or you think needs to change. Also, any suggestions you have for how to best change the Addon Manager to work with this new unified metadata (e.g. how to display and search the tags, etc.)
Thanks!
P.S. I haven't yet got the FreeCAD internals working with macros distributed like this, so this is just for workbenches and preference packs at the moment. Macros should be working in a few more days.
The standard was designed with backwards-compatibility in mind, so you won't need to make any changes to your workbench, just add the package.xml file (and potentially an icon file, if you don't already have one in your repo someplace). You can check out @Chris_G's Curves workbench for an example. What I'm particularly interested in is whether the documentation on the wiki is adequate, and makes sense, and if you run into anything in the standard that doesn't make sense or you think needs to change. Also, any suggestions you have for how to best change the Addon Manager to work with this new unified metadata (e.g. how to display and search the tags, etc.)
Thanks!
P.S. I haven't yet got the FreeCAD internals working with macros distributed like this, so this is just for workbenches and preference packs at the moment. Macros should be working in a few more days.
Re: Help from Workbench Authors Needed
At one time it could be cool to have a graphical generator/editor for the metadata file.
I look at Curves WB example and I'm surprised that nowhere in the file it is made clear that the file is intended for FreeCAD use. I think it could be good to encourage (even enforce) to use a defined namespace. Something like xmlns="http://freecad.org/metadata"
I look at Curves WB example and I'm surprised that nowhere in the file it is made clear that the file is intended for FreeCAD use. I think it could be good to encourage (even enforce) to use a defined namespace. Something like xmlns="http://freecad.org/metadata"
Re: Help from Workbench Authors Needed
That's an excellent idea -- are you thinking of it for the package element:
Code: Select all
<package xmlns="http://freecad.org/metadata">
Re: Help from Workbench Authors Needed
Exactly.chennes wrote: ↑Wed Oct 27, 2021 9:22 pm That's an excellent idea -- are you thinking of it for the package element:??Code: Select all
<package xmlns="http://freecad.org/metadata">
I think it's good to have it because both a "reader" knows the file is intended for FreeCAD, and FreeCAD can be sure that the file is intended for it.
One thing I can't be totally sure reading the doc : can a metadata file contain several <package> blocks?
Re: Help from Workbench Authors Needed
No: one package per package.xml file.
Re: Help from Workbench Authors Needed
While I think this is a good idea in general, I consider "http://freecad.org/metadata" a bit too generic. I'd suggest "https://freecad.org/package-metadata/2021". Or do we have any other XML namespace names in FreeCAD already, which template we could follow? Document.xml in *.FCStd doesn't seem to have a namespace...openBrain wrote: ↑Wed Oct 27, 2021 9:10 pm I think it could be good to encourage (even enforce) to use a defined namespace. Something like xmlns="http://freecad.org/metadata"
For some rationals please see also §3 of https://google.github.io/styleguide/xmlstyle.html
Re: Help from Workbench Authors Needed
Well, TechDraw's symbols actually use their description wiki page as their namespace, so we could use "https://wiki.freecad.org/Package_Metadata"
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Help from Workbench Authors Needed
I added package.xml to ThreadProfile, DynamicData, and MeshRemodel. Let me know if anything in any of them needs fixing.
Re: Help from Workbench Authors Needed
Thanks! The path to your icons includes an extra component: you have, e.g.
Code: Select all
<icon>DynamicData/Resources/icons/DynamicDataLogo.svg</icon>
Code: Select all
<icon>Resources/icons/DynamicDataLogo.svg</icon>