- Please install the VSCode python virtual environment using
sh development/create_python_virtual_environment.sh
orsh development/create_python_virtual_environment.sh /path/to/python_binary
.
If you are on Windows, please use Git Bash. Note: Python 3.11+ is required. Note 2: It might be a good idea to restart VSCode after installing the virtual environment. Note 3: If VSCode prompts you, please use the interpreter under
development/dev_virtual_environment
.
- Generate interface and sample provider files:
sh development/auto_generate_files.sh
-
It's good practice to run tests and linting before committing. Please run
sh ./development/install_git_hooks.sh
to instll Git Hooks. -
Read the README for each provider for information on setting them up:
- Blender: providers/blender/README.md
- Fusion360: providers/fusion360/README.md
- Onshape: providers/onshape/README.md
Run scripts using sh development/{script_name}.sh
.
The following are the available scripts:
- run_tests.sh - Executes tests using pyunittest.
- run_lint.sh - Uses Flake8 to generate a lint report of the project. Use the --autofix flag to fix link and formatting.
- create_blender_addon.sh - Generates the BlenderAddon zip file
- create_python_virtual_environment.sh - Creates a pyenv on your local machine and installs development related packages.
- pip_package_create.sh - Builds a python package using setup.py.
- pip_package_upload.sh - Builds a python package and uploads it to pypi using twine. You will need a
.pypirc
file in the root directory for this to work.
We don't currently automatically release a nightly/dev build. However, here are some instructions on generating release files:
- pypi python release: run the pip_package_create.sh script
- Blender Addon zip file: run the create_blender_addon.sh script
CodeToCAD/capabilities.json is a schema used to generate the CodeToCAD interfaces.
Jinja2 templates are used to turn capabilities.json into an interface, as well as templates for CodeToCAD Providers and Tests.
You can generate the Jinja2 templates by running the "Capabilities.json to Python" task in VSCode, or sh development/capabilities_json_to_python/capabilities_to_py.sh
CodeToCAD is an automation. Here is the high-level architecture for this tool.
If you would like to contribute to the project, please feel free to submit a PR.
Please join the Discord Server if you have any questions or suggestions: https://discord.gg/MnZEtqwt74