Hi Tim,

thanks for providing the links.
I added a short description for Java in [1]. Maybe we can use this as the 
central place for best practices. You are welcome to change and customize 
anything.

I will also add a similar description for Typescript & Angular.


[1] https://cwiki.apache.org/confluence/display/STREAMPIPES/Code+Style+-+Java

…………………………………………………
Philipp Zehnder

Bytefabrik.AI GmbH
Haid-und-Neu-Str. 10–14
76131 Karlsruhe
Tel.: +49 721 9654-805

[email protected]
www.bytefabrik.ai <https://www.bytefabrik.ai/> | 
www.twitter.com/bytefabrik<https://www.bytefabrik.ai/>

…………………………………………………
Bytefabrik.AI GmbH
Sitz der Gesellschaft: Karlsruhe
Registergericht: Amtsgericht Mannheim, HRB 741226
Geschäftsführer: Dr.-Ing. Dominik Riemer, Dr.-Ing. Philipp Zehnder
…………………………………………………


Von: Tim <[email protected]>
Datum: Dienstag, 25. Oktober 2022 um 21:47
An: [email protected] <[email protected]>
Cc: Philipp Zehnder <[email protected]>
Betreff: Re: AW: [DISCUSS] Automatic Typescript model generation
Hi,

yes that would be benefial.
I've notices that we already have confluence pages for that: [1] [2]
it's just up to us to fill them with live ;)

Let's see whether we can use these tools in a pre-commit hook, but that
shouldn't be an issue since any executable can be defined as git hook.
Usually, you add a pre-commit hook file to the repository.
This file then needs to be configured by each developer as pre-commit
hook but this really simple and can be done with one git command.
When describing it properly in the development guide and/or README, this
shouldn't be a high bar for any developer.

I would be happy to move this topic forward with you.

Best
Tim

[1]
https://cwiki.apache.org/confluence/display/STREAMPIPES/Code+Style+-+Java
[2]
https://cwiki.apache.org/confluence/display/STREAMPIPES/Code+Style+-+Typescript

Am 24.10.2022 22:21 schrieb Philipp Zehnder:
> Hi Tim,
>
> I really like the idea.
> For this we need a uniform style guide, right?
> For the UI we recently switched to ESLint with Prettier as a formatter
> and for Java we use checkstyle. Are those configurations then used by
> the pre-commit hook?
> And what kind of formatting can be done with it?
>
> Where do we need to configure the pre-commit hooks, is that something
> each developer needs to configure, or can we configure it in the
> repository?
>
> Cheers,
> Philipp
>
>
> Von: Tim <[email protected]>
> Datum: Sonntag, 23. Oktober 2022 um 13:48
> An: [email protected] <[email protected]>
> Betreff: Re: [DISCUSS] Automatic Typescript model generation
> Hi Philipp,
>
> I don't know if this can be solved with the maven plugin used for the
> TypeScript generation.
> An alternative idea of mine would be to use a git-hook for this.
> We could create a git-hook for StreamPipes that checks each committed
> file for the presence of the Apache header and adds it if it is
> missing.
> Pre-commit hooks could also be used for style checks and so on. I'm
> already planning to have a discussion about that approach in general on
> our mailing list, but apparently you have been faster ;)  So this could
> be a good first use case for it.
>
> What do you think about this idea?
>
> Best
> Tim
>
> Am 19.10.2022 22:39 schrieb Philipp Zehnder:
>> Hi all,
>>
>> the TypeScript model for our UI is automatically generated from the
>> Java classes as described in [1].
>> So far this had to be done manually. I added a small script to
>> automate the process [2].
>>
>> This already eases to update process, however the license headers
>> still must be inserted manually.
>> Does anyone have an idea how we could automate this step as well?
>>
>> Here is the link to the corresponding issue [3].
>>
>> Cheers,
>> Philipp
>>
>> [1]
>> https://cwiki.apache.org/confluence/display/STREAMPIPES/Core-UI+Serialization
>> [2]
>> https://github.com/apache/incubator-streampipes/blob/dev/create-client-model.sh
>> [3]
>> https://issues.apache.org/jira/projects/STREAMPIPES/issues/STREAMPIPES-600

Reply via email to