Settings
Open the settings with File > Preferences > Settings (Code > Settings > Settings on macOS) and search for Pywr. The settings are under Pywr Extension.
| Setting | What it does | Default |
|---|---|---|
pywr.expandTreesOnOpen |
Expand the Model tree when you open a model. Turn it off for a large model. | true |
pywr.tree.followCursor |
Select in the Model tree the component at the cursor of the JSON editor. | false |
pywr.primaryModel |
The primary model of the workspace, as a path relative to the workspace folder. Set it with the star at the top of the Model view. | Not set |
pywr.codeLens.componentActions |
Show the Edit, Show on schematic and usages links above each component in the JSON file. Turn it off for a large model. | true |
pywr.codeLens.referenceActions |
Show the Edit, Rename, Remove and Go to definition links above each name that refers to a component in the JSON file. Turn it off for a large model. | true |
pywr.highlightComponentNames |
Colour the component names, and the places where they are referenced, in the JSON file with a colour for each component type (for example the nodes in green). Change the colours with the pywr.componentName.* colours of workbench.colorCustomizations. |
true |
pywr.openFormOnAdd |
Open the form of a node, a parameter, a recorder, a timeseries or a table straight after you add it with a command, to edit its default values. | true |
pywr.schematic.openWithModel |
Open the schematic next to a model when you open its JSON file. A model without nodes is skipped. | false |
pywr.schematic.showEdgeLabelOnHover |
Show the nodes and the slots an edge connects when you hover it on the schematic. | true |
pywr.schematic.showVirtualNodes |
Show the virtual nodes on the schematic. Also changed with the View button of the schematic toolbar. | true |
pywr.schematic.showVirtualLinks |
Show the dashed lines between the virtual nodes and the nodes they refer to. Also changed with the View button. | true |
pywr.schematic.showNodeNames |
Show the names of the nodes on the schematic. Also changed with the View button. | true |
pywr.schematic.highlightRoutes |
When a node is selected, colour the nodes and edges that can send it water in green and the ones it feeds in red, and dim the others. Also changed with the View button. | false |
pywr.schematic.nodeSize |
The scale of the nodes on the schematic, from 0.5 to 2. Also changed with the View button. |
1 |
pywr.runner.threads |
The number of threads used to run a model. The most you can use depends on your machine. | 3 |
pywr.normaliseModelOnOpen |
Offer to rewrite a Pywr v1 model when you open it: the short type names of parameters and recorders become the pywr class names (constant becomes ConstantParameter) and the control_curve key of the control curve parameters becomes control_curves. |
true |
pywr.v1.cythonModules |
The compiled Cython modules (.so or .pyd files) to import before a Pywr v1 model is loaded and run. A relative path is relative to the workspace folder. |
[] |
pywr.enableLogging |
Write a log to the Pywr output channel. Turn it on to report a problem. | false |
Settings for one project
Section titled “Settings for one project”A setting changed in the Workspace tab of the settings is saved in the
.vscode/settings.json file of your folder, and applies to that folder only. This is
useful to turn off the links above the components and the references for one large model:
{ "pywr.codeLens.componentActions": false, "pywr.codeLens.referenceActions": false, "pywr.expandTreesOnOpen": false}