Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:

- name: Build the package
run: python -m build

- name: Build Documentation
run: |
python3 ./scripts/build_doc.py

- name: Publish to PyPI
env:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
- name: Build the package
run: python -m build

- name: Build Documentation
run: |
python3 ./scripts/build_doc.py

- name: Publish to TestPyPI
env:
TWINE_USERNAME: __token__
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
7 changes: 7 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./three.html"/>
</head>
</html>
46 changes: 46 additions & 0 deletions docs/search.js

Large diffs are not rendered by default.

243 changes: 243 additions & 0 deletions docs/three.html

Large diffs are not rendered by default.

237 changes: 237 additions & 0 deletions docs/three/MF.html

Large diffs are not rendered by default.

249 changes: 249 additions & 0 deletions docs/three/MF/V3.html

Large diffs are not rendered by default.

531 changes: 531 additions & 0 deletions docs/three/MF/V3/Buffer.html

Large diffs are not rendered by default.

269 changes: 269 additions & 0 deletions docs/three/MF/V3/Descriptors.html

Large diffs are not rendered by default.

413 changes: 413 additions & 0 deletions docs/three/MF/V3/Descriptors/BoundingBox.html

Large diffs are not rendered by default.

989 changes: 989 additions & 0 deletions docs/three/MF/V3/Descriptors/Calibration.html

Large diffs are not rendered by default.

671 changes: 671 additions & 0 deletions docs/three/MF/V3/Descriptors/Export.html

Large diffs are not rendered by default.

378 changes: 378 additions & 0 deletions docs/three/MF/V3/Descriptors/Image.html

Large diffs are not rendered by default.

600 changes: 600 additions & 0 deletions docs/three/MF/V3/Descriptors/Merge.html

Large diffs are not rendered by default.

358 changes: 358 additions & 0 deletions docs/three/MF/V3/Descriptors/Network.html

Large diffs are not rendered by default.

774 changes: 774 additions & 0 deletions docs/three/MF/V3/Descriptors/Project.html

Large diffs are not rendered by default.

604 changes: 604 additions & 0 deletions docs/three/MF/V3/Descriptors/ProjectActions.html

Large diffs are not rendered by default.

485 changes: 485 additions & 0 deletions docs/three/MF/V3/Descriptors/RemoveVertices.html

Large diffs are not rendered by default.

891 changes: 891 additions & 0 deletions docs/three/MF/V3/Descriptors/ScanData.html

Large diffs are not rendered by default.

262 changes: 262 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings.html

Large diffs are not rendered by default.

5,065 changes: 5,065 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings/Advanced.html

Large diffs are not rendered by default.

1,281 changes: 1,281 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings/Camera.html

Large diffs are not rendered by default.

877 changes: 877 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings/Capture.html

Large diffs are not rendered by default.

422 changes: 422 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings/I18n.html

Large diffs are not rendered by default.

576 changes: 576 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings/Projector.html

Large diffs are not rendered by default.

510 changes: 510 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings/Scanner.html

Large diffs are not rendered by default.

419 changes: 419 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings/Software.html

Large diffs are not rendered by default.

422 changes: 422 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings/Style.html

Large diffs are not rendered by default.

733 changes: 733 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings/Turntable.html

Large diffs are not rendered by default.

639 changes: 639 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings/Tutorials.html

Large diffs are not rendered by default.

455 changes: 455 additions & 0 deletions docs/three/MF/V3/Descriptors/Settings/Viewer.html

Large diffs are not rendered by default.

469 changes: 469 additions & 0 deletions docs/three/MF/V3/Descriptors/Software.html

Large diffs are not rendered by default.

467 changes: 467 additions & 0 deletions docs/three/MF/V3/Descriptors/System.html

Large diffs are not rendered by default.

357 changes: 357 additions & 0 deletions docs/three/MF/V3/Descriptors/Transform.html

Large diffs are not rendered by default.

482 changes: 482 additions & 0 deletions docs/three/MF/V3/Descriptors/VideoFrame.html

Large diffs are not rendered by default.

516 changes: 516 additions & 0 deletions docs/three/MF/V3/Descriptors/Wifi.html

Large diffs are not rendered by default.

300 changes: 300 additions & 0 deletions docs/three/MF/V3/Settings.html

