Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
39a2bf4
Update Schema
drewsipher Aug 23, 2024
9bf4ce8
Update proto build script to delete previously generated files
drewsipher Aug 23, 2024
9867f4d
moving to new proto methods
drewsipher Aug 30, 2024
e8ec580
Playing around with custom compilers for protoc
drewsipher Sep 4, 2024
6ad583f
improving the interpreter with comments and optionals
drewsipher Sep 4, 2024
a42cd37
Add Namespace
drewsipher Sep 5, 2024
9f0b4b1
Transpiler additions. Still kinks to work out
drewsipher Sep 5, 2024
cedf7e0
Added proper type mapping. Removed Enums as special case
drewsipher Sep 5, 2024
7a57867
Handles enum imports and google any in init defs
drewsipher Sep 6, 2024
4819008
fix uint and inmessage counter
drewsipher Sep 6, 2024
ac56933
Fix imports with wildcard for now
drewsipher Sep 6, 2024
6ae9348
Fix nested classes first
drewsipher Sep 6, 2024
4a5a2ba
fixed indenting of comments. Adding __init__
drewsipher Sep 6, 2024
12b37d0
Fix Comment spacing
drewsipher Sep 6, 2024
2329890
Sort properties by optional. Make imports a set instead of a list
drewsipher Sep 6, 2024
a419489
Importing enum secial case
drewsipher Sep 6, 2024
3221c81
Outputting unhandled lines
drewsipher Sep 6, 2024
b5b3c48
Handling self reference class names
drewsipher Sep 6, 2024
9a2ce39
Update Schema to fix namespaces without MF
drewsipher Sep 6, 2024
912e0ad
implementing reverse tree
drewsipher Sep 7, 2024
761d30c
partial search partial implementation
drewsipher Sep 7, 2024
8ee3b14
working tree. Overlaps not handled
drewsipher Sep 7, 2024
4ac4a2b
Commit before cleanup
drewsipher Sep 8, 2024
b054b41
Property cleanup. Needs repeating
drewsipher Sep 8, 2024
67aa453
Catching Repeated.
drewsipher Sep 8, 2024
50c5b7a
Writing out repeated
drewsipher Sep 8, 2024
998d2f6
Cleanup
drewsipher Sep 8, 2024
2fe9eef
Cleanup and working on init
drewsipher Sep 8, 2024
00f956b
Fixes imports for __init__ and repeated as Lists
drewsipher Sep 9, 2024
7bff755
Fixes conflict names
drewsipher Sep 9, 2024
d8c7126
Projector testing
drewsipher Sep 9, 2024
4199d97
Requests Work. Updated Build-proto.py
drewsipher Sep 9, 2024
facc8fe
Handling Task messages with indicies
drewsipher Sep 9, 2024
124c61e
Working on scanner helper automated class
drewsipher Sep 11, 2024
83e73e9
Parsing Service to Objects
drewsipher Sep 11, 2024
ca9974d
adds service to tree
drewsipher Sep 11, 2024
4c0d41b
Moving to Tree only
drewsipher Sep 19, 2024
6b63e1e
Update Schema
drewsipher Sep 19, 2024
1741350
Added launch.json. Moved tree to seperate file. Using Tree instead of…
drewsipher Sep 20, 2024
457bc1d
Sliding over to Tree instead of Messages
drewsipher Sep 20, 2024
c384f4a
Comments inside class
drewsipher Sep 20, 2024
5cc25b2
Starting to write methods for Service
drewsipher Sep 20, 2024
598831b
Changes to tree property to help simplify before service
drewsipher Sep 24, 2024
bd2b384
Better import lists
drewsipher Sep 25, 2024
ff3761d
Chasing bug on import duplicates
drewsipher Sep 25, 2024
308fcd3
Property and importing on base classes clean
drewsipher Sep 25, 2024
accf9f8
Cleanup and comments. Moving to Services
drewsipher Sep 25, 2024
d346d60
Creating Service Objects Requests for convencience methods
drewsipher Sep 25, 2024
03818cd
Cleanup propertys with nested names
drewsipher Sep 26, 2024
3d387e2
update check to auto lint and ignore long lines
drewsipher Sep 26, 2024
1995444
Linting fixes
drewsipher Sep 26, 2024
d8b3e28
Three.py building requests and responses
drewsipher Sep 26, 2024
1935630
Convenience methods written
drewsipher Sep 27, 2024
f65eddd
Including Generated files, and small cleanup
drewsipher Sep 27, 2024
d29ea06
Sorting of imports.
drewsipher Sep 30, 2024
6be1a30
Sorting imports for init files
drewsipher Sep 30, 2024
f643406
Created a stub file for scanner
drewsipher Sep 30, 2024
3f5bb9c
repeated as optionals. Handling enum serialization
drewsipher Sep 30, 2024
d9123eb
Starting to implement buffers
drewsipher Sep 30, 2024
f1e9459
Sending images working
drewsipher Oct 1, 2024
aa84fa7
Cleanup and faster priocessing without subprocessess
drewsipher Oct 1, 2024
0a72111
Check errors and fail build when using flake
drewsipher Oct 1, 2024
7945b1f
Proper working Scanner example. Added progress to schema.
drewsipher Oct 1, 2024
72967a2
Working on scanner. Updated with scale export
drewsipher Nov 19, 2024
768d31d
Casts progresses
drewsipher Nov 19, 2024
2a9ff4a
Update to new Schema
drewsipher Nov 19, 2024
f2e5d66
update readme and remove old files when compiling new files
drewsipher Nov 19, 2024
8b3c874
Exporting working
drewsipher Nov 19, 2024
d937d0b
Fix to completion without outputs. Add Texturing to example
drewsipher Nov 20, 2024
1e30df1
Cleanup on example
drewsipher Nov 20, 2024
09d2758
Fixed Task example
drewsipher Nov 20, 2024
3945411
Turntable Calibration Example
drewsipher Nov 20, 2024
8057d5a
Draft of Readme and License
drewsipher Nov 20, 2024
c37bae5
Fix examples link in readme
drewsipher Nov 20, 2024
1a179ae
Update version to match server
drewsipher Nov 21, 2024
f43c39c
Fixes build-proto from scratch
drewsipher Nov 21, 2024
1fc5dcb
update to requirements and task for examples
drewsipher Nov 21, 2024
1dac70a
Small fixes to projector and task
drewsipher Nov 21, 2024
bf22a6a
Movemanifest Changes and readme updates
drewsipher Nov 22, 2024
8a9dd59
Include other examples in toml
drewsipher Nov 22, 2024
320fb00
renamed project to three
drewsipher Nov 22, 2024
a4c2567
removed old maf_three
drewsipher Nov 22, 2024
b6f6d80
Changes to use non deprecated build. CI updates
drewsipher Nov 22, 2024
9151365
CI: Version bump and transpiled code [skip ci]
Nov 22, 2024
a53dbc3
Changes to package name, and CI CD
drewsipher Nov 22, 2024
e313050
CI: Version bump and transpiled code [skip ci]
Nov 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 50 additions & 101 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -1,120 +1,69 @@
name: CD Pipeline
name: CI

