Improve docs (#7005)
@@ -27,6 +27,7 @@ and ensure new Python syntax doesn't break code on older Python versions.
|
||||
``ruff`` can be installed using ``pip install ruff`` and files can be formatted with the following example commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Check issues for the entire repository.
|
||||
ruff check
|
||||
# Apply some automatic fixes, if available.
|
||||
|
||||
@@ -10,7 +10,7 @@ this can be expanded by others.
|
||||
the debugger overhead.
|
||||
|
||||
VSCode Extension
|
||||
--------------
|
||||
----------------
|
||||
|
||||
1. **Install VSCode/VSCodium**: This will be system specific. I used the
|
||||
available snap package.
|
||||
@@ -135,7 +135,7 @@ when troubleshooting issues, and able to make many more contributions, fixes
|
||||
and patches.
|
||||
|
||||
Blender Addon + VS Code Debugger
|
||||
------------------------------
|
||||
---------------------------------
|
||||
|
||||
Setting up debugging with Blender Addon is a bit simpler as it doesn't require Blender to be started in a special way
|
||||
and debugger can be always attached later when it's needed.
|
||||
|
||||
@@ -7,8 +7,8 @@ suggesting new features, or contributing code, your involvement is highly encour
|
||||
|
||||
This part of the documentation covers various aspects of the Bonsai development process, including:
|
||||
|
||||
- :doc:`Writing User Documentation </contribute/writing_docs>`
|
||||
- :doc:`Translations and Internationalisation </contribute/translations>`
|
||||
- :doc:`Writing User Documentation </guides/development/writing_docs>`
|
||||
- :doc:`Translations and Internationalisation </guides/development/translations>`
|
||||
- Contributing Code
|
||||
- :doc:`Installation and Setting up a Development Environment </guides/development/installation>`
|
||||
- Understanding the Project Structure and Codebase
|
||||
|
||||
|
After Width: | Height: | Size: 458 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 489 KiB |
|
After Width: | Height: | Size: 345 KiB |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 171 KiB |
|
After Width: | Height: | Size: 318 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 305 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 617 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 230 KiB |
|
After Width: | Height: | Size: 232 KiB |
|
After Width: | Height: | Size: 115 KiB |
|
After Width: | Height: | Size: 233 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 411 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 205 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 822 KiB |
|
After Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 389 KiB |
|
After Width: | Height: | Size: 210 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 510 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 133 KiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 113 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 173 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 267 KiB |
|
After Width: | Height: | Size: 374 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 314 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 423 KiB |
|
After Width: | Height: | Size: 301 KiB |
|
After Width: | Height: | Size: 403 KiB |
|
After Width: | Height: | Size: 160 KiB |
|
After Width: | Height: | Size: 298 KiB |
|
After Width: | Height: | Size: 176 KiB |
|
After Width: | Height: | Size: 173 KiB |
|
After Width: | Height: | Size: 628 KiB |
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 154 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 251 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 261 KiB |
|
After Width: | Height: | Size: 511 KiB |
|
After Width: | Height: | Size: 430 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 411 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 409 KiB |
|
After Width: | Height: | Size: 195 KiB |
|
After Width: | Height: | Size: 248 KiB |
|
After Width: | Height: | Size: 396 KiB |
|
After Width: | Height: | Size: 76 KiB |
@@ -0,0 +1,15 @@
|
||||
Exploring Bonsai Sourcecode
|
||||
===========================
|
||||
|
||||
Here are quickstarts to help contribute to Bonsai either by troubleshooting or proposing new features for either the srouce code or the documentation.
|
||||
|
||||
.. container:: global-index-toc
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
:maxdepth: 2
|
||||
|
||||
linux_ide
|
||||
windows_ide
|
||||
macos_ide
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
#!/bin/bash
|
||||
# Please update REPO_PATH and BLENDER_PATH in the script below.
|
||||
# Default BLENDER_PATH on Mac: "/Users/$USER/Library/Application Support/Blender/4.5"
|
||||
# Default BLENDER_PATH on Linux: "$HOME/.config/blender/4.5"
|
||||
# REPO_PATH="/path/to/where/your/git/repository/is/cloned/IfcOpenShell"
|
||||
set -e
|
||||
REPO_PATH="$HOME/bonsaiDevel/IfcOpenShell"
|
||||
BLENDER_PATH="$HOME/.config/blender/4.5"
|
||||
PACKAGE_PATH="${BLENDER_PATH}/extensions/.local/lib/python3.11/site-packages"
|
||||
# If you are installing offline, use this instead:
|
||||
# BONSAI_PATH="${BLENDER_PATH}/extensions/user_default/bonsai"
|
||||
BONSAI_PATH="${BLENDER_PATH}/extensions/raw_githubusercontent_com/bonsai"
|
||||
|
||||
# Changing to the Git repository directory
|
||||
cd "${REPO_PATH}"
|
||||
|
||||
|
||||
# Add files that need to be ignored in push to GiHub (.gitignore). Namely *.so files are very big and do not need to be pushed
|
||||
FILE=".gitignore"
|
||||
STRING="*.so"
|
||||
|
||||
# Check if the file exists and contains the string
|
||||
if [ ! -f "$FILE" ] || ! grep -qxF "$STRING" "$FILE"; then
|
||||
echo "$STRING" >> "$FILE"
|
||||
echo "Added '$STRING' to $FILE"
|
||||
else
|
||||
echo "'$STRING' already exists in $FILE"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Print summary of PATHs
|
||||
echo "Please review if the following is right:"
|
||||
echo "PWD: ${PWD}"
|
||||
echo "REPO PATH (...../IfcOpenshell): ${REPO_PATH}"
|
||||
echo "BLENDER PATH: ${BLENDER_PATH}"
|
||||
echo "PACKAGE PATH (...../etensions/.local/lib/python3.11/site-packages): ${PACKAGE_PATH}"
|
||||
echo "BONSAI PATH (...../extensions/raw_githubusercontent_com/bonsai): ${BONSAI_PATH}"
|
||||
read -p "Press any key to START or CTRL-C to stop ..."
|
||||
|
||||
# Copy over compiled IfcOpenShell files
|
||||
for src_file in "${PACKAGE_PATH}/ifcopenshell/"*_wrapper*; do
|
||||
dest_file="${PWD}/src/ifcopenshell-python/ifcopenshell/$(basename "$src_file")"
|
||||
# Only copy if source and destination are not the same file
|
||||
if [ "$(realpath "$src_file")" != "$(realpath "$dest_file")" ]; then
|
||||
cp "$src_file" "$dest_file"
|
||||
echo "Copied: $(basename "$src_file")"
|
||||
else
|
||||
echo "Skipped (same file): $(basename "$src_file")"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
# Remove extension and link to Git
|
||||
rm "${BONSAI_PATH}/__init__.py"
|
||||
rm -r "${PACKAGE_PATH}/bonsai"
|
||||
rm -r "${PACKAGE_PATH}/ifcopenshell"
|
||||
rm -r "${PACKAGE_PATH}/ifccsv.py"
|
||||
rm -r "${PACKAGE_PATH}/ifcdiff.py"
|
||||
rm -r "${PACKAGE_PATH}/bsdd.py"
|
||||
rm -r "${PACKAGE_PATH}/bcf"
|
||||
rm -r "${PACKAGE_PATH}/ifc4d"
|
||||
rm -r "${PACKAGE_PATH}/ifc5d"
|
||||
rm -r "${PACKAGE_PATH}/ifccityjson"
|
||||
rm -r "${PACKAGE_PATH}/ifcclash"
|
||||
rm -r "${PACKAGE_PATH}/ifcpatch"
|
||||
rm -r "${PACKAGE_PATH}/ifctester"
|
||||
rm -r "${PACKAGE_PATH}/ifcfm"
|
||||
|
||||
ln -s "${PWD}/src/bonsai/bonsai/__init__.py" "${BONSAI_PATH}/__init__.py"
|
||||
ln -s "${PWD}/src/bonsai/bonsai" "${PACKAGE_PATH}/bonsai"
|
||||
ln -s "${PWD}/src/ifcopenshell-python/ifcopenshell" "${PACKAGE_PATH}/ifcopenshell"
|
||||
ln -s "${PWD}/src/ifccsv/ifccsv.py" "${PACKAGE_PATH}/ifccsv.py"
|
||||
ln -s "${PWD}/src/ifcdiff/ifcdiff.py" "${PACKAGE_PATH}/ifcdiff.py"
|
||||
ln -s "${PWD}/src/bsdd/bsdd.py" "${PACKAGE_PATH}/bsdd.py"
|
||||
ln -s "${PWD}/src/bcf/bcf" "${PACKAGE_PATH}/bcf"
|
||||
ln -s "${PWD}/src/ifc4d/ifc4d" "${PACKAGE_PATH}/ifc4d"
|
||||
ln -s "${PWD}/src/ifc5d/ifc5d" "${PACKAGE_PATH}/ifc5d"
|
||||
ln -s "${PWD}/src/ifccityjson/ifccityjson" "${PACKAGE_PATH}/ifccityjson"
|
||||
ln -s "${PWD}/src/ifcclash/ifcclash" "${PACKAGE_PATH}/ifcclash"
|
||||
ln -s "${PWD}/src/ifcpatch/ifcpatch" "${PACKAGE_PATH}/ifcpatch"
|
||||
ln -s "${PWD}/src/ifctester/ifctester" "${PACKAGE_PATH}/ifctester"
|
||||
ln -s "${PWD}/src/ifcfm/ifcfm" "${PACKAGE_PATH}/ifcfm"
|
||||
|
||||
# Manually download some third party dependencies
|
||||
cd "${PACKAGE_PATH}/bonsai/bim/data/gantt"
|
||||
wget -O jsgantt.js https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.js
|
||||
wget -O jsgantt.css https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.css
|
||||
|
||||
[ -d "$PACKAGE_PATH/bonsai/bim/schema" ] || mkdir -p "$PACKAGE_PATH/bonsai/bim/schema"
|
||||
cd "${PACKAGE_PATH}/bonsai/bim/schema"
|
||||
wget -O Brick.ttl https://github.com/BrickSchema/Brick/releases/download/nightly/Brick.ttl
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
|
||||
{
|
||||
"name": "BonsaiDocsServer",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "/home/falken10vdl/bonsaiDevel/IfcOpenShell/src/bonsai/docs/_build/html",
|
||||
"args": ["-m", "http.server"],
|
||||
"preLaunchTask": "Build and Serve Docs",
|
||||
"console": "integratedTerminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Build and Serve Docs",
|
||||
"type": "shell",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"cd /home/falken10vdl/bonsaiDevel/IfcOpenShell/src/bonsai/docs/; make html; cd _build/html; python3 -m http.server"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||