Large diffs are not rendered by default.

2,216 changes: 2,216 additions & 0 deletions docs/three/MF/V3/Settings/Advanced.html

Large diffs are not rendered by default.

1,359 changes: 1,359 additions & 0 deletions docs/three/MF/V3/Settings/Align.html

Large diffs are not rendered by default.

463 changes: 463 additions & 0 deletions docs/three/MF/V3/Settings/AutoFocus.html

Large diffs are not rendered by default.

353 changes: 353 additions & 0 deletions docs/three/MF/V3/Settings/BoundingBox.html

Large diffs are not rendered by default.

421 changes: 421 additions & 0 deletions docs/three/MF/V3/Settings/Camera.html

Large diffs are not rendered by default.

462 changes: 462 additions & 0 deletions docs/three/MF/V3/Settings/Capture.html

Large diffs are not rendered by default.

417 changes: 417 additions & 0 deletions docs/three/MF/V3/Settings/CopyGroup.html

Large diffs are not rendered by default.

338 changes: 338 additions & 0 deletions docs/three/MF/V3/Settings/CopyProject.html

Large diffs are not rendered by default.

570 changes: 570 additions & 0 deletions docs/three/MF/V3/Settings/Export.html

Large diffs are not rendered by default.

457 changes: 457 additions & 0 deletions docs/three/MF/V3/Settings/Group.html

Large diffs are not rendered by default.

417 changes: 417 additions & 0 deletions docs/three/MF/V3/Settings/I18n.html

Large diffs are not rendered by default.

1,280 changes: 1,280 additions & 0 deletions docs/three/MF/V3/Settings/Merge.html

Large diffs are not rendered by default.

481 changes: 481 additions & 0 deletions docs/three/MF/V3/Settings/NewGroup.html

Large diffs are not rendered by default.

344 changes: 344 additions & 0 deletions docs/three/MF/V3/Settings/Project.html

Large diffs are not rendered by default.

914 changes: 914 additions & 0 deletions docs/three/MF/V3/Settings/Projector.html

Large diffs are not rendered by default.

330 changes: 330 additions & 0 deletions docs/three/MF/V3/Settings/Quality.html

Large diffs are not rendered by default.

378 changes: 378 additions & 0 deletions docs/three/MF/V3/Settings/Rectangle.html

Large diffs are not rendered by default.

617 changes: 617 additions & 0 deletions docs/three/MF/V3/Settings/Remesh.html

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions docs/three/MF/V3/Settings/RemoveVertices.html

Large diffs are not rendered by default.

2,026 changes: 2,026 additions & 0 deletions docs/three/MF/V3/Settings/Scan.html

Large diffs are not rendered by default.

760 changes: 760 additions & 0 deletions docs/three/MF/V3/Settings/ScanData.html

Large diffs are not rendered by default.

450 changes: 450 additions & 0 deletions docs/three/MF/V3/Settings/ScanSelection.html

Large diffs are not rendered by default.

510 changes: 510 additions & 0 deletions docs/three/MF/V3/Settings/Scanner.html

Large diffs are not rendered by default.

338 changes: 338 additions & 0 deletions docs/three/MF/V3/Settings/Software.html

Large diffs are not rendered by default.

399 changes: 399 additions & 0 deletions docs/three/MF/V3/Settings/Style.html

Large diffs are not rendered by default.

358 changes: 358 additions & 0 deletions docs/three/MF/V3/Settings/Turntable.html

Large diffs are not rendered by default.

428 changes: 428 additions & 0 deletions docs/three/MF/V3/Settings/Tutorials.html

Large diffs are not rendered by default.

627 changes: 627 additions & 0 deletions docs/three/MF/V3/Settings/Video.html

Large diffs are not rendered by default.

318 changes: 318 additions & 0 deletions docs/three/MF/V3/Settings/Viewer.html

Large diffs are not rendered by default.

338 changes: 338 additions & 0 deletions docs/three/MF/V3/Settings/Wifi.html

Large diffs are not rendered by default.

870 changes: 870 additions & 0 deletions docs/three/MF/V3/Task.html

Large diffs are not rendered by default.

352 changes: 352 additions & 0 deletions docs/three/MF/V3/Tasks.html

Large diffs are not rendered by default.