# The pipeline is triggered by tags being pushed.
on:
push:
tags:
- 'v*.*.*' # Library version

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
branches:
- release
workflow_dispatch:

jobs:
Continuous_Deployment:
build:
runs-on: ubuntu-latest

# 1. Extract information from the tag (version number, channel).
# 2. Build the python package.
# 3. Update the package to the repo.
steps:

# Checkout the source and the submodules
- name: Checkout repository and submodules
uses: actions/checkout@v3
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
token: ${{ secrets.API_TOKEN_GITHUB }}
persist-credentials: true
submodules: true
fetch-depth: 0

############## 1. Extract information from the tag ##############
- name: Update submodules
run: git submodule update --init --recursive

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

# Check tag
- name: Check tag
- name: Install build dependencies
run: |
echo "Checking tag: ${GITHUB_REF_NAME}"
source ./scripts/github-tag
CheckTag ${GITHUB_REF_NAME}

# Get version number
- name: Tag -> Version
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Transpile Schema
run: |
source scripts/github-tag
echo "PACKAGE_VERSION=$(VersionFromTag ${GITHUB_REF_NAME})" >> $GITHUB_ENV
python ./scripts/build_proto.py

# Get the release channel: stable vs testing
- name: Tag -> Channel
run: |
source scripts/github-tag
echo "PACKAGE_CHANNEL=$(ChannelFromTag ${GITHUB_REF_NAME})" >> $GITHUB_ENV
- name: Build the package
run: python -m build

# Print out info
- name: Package Info
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
echo "Version: $PACKAGE_VERSION"
echo "Channel: $PACKAGE_CHANNEL"


