eclipse-thingweb / td-tools

Tooling for Thing Descriptions and Thing Models
https://thingweb.io
Other
3 stars 3 forks source link

feat: add AAS AID tooling #7

Closed danielpeintner closed 2 months ago

danielpeintner commented 3 months ago

I took over AID code from node-wot td-tools.

What is working:

TODOs/ To be decided

egekorkan commented 3 months ago

We had a quick look and I think we should not have the eslint and prettier in each tool folder. There are root configs available and seem similar.

danielpeintner commented 3 months ago

We had a quick look and I think we should not have the eslint and prettier in each tool folder. There are root configs available and seem similar.

Makes sense. I didn't even look at the root level. Anyhow, I noticed some shortcoming w.r.t. to the current setup.

Hence, I opened a dedicated issue for it (see https://github.com/eclipse-thingweb/td-tools/issues/8)

BTW, the PR is now ready for review! There are still todos like renaming etc

egekorkan commented 3 months ago

We have discussed in the call:

danielpeintner commented 2 months ago

The PR is now ready for review. As discussed there are now two public methods only

danielpeintner commented 2 months ago

@sebastiankb @Kaz040 are the revised public method names (see https://github.com/eclipse-thingweb/td-tools/pull/7#issuecomment-2045585034) fine by you?

Kaz040 commented 2 months ago

@sebastiankb @Kaz040 are the revised public method names (see #7 (comment)) fine by you?

@danielpeintner , The names are ok for me.

sebastiankb commented 2 months ago

its perfect for me. ready for merge

danielpeintner commented 2 months ago

FYI: aas-aid package available on NPM (see https://www.npmjs.com/package/@thingweb/aas-aid)

mrtnzagustin commented 1 month ago

Guys, sorry for adding a comment here but I am not able to use/reach the transformTD2AAS function. Do you have any example of how to use it? is it already implemented?

danielpeintner commented 1 month ago

An example is given in the NPM readme of or can be found also at the new home.

Note: the naming of the functions has been slightly changed (e.g., transformAID2TD(...) or transformTD2AID(...)).

mrtnzagustin commented 1 month ago

Those two are working fine, but the one that generates the AASX (transformTD2AAS) format is missed. image

image

mrtnzagustin commented 1 month ago

Mmmm I saw this comment: "transformTD2AID(td: string, options?: Options, protocols?: string[]): string -> by default AID submodel is created but an option createAAS can be passed to get a full AAS"

Do I need to use the createAAS parameter? We may need to update the documentation to reflect that approach.

danielpeintner commented 1 month ago

Mmmm I saw this comment: "transformTD2AID(td: string, options?: Options, protocols?: string[]): string -> by default AID submodel is created but an option createAAS can be passed to get a full AAS"

Do I need to use the createAAS parameter? We may need to update the documentation to reflect that approach.

Yes, correct. As mentioned in the example https://github.com/eclipse-thingweb/td-tools/blob/ee21893c6595d9e458cc28820e1e913c61e064a5/node/aas-aid/README.md?plain=1#L93

Do you think we should improve the documentation? Please feel free to provide a PR to https://github.com/eclipse-thingweb/td-tools/blob/main/node/aas-aid/README.md