-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-fedora-nmcli
- Loading branch information
Showing
271 changed files
with
47,403 additions
and
35,265 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
** | ||
|
||
!entrypoint.sh | ||
!requirements.txt |
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,15 @@ | ||
# Dockerfile/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro). | ||
# This copyright was auto-generated on Wed Mar 27 22:05:54 UTC 2024 | ||
|
||
FROM python:3.11-bookworm | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
protobuf-compiler \ | ||
bash | ||
|
||
COPY . /workdir | ||
RUN pip install -r /workdir/requirements.txt | ||
|
||
RUN chmod +x /workdir/entrypoint.sh | ||
|
||
ENTRYPOINT [ "/workdir/entrypoint.sh" ] |
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,22 @@ | ||
# Protobuf Builder | ||
|
||
This is a Docker image to build the [Protobuf](../../protobuf/) files in this repo. It currently only build Python | ||
output but should be used in the future for other languages. | ||
|
||
## Usage | ||
|
||
It is intended to be used via the [docker compose configuration](../../docker-compose.yml). | ||
|
||
First build: | ||
|
||
```shell | ||
docker compose build proto-build | ||
``` | ||
|
||
Then build the protobuf files with: | ||
|
||
```shell | ||
docker compose run --rm proto-build | ||
``` | ||
|
||
The output files will be placed in the [build directory](../../.build/protobuf). |
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,27 @@ | ||
#!/usr/bin/env bash | ||
# entrypoint.sh/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro). | ||
# This copyright was auto-generated on Wed Mar 27 22:05:54 UTC 2024 | ||
|
||
|
||
PROTO_SRC_DIR=/proto_in | ||
PROTO_PYTHON_OUT_DIR=/proto_python_out | ||
|
||
rm -rf $PROTO_PYTHON_OUT_DIR && mkdir -p $PROTO_PYTHON_OUT_DIR | ||
|
||
echo | ||
echo "Building protobuf python files and stubs from .proto source files..." | ||
pushd $PROTO_SRC_DIR | ||
protoc --include_imports --descriptor_set_out=$PROTO_PYTHON_OUT_DIR/descriptors --python_out=$PROTO_PYTHON_OUT_DIR --mypy_out=$PROTO_PYTHON_OUT_DIR * | ||
popd | ||
|
||
pushd $PROTO_PYTHON_OUT_DIR | ||
echo | ||
echo "Converting relative imports to absolute..." | ||
protol -o . --in-place raw descriptors | ||
rm descriptors | ||
|
||
# Format generated files | ||
echo | ||
echo "Formatting..." | ||
black . | ||
popd |
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,3 @@ | ||
mypy-protobuf==3.5.0 | ||
protoletariat==3.2.19 | ||
black |
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 |
---|---|---|
|
@@ -9,7 +9,32 @@ on: | |
workflow_dispatch: | ||
|
||
jobs: | ||
copyright: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.PUSH_FROM_WORKFLOW_TO_RETRIGGER }} | ||
|
||
- name: Check for (and add) missing copyrights | ||
shell: bash | ||
run: | | ||
make copyright | ||
echo "NUM_MODIFIED=$(git diff --numstat | wc -l)" >> $GITHUB_ENV | ||
- name: Push changes | ||
if: env.NUM_MODIFIED != 0 | ||
shell: bash | ||
run: | | ||
git config core.fileMode false | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add . | ||
git commit -m "updating copyrights from pre merge check in github action" | ||
git push | ||
check: | ||
needs: copyright | ||
name: Check modified files for Python SDK changes | ||
runs-on: ubuntu-latest | ||
outputs: | ||
|
@@ -29,16 +54,16 @@ jobs: | |
git diff --name-only HEAD^ HEAD >files.txt | ||
while IFS= read -r file; do | ||
if [[ $file != demos/python/sdk_wireless_camera_control* ]]; then | ||
echo "::set-output name=run_job::false" | ||
echo "{run_job}={false}" >> $GITHUB_OUTPUT | ||
else | ||
echo "Found a Python SDK modified file" | ||
echo "::set-output name=run_job::true" | ||
echo "{run_job}={true}" >> $GITHUB_OUTPUT | ||
break | ||
fi | ||
done <files.txt | ||
python_sdk: | ||
name: Build and Deploy Python SDK | ||
name: Build and Deploy Python SDK Documentation | ||
needs: check | ||
if: needs.check.outputs.run_job == 'true' | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -104,7 +129,7 @@ jobs: | |
jekyll: | ||
name: Build and Deploy Jekyll Site | ||
needs: [check, python_sdk] | ||
needs: [copyright, check, python_sdk] | ||
if: always() | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
# This copyright was auto-generated on Wed, Sep 1, 2021 5:05:35 PM | ||
|
||
# This workflow will run pre-merge checks to verify a PR before it is merged: | ||
# - copyright: Checks to see if there are any missing copyrights | ||
|
||
name: Pre Merge Checks | ||
|
||
|
@@ -11,39 +10,7 @@ on: | |
branches: [main, develop, release] | ||
|
||
jobs: | ||
copyright: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_HEAD_REF#refs/heads/})" | ||
id: extract_branch | ||
|
||
- name: Checkout PR branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ steps.extract_branch.outputs.branch }} | ||
ssh-key: ${{ secrets.PUSH_FROM_WORKFLOW_TO_RETRIGGER }} | ||
|
||
- name: Check for (and add) missing copyrights | ||
shell: bash | ||
run: | | ||
make copyright | ||
echo "NUM_MODIFIED=$(git diff --numstat | wc -l)" >> $GITHUB_ENV | ||
- name: Push changes | ||
if: env.NUM_MODIFIED != 0 | ||
shell: bash | ||
run: | | ||
git config core.fileMode false | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add . | ||
git commit -m "updating copyrights from pre merge check in github action" | ||
git push -f origin HEAD:${{ steps.extract_branch.outputs.branch }} | ||
test_github_pages: | ||
needs: copyright | ||
timeout-minutes: 5 | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -60,6 +27,7 @@ jobs: | |
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Test Jekyll Build and Check Links | ||
run: make tests | ||
|
||
|
@@ -71,7 +39,7 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: | ||
ref: release | ||
ssh-key: ${{ secrets.PUSH_FROM_WORKFLOW_TO_RETRIGGER }} | ||
|
||
- name: Verify synchronized if release | ||
shell: bash | ||
run: | | ||
|
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,22 @@ | ||
# publish_python_sdk.yml/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro). | ||
# This copyright was auto-generated on Wed, Sep 1, 2021 5:05:35 PM | ||
|
||
name: Publish the Python SDK to PyPi | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-publish: | ||
name: Build and Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
package_directory: ./demos/python/sdk_wireless_camera_control/ | ||
python_version: 3.11.4 | ||
pypi_token: ${{ secrets.PYTHON_SDK_PYPI_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/.idea/ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.