############## 2. Build the python package. ##############
pip install twine
twine upload --verbose --repository pypi dist/*

# Install dependencies
- name: Install dependencies
- name: Commit and push changes
run: |
pip3 install -r requirements.txt
pip3 install twine

# Set version
- name: Set Version
run: echo "__version__ = \"${{ env.PACKAGE_VERSION }}\"" > maf_three/__init__.py

# Build proto files
- name: Build proto files
run: python3 ./scripts/build-proto.py

# Build
- name: Build
run: python3 -m build

# Install our package (required for the tests to find the namespace : MF.V3)
- name: Install
run: pip3 install ./dist/maf_three-${{ env.PACKAGE_VERSION }}-py3-none-any.whl

# Run the tests
- name: Test
run: python3 -m pytest

# Build the documentation
- name: Documentation
run: python3 ./scripts/build-doc.py


############## 3. Upload the package and the documentation. ##############

# Upload python package to testpypi
- name: Upload to TestPyPi
run: twine upload --repository testpypi dist/* -u__token__ -p${{ secrets.TESTPYPI_TOKEN }}
#run: twine upload dist/* -u__token__ -p${{ secrets.PYPI_TOKEN }}


# Upload the documentation
- name: Setup Pages
uses: actions/configure-pages@v5
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@matterandform.net'
git add .
git commit -m "Publish new version to PyPi [skip ci]"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Extract version
id: extract_version
run: |
CURRENT_VERSION=$(grep -oP "(?<=__version__ = ')[^']*" ./three/__init__.py)
echo "TAG=$CURRENT_VERSION" >> $GITHUB_ENV

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- name: Create a Release
uses: softprops/action-gh-release@v1
with:
path: './doc/build/html'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4


files: dist/*
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.TAG }}
113 changes: 60 additions & 53 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,76 @@
name: CI Pipeline
name: CI

# Triggers of the Action: Push or Pull Request
on:
pull_request:
branches: [ develop ]
types: [opened, review_requested, ready_for_review, synchronize]

# Allows you to run this workflow manually from the Actions tab (when this yml is in the main branch)
push:
branches:
- develop
workflow_dispatch:

jobs:
build:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
strategy:
fail-fast: false # allow other OS to keep running when one fails
matrix: # Linux ; MacOS ; Windows
sys:
- { os: ubuntu-latest, shell: bash}
#- { os: windows-latest, shell: 'msys2 {0}' }
#- { os: macos-latest, shell: bash}

# Set the default shell
defaults:
run:
shell: ${{ matrix.sys.shell }}

runs-on: ${{ matrix.sys.os }}

####################################################################
runs-on: ubuntu-latest

steps:

# Checkout the source and the submodules
- name: Checkout repository and submodules
uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
token: ${{ secrets.API_TOKEN_GITHUB }}
persist-credentials: true
submodules: true
fetch-depth: 0

# Install dependencies
- name: Install dependencies
run: pip3 install -r requirements.txt

# Set version
- name: Set Version
run: echo "__version__ = \"0.0.0\"" > maf_three/__init__.py
- name: Update submodules
run: git submodule update --init --recursive

- name: Increment Version
run: |
./scripts/incrementVersion.sh

# Build proto files
- name: Build proto files
run: python3 ./scripts/build-proto.py
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

# Build
- name: Build
run: python3 -m build
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Transpile Schema
run: |
python ./scripts/build_proto.py

# Install our package (required for the tests to find the namespace : MF.V3)
- name: Install
run: pip3 install ./dist/maf_three-0.0.0-py3-none-any.whl
- name: Build the package
run: python -m build

# Run the tests
- name: Test
run: python3 -m pytest
- name: Publish to TestPyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
pip install twine
twine upload --verbose --repository testpypi dist/*

# Build the documentation
- name: Documentation
run: python3 ./scripts/build-doc.py
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@matterandform.net'
git add .
git commit -m "CI: Version bump and transpiled code [skip ci]"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Extract version number
id: extract_version
run: |
CURRENT_VERSION=$(grep -oP "(?<=__version__ = ')[^']*" ./three/__init__.py)
echo "VERSION=$CURRENT_VERSION" >> $GITHUB_ENV

- name: Create Pull Request to merge develop into release
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "CI: Merge develop into release"
base: "develop"
branch: "release"
title: "New Release Candidate v${{ env.VERSION }}"
body: "This is an new release candidate for three-python. Merging this will distribute the new version to pypi."
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,4 @@ cython_debug/
#.idea/


## Matter And Form ##

# Don't include protobuf generated files.
maf_three/MF


## Matter And Form ##
51 changes: 51 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Transpile",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/scripts/transpileProto.py",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"justMyCode": true
},
{
"name": "Python: Simple Scanner Example",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/three/examples/simpleScanner.py",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"justMyCode": true
}
{
"name": "Python: Task Example",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/three/examples/task.py",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"justMyCode": true
},
{
"name": "Python: Calibrate Turntable Example",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/three/examples/turntableCalibration.py",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"justMyCode": true
},
{
"name": "Python: Setup Wheel",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/three/setup.py",
"args": ["sdist", "bdist_wheel"],
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"justMyCode": true
}
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Matter and Form

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading