- Open project folder in VS Code
- Select python environment for the project
- First time using VS Code and on Windows? Make sure select the correct terminal profile:
Ctrl+Shift+P
,Terminal: Select Default Profile
and selectCommand Prompt
.
All terminal commands in the following sections can be run from the VS Code integrated terminal.
- Go to the
Source control
tab - Make an initial commit with all newly created files
-
Install the newly created project
pip install -e .
-
Install it on Rhino
python -m compas_rhino.install
Code convention follows PEP8 style guidelines and line length of 120 characters.
-
Check adherence to style guidelines
invoke lint
-
Format code automatically
invoke format
Documentation is generated automatically out of docstrings and RST files in this repository
-
Generate the docs
invoke docs
-
Check links in docs are valid
invoke linkcheck
-
Open docs in your browser (file explorer ->
dist/docs/index.html
)
Tests are written using the pytest framework
-
Run all tests from terminal
invoke test
-
Or run them from VS Code from the
Testing
tab
We use Grasshopper Componentizer to develop Python components that can be stored and edited on git.
-
Build components
invoke build-ghuser-componentspip
-
Install components on Rhino
python -m compas_rhino.install
Releases follow the semver versioning convention.
-
Create a new release
invoke release major