672 changes: 672 additions & 0 deletions docs/three/MF/V3/Tasks/AddMergeToProject.html

Large diffs are not rendered by default.

735 changes: 735 additions & 0 deletions docs/three/MF/V3/Tasks/Align.html

Large diffs are not rendered by default.

786 changes: 786 additions & 0 deletions docs/three/MF/V3/Tasks/AutoFocus.html

Large diffs are not rendered by default.

750 changes: 750 additions & 0 deletions docs/three/MF/V3/Tasks/BoundingBox.html

Large diffs are not rendered by default.

650 changes: 650 additions & 0 deletions docs/three/MF/V3/Tasks/CalibrateCameras.html

Large diffs are not rendered by default.

657 changes: 657 additions & 0 deletions docs/three/MF/V3/Tasks/CalibrateTurntable.html

Large diffs are not rendered by default.

672 changes: 672 additions & 0 deletions docs/three/MF/V3/Tasks/CalibrationCaptureTargets.html

Large diffs are not rendered by default.

654 changes: 654 additions & 0 deletions docs/three/MF/V3/Tasks/CameraCalibration.html

Large diffs are not rendered by default.

619 changes: 619 additions & 0 deletions docs/three/MF/V3/Tasks/CloseProject.html

Large diffs are not rendered by default.

691 changes: 691 additions & 0 deletions docs/three/MF/V3/Tasks/ConnectWifi.html

Large diffs are not rendered by default.

1,052 changes: 1,052 additions & 0 deletions docs/three/MF/V3/Tasks/DepthMap.html

Large diffs are not rendered by default.

699 changes: 699 additions & 0 deletions docs/three/MF/V3/Tasks/DetectCalibrationCard.html

Large diffs are not rendered by default.

879 changes: 879 additions & 0 deletions docs/three/MF/V3/Tasks/DownloadProject.html

Large diffs are not rendered by default.

905 changes: 905 additions & 0 deletions docs/three/MF/V3/Tasks/Export.html

Large diffs are not rendered by default.

859 changes: 859 additions & 0 deletions docs/three/MF/V3/Tasks/ExportLogs.html

Large diffs are not rendered by default.

887 changes: 887 additions & 0 deletions docs/three/MF/V3/Tasks/ExportMerge.html

Large diffs are not rendered by default.

722 changes: 722 additions & 0 deletions docs/three/MF/V3/Tasks/FlattenGroup.html

Large diffs are not rendered by default.

619 changes: 619 additions & 0 deletions docs/three/MF/V3/Tasks/ForgetWifi.html

Large diffs are not rendered by default.

644 changes: 644 additions & 0 deletions docs/three/MF/V3/Tasks/HasCameras.html

Large diffs are not rendered by default.

644 changes: 644 additions & 0 deletions docs/three/MF/V3/Tasks/HasProjector.html

Large diffs are not rendered by default.

644 changes: 644 additions & 0 deletions docs/three/MF/V3/Tasks/HasTurntable.html

Large diffs are not rendered by default.

730 changes: 730 additions & 0 deletions docs/three/MF/V3/Tasks/ListExportFormats.html

Large diffs are not rendered by default.

729 changes: 729 additions & 0 deletions docs/three/MF/V3/Tasks/ListGroups.html

Large diffs are not rendered by default.

657 changes: 657 additions & 0 deletions docs/three/MF/V3/Tasks/ListNetworkInterfaces.html

Large diffs are not rendered by default.

657 changes: 657 additions & 0 deletions docs/three/MF/V3/Tasks/ListProjects.html

Large diffs are not rendered by default.

703 changes: 703 additions & 0 deletions docs/three/MF/V3/Tasks/ListScans.html

Large diffs are not rendered by default.

732 changes: 732 additions & 0 deletions docs/three/MF/V3/Tasks/ListSettings.html

Large diffs are not rendered by default.

666 changes: 666 additions & 0 deletions docs/three/MF/V3/Tasks/ListWifi.html

Large diffs are not rendered by default.

816 changes: 816 additions & 0 deletions docs/three/MF/V3/Tasks/Merge.html

Large diffs are not rendered by default.

1,361 changes: 1,361 additions & 0 deletions docs/three/MF/V3/Tasks/MergeData.html

Large diffs are not rendered by default.

