-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Support python generation ## Changes Made * Support python generation * Restructure folders ## Related Issues Fixes #46 ## Checklist - [x] I have used a PR title that is descriptive enough for a release note. - [ ] I have tested these changes locally. - [ ] I have added appropriate tests or updated existing tests. - [ ] I have tested these changes on a dedicated VM or a customer VM [name of the VM] - [ ] I have added appropriate documentation or updated existing documentation. --------- Co-authored-by: Alberto Moretti <[email protected]> Co-authored-by: Bot <[email protected]> Co-authored-by: hiimjako <[email protected]>
- Loading branch information
1 parent
562ec8c
commit e8332e2
Showing
62 changed files
with
2,129 additions
and
965 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Golang | ||
name: Protobuf | ||
|
||
concurrency: | ||
group: ${{github.repository}}-${{ github.ref_name }}-proto | ||
|
@@ -29,8 +29,6 @@ jobs: | |
- run: git config --global url.https://[email protected]/.insteadOf https://github.com/ | ||
- uses: bufbuild/buf-setup-action@v1 | ||
- uses: bufbuild/buf-lint-action@v1 | ||
with: | ||
input: "proto" | ||
# - uses: bufbuild/buf-breaking-action@v1 | ||
# with: | ||
# # The 'main' branch of the GitHub repository that defines the module. | ||
|
@@ -63,5 +61,6 @@ jobs: | |
git add --all && git commit -m "Buf re-generated protos" || echo "No changes to commit" | ||
git push | ||
golang: | ||
needs: proto | ||
uses: zaphiro-technologies/github-workflows/.github/workflows/golang.yaml@main | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,6 @@ go.work | |
*/.DS_Store | ||
.DS_Store | ||
output.txt | ||
/dist | ||
|
||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ At the time being this repository includes the following Protocol Buffer | |
packages: | ||
|
||
- _Grid_ package collects grid related messages, defined in | ||
[`proto/grid/v1`](./proto/grid/v1/), which currently include: | ||
[`zaphiro/grid/v1`](./zaphiro/grid/v1/), which currently include: | ||
- `Data` protocol buffer package, that includes the following messages | ||
- `Data`: a single measurement data | ||
- `DataSet`: a collection of measurement data. | ||
|
@@ -36,18 +36,40 @@ packages: | |
inherited by: | ||
- `GridEvent`: a message that represent grid events. | ||
- _Platform_ package collects platform related messages, defined in | ||
[`proto/platform/v1`](./proto/platform/v1/), which currently include: | ||
[`zaphiro/platform/v1`](./zaphiro/platform/v1/), which currently include: | ||
- `Task`: a task to be performed by an service in the platform. | ||
- `Notification`: a notification produced by a service in the platform. | ||
- _C37118_ package collects messages related to the IEEE c37.118 standard, | ||
defined in [`proto/c37118/v1`](./proto/c37118/v1/), which currently include: | ||
defined in [`zaphiro/c37118/v1`](./zaphiro/c37118/v1/), which currently | ||
include: | ||
- `Conf2Frame`: a Protocol Buffer used to store PMU configuration frames. | ||
- `Stat`: a Protocol Buffer used to store PMU measurement Stat. | ||
|
||
## Protocol Buffers Management | ||
|
||
All protocol buffers are documented in [docs](./docs). | ||
|
||
### Installation | ||
|
||
Currently code is generated for: | ||
|
||
- [go](go) | ||
- [python](python) | ||
|
||
#### Python | ||
|
||
Installation was tested with poetry: | ||
|
||
```bash | ||
poetry add git+https://github.com/zaphiro-technologies/protobuf.git#v0.0.5 | ||
``` | ||
|
||
#### Go | ||
|
||
```bash | ||
go install github.com/zaphiro-technologies/protobuf/[email protected] | ||
``` | ||
|
||
### Generate Code from Protocol Buffers | ||
|
||
```bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: v1 | ||
plugins: | ||
- plugin: buf.build/protocolbuffers/go:v1.31.0 | ||
out: go | ||
- plugin: buf.build/protocolbuffers/pyi:v26.0 | ||
out: python | ||
- plugin: buf.build/protocolbuffers/python:v26.0 | ||
out: python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
version: v1 | ||
|
||
breaking: | ||
use: | ||
- FILE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.