Skip to content

Commit 4b4e2e1

Browse files
committed
Improve instructions on how to run tests and set up a dev environment
1 parent b5f4c82 commit 4b4e2e1

2 files changed

Lines changed: 40 additions & 18 deletions

File tree

src/blenderbim/docs/devs/installation.rst

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,15 @@ uninstalling the old add-on, and installing a new build is a slow process.
6060
Although it works, it is very slow, so we do not recommend it.
6161

6262
A more rapid approach is to follow the **Unstable installation** method, as this
63-
provides all dependencies for you out of the box. Then, we can replace certain
64-
Python files that tend to be updated frequently with those from the Git
65-
repository. We're going to use symlinks (Windows users can use ``mklink``), so
66-
we can code in our Git repository, and see the changes in our Blender
67-
installation (you will need to restart Blender to see changes).
63+
provides all dependencies for you out of the box.
6864

69-
In addition, we're also going to replace the Python code of the IfcOpenShell
70-
dependency with our Git repository, since most of the BlenderBIM Add-on
71-
functionality is agnostic of Blender, and is actually part of IfcOpenShell.
72-
Therefore, we need to keep this dependency highly updated as well.
65+
Once you've done this, you can replace certain Python files that tend to be
66+
updated frequently with those from the Git repository. We're going to use
67+
symlinks (Windows users can use ``mklink``), so we can code in our Git
68+
repository, and see the changes in our Blender installation (you will need to
69+
restart Blender to see changes).
7370

74-
The downside with this approach is that if a new dependency is added, or a
75-
compiled dependency version requirement has changed, or the build system
76-
changes, you'll need to fix your setup manually. But this is relatively rare.
71+
For Linux or Mac:
7772

7873
::
7974

@@ -98,7 +93,14 @@ changes, you'll need to fix your setup manually. But this is relatively rare.
9893
$ ln -s src/ifcopenshell-python/ifcopenshell/api /path/to/blender/X.XX/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/api
9994
$ ln -s src/ifcopenshell-python/ifcopenshell/util /path/to/blender/X.XX/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/util
10095

101-
On Windows:
96+
# Manually download some third party dependencies
97+
$ cd /path/to/blender/X.XX/scripts/addons/blenderbim/bim/data/gantt
98+
$ wget https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.js
99+
$ wget https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.css
100+
$ cd /path/to/blender/X.XX/scripts/addons/blenderbim/bim/schema
101+
$ wget https://github.com/BrickSchema/Brick/releases/download/nightly/Brick.ttl
102+
103+
Or, if you're on Windows:
102104

103105
::
104106

@@ -123,15 +125,31 @@ On Windows:
123125
$ mklink /D "\path\to\blender\X.XX\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\api" "src\ifcopenshell-python\ifcopenshell\api"
124126
$ mklink /D "\path\to\blender\X.XX\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\util" "src\ifcopenshell-python\ifcopenshell\util"
125127

128+
# Manually download some third party dependencies
129+
$ cd /path/to/blender/X.XX/scripts/addons/blenderbim/bim/data/gantt
130+
$ curl https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.js -outfile jsgantt.js
131+
$ curl https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.css -outfile jsgantt.css
132+
$ cd /path/to/blender/X.XX/scripts/addons/blenderbim/bim/schema
133+
$ curl https://github.com/BrickSchema/Brick/releases/download/nightly/Brick.ttl -outfile Brick.ttl
126134

127135
After you modify your code in the Git repository, you will need to restart
128136
Blender for the changes to take effect.
129137

130-
There is a useful Blender Addon that adds a Reboot button in File menu.
131-
In this way, it's possible to directly restart Blender and test the modified source code.
132-
The add on is available `here <https://blenderartists.org/uploads/short-url/yto1sjw7pqDRVNQzpVLmn51PEDN.zip>`__
133-
(check also the related forum discussion `here <https://blenderartists.org/t/reboot-blender-addon/640465/13>`__)
134-
There is also a VS Code called `Blender Development <https://marketplace.visualstudio.com/items?itemName=JacquesLucke.blender-development>`__ that has a similar functionality.
138+
The downside with this approach is that if a new dependency is added, or a
139+
compiled dependency version requirement has changed, or the build system
140+
changes, you'll need to fix your setup manually. But this is relatively rare.
141+
142+
.. seealso::
143+
144+
There is a `useful Blender Addon
145+
<https://blenderartists.org/uploads/short-url/yto1sjw7pqDRVNQzpVLmn51PEDN.zip>`__
146+
(see `forum thread
147+
<https://blenderartists.org/t/reboot-blender-addon/640465/13>`__`) that adds
148+
a Reboot button in File menu. In this way, it's possible to directly
149+
restart Blender and test the modified source code. There is also a VS Code
150+
add-on called `Blender Development
151+
<https://marketplace.visualstudio.com/items?itemName=JacquesLucke.blender-development>`__
152+
that has a similar functionality.
135153

136154

137155
Distro installation

src/blenderbim/docs/devs/running_tests.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ and also check simple property and scene changes.
122122
Before running these tests, follow the instructions for running tool tests
123123
above.
124124

125+
You will also need to enable the **Sun Position** add-on, as it is required to
126+
test georeferencing features: ``Edit > Preferences > Add-ons`` and enable
127+
**Lighting: Sun Position**.
128+
125129
.. code-block:: bash
126130
127131
$ cd src/blenderbim/

0 commit comments

Comments
 (0)