756 changes: 756 additions & 0 deletions docs/three/MF/V3/Tasks/MoveGroup.html

Large diffs are not rendered by default.

735 changes: 735 additions & 0 deletions docs/three/MF/V3/Tasks/NewGroup.html

Large diffs are not rendered by default.

711 changes: 711 additions & 0 deletions docs/three/MF/V3/Tasks/NewProject.html

Large diffs are not rendered by default.

750 changes: 750 additions & 0 deletions docs/three/MF/V3/Tasks/NewScan.html

Large diffs are not rendered by default.

704 changes: 704 additions & 0 deletions docs/three/MF/V3/Tasks/OpenProject.html

Large diffs are not rendered by default.

782 changes: 782 additions & 0 deletions docs/three/MF/V3/Tasks/PopSettings.html

Large diffs are not rendered by default.

732 changes: 732 additions & 0 deletions docs/three/MF/V3/Tasks/PushSettings.html

Large diffs are not rendered by default.

619 changes: 619 additions & 0 deletions docs/three/MF/V3/Tasks/Reboot.html

Large diffs are not rendered by default.

696 changes: 696 additions & 0 deletions docs/three/MF/V3/Tasks/RemoveGroups.html

Large diffs are not rendered by default.

708 changes: 708 additions & 0 deletions docs/three/MF/V3/Tasks/RemoveProjects.html

Large diffs are not rendered by default.

619 changes: 619 additions & 0 deletions docs/three/MF/V3/Tasks/RestoreFactoryCalibration.html

Large diffs are not rendered by default.

669 changes: 669 additions & 0 deletions docs/three/MF/V3/Tasks/RotateTurntable.html

Large diffs are not rendered by default.

1,363 changes: 1,363 additions & 0 deletions docs/three/MF/V3/Tasks/ScanData.html

Large diffs are not rendered by default.

732 changes: 732 additions & 0 deletions docs/three/MF/V3/Tasks/SetCameras.html

Large diffs are not rendered by default.

816 changes: 816 additions & 0 deletions docs/three/MF/V3/Tasks/SetGroup.html

Large diffs are not rendered by default.

744 changes: 744 additions & 0 deletions docs/three/MF/V3/Tasks/SetProject.html

Large diffs are not rendered by default.

729 changes: 729 additions & 0 deletions docs/three/MF/V3/Tasks/SetProjector.html

Large diffs are not rendered by default.

619 changes: 619 additions & 0 deletions docs/three/MF/V3/Tasks/Shutdown.html

Large diffs are not rendered by default.

728 changes: 728 additions & 0 deletions docs/three/MF/V3/Tasks/SplitGroup.html

Large diffs are not rendered by default.

666 changes: 666 additions & 0 deletions docs/three/MF/V3/Tasks/StartVideo.html

Large diffs are not rendered by default.

619 changes: 619 additions & 0 deletions docs/three/MF/V3/Tasks/StopVideo.html

Large diffs are not rendered by default.

775 changes: 775 additions & 0 deletions docs/three/MF/V3/Tasks/SystemInfo.html

Large diffs are not rendered by default.

747 changes: 747 additions & 0 deletions docs/three/MF/V3/Tasks/TransformGroup.html

Large diffs are not rendered by default.

657 changes: 657 additions & 0 deletions docs/three/MF/V3/Tasks/TurntableCalibration.html

Large diffs are not rendered by default.

819 changes: 819 additions & 0 deletions docs/three/MF/V3/Tasks/UpdateSettings.html

Large diffs are not rendered by default.

801 changes: 801 additions & 0 deletions docs/three/MF/V3/Tasks/UploadProject.html

Large diffs are not rendered by default.

3,928 changes: 3,928 additions & 0 deletions docs/three/MF/V3/Three.html

Large diffs are not rendered by default.

1,263 changes: 1,263 additions & 0 deletions docs/three/_scanner.html

Large diffs are not rendered by default.

3,140 changes: 3,140 additions & 0 deletions docs/three/scanner.html

Large diffs are not rendered by default.

408 changes: 408 additions & 0 deletions docs/three/serialization.html

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ pycodestyle==2.12.1
pyflakes==3.2.0
websocket-client==1.8.0
wheel
build
build
pdoc
113 changes: 14 additions & 99 deletions scripts/build_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,106 +2,29 @@

import os
import subprocess
import glob
import re
import shutil

# Paths
scriptPath = os.path.dirname(os.path.realpath(__file__))
protoInputPath = scriptPath + '/../V3Schema/'
protoOutputPath = scriptPath + '/../three'
docInputPath = scriptPath + '/../doc/source/'
docOutputPath = scriptPath + '/../doc/build/'

print("*****************")
print("Proto files input : " + protoInputPath)
print("Proto files output : " + protoOutputPath)
print("Documentation files input : " + docInputPath)
print("Documentation files output: " + docOutputPath)
print("*****************")


def BuildProtoFiles(protoFiles, inputDir, outputDir):
for file in protoFiles:
print("---> Building: " + file)

status = subprocess.run(args=[
'python3',
'-m',
'grpc_tools.protoc',
f'-I={inputDir}',
f'--python_betterproto_out={outputDir}',
'--experimental_allow_proto3_optional']
+ protoFiles,
capture_output=True)

return status

def CleanUpGeneratedInit(file):
# Get the content
with open(file, "r") as f:
lines = f.readlines()
# Filter output
with open(file, "w") as f:
badImport = False
for line in lines:
# Beginning of the imports ?
if 'from ....' in line:
badImport = True
# Outside of the import section ?
if not badImport:
if 'MfV3' in line:
line = re.sub('"[_]{3,}MfV3Settings', '"MF.V3.Settings.', line)
line = re.sub('"[_]{3,}MfV3Descriptors', '"MF.V3.Descriptors.', line)
line = line.replace('__"', '"')
f.write(line)
# End of the imports
if badImport and ')' in line:
badImport = False

# Save the three/__init__.py
# It will be overridden by the betterprotoc compiler
initFilePath = scriptPath + "/../three/__init__.py"
initFilePathBack = initFilePath+'.back'
os.rename(initFilePath, initFilePathBack)

# Find and build all the proto files
protoFiles = glob.glob(protoInputPath+"/**/*.proto", recursive=True)
result = BuildProtoFiles(protoFiles, protoInputPath, protoOutputPath)

# Restore three/__init__.py
os.rename(initFilePathBack, initFilePath)

# Inspect the results
# Define color variables
GREEN = '\033[92m'
YELLOW = '\033[33m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDC = '\033[0m'
print("*****************")
if result.returncode == 0:
print(result.stdout.decode('utf-8'))
print(GREEN + 'Built : ' + str(len(protoFiles)) + ' proto files' + ENDC)
else:
print('Build failed:')
print(RED + result.stderr.decode('utf-8') + ENDC)
exit(result.returncode)
print("*****************")

# Paths
scriptPath = os.path.dirname(os.path.realpath(__file__))
docOutputPath = scriptPath + '/../docs'
module = 'three'

# Clean up the generated code
generatedFiles = glob.glob(protoOutputPath+"/MF/**/__init__.py", recursive=True)
for file in generatedFiles:
print('Clean up: ', file)
CleanUpGeneratedInit(file)
print("*****************")
# Remove the docOutputPath if it exists
if os.path.exists(docOutputPath):
shutil.rmtree(docOutputPath)

# Build the documentation
result = subprocess.run(args=[
'sphinx-build',
'-M',
'html',
docInputPath,
'pdoc',
'-o',
docOutputPath,
'--write-all'],
module],
capture_output=True)

if result.returncode == 0:
Expand All @@ -110,12 +33,4 @@ def CleanUpGeneratedInit(file):
else:
print('Doc failed')
print(GREEN + result.stdout.decode('utf-8') + ENDC)
print(RED + result.stderr.decode('utf-8') + ENDC)
exit(result.returncode)

# Remove generated files
for file in generatedFiles:
print('Remove:', file)
os.remove(file)


print(RED + result.stderr.decode('utf-8') + ENDC)
4 changes: 2 additions & 2 deletions scripts/build_proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Install the package in editable mode
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '-e', '.'])

# Generate the proto files
subprocess.check_call([sys.executable, f'{scripts_folder}/generatePyi.py'])
# Generate the Scanner File
subprocess.check_call([sys.executable, f'{scripts_folder}/generateScannerPy.py'])

exit(0)
94 changes: 0 additions & 94 deletions scripts/generatePyi.py

This file was deleted.

Loading