Skip to content

Changelog

All the notable changes to the extension, from the latest version to the first.

  • A live run can watch parameters. The Watched parameters panel pins parameters from a list with checkboxes and shows their value at the time step and scenario shown on the schematic. Pywr v2 reads the pinned parameters from the state of the run, without adding them to a metric set.
  • Run a risk analysis on pywr v2 models, with the same options and results file as pywr v1. The results file is written by a script shared by both versions, which needs PyTables in the selected environment.
  • The results viewer hides the chart type and the aggregation by month or year for the percentiles of a risk analysis, which are always charted as daily bands.
  • A live run of a pywr v1 model lists the selected node and the nodes on its route by their cost per unit flow at the shown time step, from the most to the least wanted. The route is coloured on the schematic, and the costs are read from pywr, so a cost set with a parameter has its value at that time step.
  • A model whose JSON cannot be read keeps its status bar item, which says so and opens the Problems panel. The Model view says it shows the last valid version of the model.
  • Opening a Pywr v1 model asks before normalising it instead of rewriting the file. The prompt says how many values change and can turn the setting off for the workspace.
  • The delete dialogs name the component and use Delete and Cancel buttons. The rename box says which component is renamed.
  • Run errors caused by the Python environment have a Select Interpreter button. Every other run error, including the Pywr v2 ones, has a Show details button.
  • Deleting or renaming a component while the file has errors says so before any confirm dialog, with a Show problems button. Before, the dialog came from the last valid model and the command then failed.
  • The Add Edge steps show their number and have a Back button, which keeps the earlier answers. The command also stops early when the file has errors.
  • The pick of the components to export has a Don’t ask again item, so a run of a model without outputs reuses the last selection. Run with Options always asks.
  • The property rows of the Model view show their value instead of its type. The tooltips list the name, the type and the first properties of a component instead of its JSON.
  • Cancelling a Pywr v2 run keeps the results of the time steps already run, and the message offers to open or delete them. A run stopped before its first time step still deletes its new folder.
  • The not show meta key in the tree tooltips. Also key using Literal values show the number rather than “Literal”
  • The tooltip of a tree item no longer counts the hidden meta key among the properties it lists or in the number of the remaining ones.
  • The hover of a component escapes its comment and type, so a shared model cannot add links or remote images to it.
  • The schematic shows “Loading the schematic…” while loading, like the other views.
  • The view and shape panels of the schematic toolbar close when the user clicks outside of the toolbar, and not only with Escape.
  • The QA report can show the values of its charts in a table, in the zoomed time range.
  • Compare two versions of a model by component, from a git commit or from two files. The changed components are listed by status and each one opens in a side-by-side diff.
  • The View panel of the schematic can highlight the routes of the selected node. The nodes and edges that can send it water are green, the ones it feeds are red and the rest of the network is dimmed.
  • A live run of a pywr 1 model names its scenarios like the results viewer, with the names of the ensembles or their index, so that the same scenario has the same name in both.
  • The node names and the status of a node in a live run on the schematic have enough contrast to be read in the light and dark themes. The names of black nodes are now visible in the dark theme.
  • The schematic toolbar, its panels and the results panel fit in a narrow editor. The toolbar buttons only show their icon, the minimap is hidden and the panels shrink or wrap instead of being cut.
  • The panels, the canvas, the minimap and the zoom buttons of the schematic use the colours of the VS Code theme.
  • The schematic is not drawn again at every time step of the results or of a live run, only the panel, the nodes and the edges that show the values.
  • A node can be added to the schematic with a click or the keyboard, and the menus of the schematic can be used with the keyboard. The end of an arrow no longer stays stuck when its drag is interrupted.
  • The schematic does not animate the selected nodes and edges, the loading spinner or the move to a node when the system asks for reduced motion.
  • The forms use the colours of the VS Code theme, including the high contrast themes, and follow a theme change without being reopened. The warnings are easier to read in the light themes.
  • Screen readers read the name of each field of the forms, and the focused field always shows the focus outline of VS Code. Save errors are announced, the toolbar tooltips also show on keyboard focus and long component names wrap.
  • The grid and the axis of the charts use the colours of the VS Code theme, and the axis has the border colour of a high contrast theme. The charts are drawn again when the theme changes for another one of the same kind.
  • When a chart needs a wider y axis, the other charts only resize their axis instead of being drawn again from scratch.
  • The results viewer and the QA report are easier to use with a keyboard and a screen reader: the buttons show the focus ring of the theme, the charts and the colour swatches have a name, and the errors are announced. The buttons shown on hover are always shown without a mouse, the small buttons are larger, and the legend of the bands no longer has buttons that do nothing.
  • The filters of the list of components in the QA report go below the search field when the editor is narrow.
  • The colour picker, the lists of the selects and the scroll bars of the results viewer and the QA report are dark with a dark theme.
  • In the high contrast themes, the names and borders of the nodes on the schematic use the colours of the theme. The selected node has the active contrast border.
  • The schematic only allows the scripts and styles of Leaflet from unpkg.com, instead of any file of the site.
  • The configuration in the tooltip of the tree items is built when the item is hovered, and backticks in a value no longer break it.
  • The forms show a loading text until they are ready, and screen readers announce the loading text and use the language of VS Code.
  • The tree and the problems of a model no longer go back to an older text when the check of an older text ends after the check of the newer one.
  • A pywr 1 run with an output folder stops with an error when two recorders save files with the same name, instead of one file replacing the other.
  • The schema used to find the references of the components is read once when two models are opened together, and read again when it could not be read.
  • A component can have a name of one letter, as pywr allows. Adding, renaming and renaming a duplicated component check the name in the same way.
  • A run updates its progress and its log once per percent instead of at each time step, so that long runs are faster.
  • The status bar item shows a warning icon and tells screen readers when the model has errors, instead of showing it only with its colour. The pages of the panels declare their language.
  • The icon of a form follows a theme change without reopening the form, and the default icons use the colour of the theme. The Python classes have an icon in the light themes.
  • The tabs of the forms, the schematic and the QA report show an icon: a form shows the icon of its component. The model settings, the project and the included files have their own icon.
  • The Save button of the forms stays at the bottom of the view and the form scrolls above it, so long forms can be saved without scrolling to the end.
  • An invalid number, an option that is not in the list and a required field that is not set show what is wrong under the field. Before, the field only had a warning border, and the browser explained the number only on hover.
  • Pywr v2 projects can be run from their manifest, which builds the model of a definition next to it and opens it. Run live on the schematic of a base model asks for a definition and runs its model live on its own schematic. Manifests named pywr-project.json or *.pywr-project.json get completion and validation.
  • The new Edit the project command opens a form to edit a pywr v2 project manifest, suggesting the base model, the network set folders and their JSON files from the project. Each definition has a button to build its model.
  • The component names and their references are coloured in the JSON file of a model, with a colour for each component type (for example the nodes in green). The colours can be changed with the pywr.componentName colours and turned off with the pywr.highlightComponentNames setting.
  • During a live run, the schematic shows a node whose maximum flow is zero in grey with the label blocked, as its route is blocked.
  • When a pywr v1 run fails, the error is shown in the Problems panel on the node, parameter or recorder that it names. Common errors, such as an infeasible model, also get a hint on how to fix them.
  • A live run can run until a condition is met: an output node has a deficit, a storage node is below a percentage of its maximum volume, or a date is reached. The run pauses on the first time step that meets the condition. The native controls of the schematic, such as the calendar, now follow a dark theme.
  • Support the pywr 2.0.0-rc1 format, where models have “time” and “time_series” and outputs and metric sets are named in “meta”. The forms add the phase of parameters, the new Reservoir compensation, spill and outflow, the Difference parameter, the ArrowStream and Placeholder outputs, the Python, Arrow, Parquet and Placeholder timeseries, the Placeholder table, tags and the local parameter of another node, and show the provenance. The schematic names a node’s default slot (Storage or River) and shows the River slot of a reservoir, and the Python timeseries suggest data files, modules and functions.
  • Pywr v2 models run in a separate process instead of the extension host, so a model whose Python code imports numpy, pandas or pyarrow no longer crashes and freezes VS Code, and a run can be stopped during a long time step. A run checks the model with the pywr validation first and its errors list every problem and their causes. The modules of the model folder can be imported by name, and the modules of the model run before are forgotten.
  • The results viewer opens the Arrow stream files written by the ArrowStream output of pywr v2, from the Explorer, the file picker and the results of a run.
  • The pywr-model skill describes and checks the pywr 2.0.0-rc1 format, with the time and time_series sections, the names in meta, the phase of parameters and the Reservoir slots.
  • The QA report of a pywr v2 model saves its results to an Arrow stream file instead of an HDF5 file, which is faster to write and read.
  • Rectangles, arrows and text can be drawn on the schematic from the Add shape button, with their border, fill and text colours. The shapes are saved in a top-level “shapes” list of the model file and are hidden on the map.
  • The new pywr.schematic.openWithModel setting opens the schematic next to a pywr model when its JSON file is opened, keeping the focus on the editor. Models without nodes are skipped.
  • Water treatment works nodes are yellow on the schematic of pywr v1 and v2 models.
  • When a pywr v2 run fails, the error says what the run was doing and the date of the failed time step. The node, virtual node, parameter, metric set or output named in the error is underlined in the editor until the model is edited or run again.
  • The pywr process reports when it cannot start, a stopped run retries deleting its folder on Windows, and the model folder is first in the Python path so its modules are not shadowed. The solvers are read once.
  • Local parameters in pywr 2 no longer show the Variable field.
  • Added the Edit, Rename, Remove and Go to definition actions above each reference to a component in the JSON file. They can be turned off with the pywr.codeLens.referenceActions setting.
  • In the forms, the buttons next to the name of a component used by the edited one open the form of that component or go to its JSON definition.
  • Added the “Move to named parameter” action for the inline parameters of a pywr v1 model, in the JSON file and in the forms. The parameter is moved to the parameters of the model and named after the component and the attribute using it (for example “Node cost”); the form is then saved.
  • Added the pywr-model agent skill, which GitHub Copilot gets from the extension, to build, check and explain Pywr models. The “Pywr: Install the skill for Claude Code” command copies it to the skills folder of Claude Code, for all projects or for a workspace folder.
  • In the forms, the minimum and maximum of a number are applied when the box loses the focus, so typing 150 in a box with a minimum of 2 no longer gives 250. The column of a pywr v1 component keeps its position as a number, and moving a list item no longer leaves a text being typed on another item. The values of a scenario profile are only rendered while its ensemble is open.
  • The preview and the column suggestions of the same data file share one request to read the file.
  • Fixed import sort in render
  • Draw the rule curves of a storage node with its relative volume in the results viewer.
  • Added the command to open the documentation of Pywr v1, Pywr v2 or the extension.
  • Draw the rule curves of a Pywr v1 storage node with its absolute volume.
  • Support the Pywr v1 components and keys added up to version 1.31.1.
  • Save the JSON file when the model is changed from a form, the schematic or a tree. The normalisation applied when a model is opened is still left unsaved.
  • Let the user choose the chart of each metric in the results viewer, instead of splitting the charts by attribute. Charts can be added, renamed, reordered and removed, and a rule curve moved off the chart of its reservoir is drawn as any other metric.
  • Added a primary model for the workspace, set with a star at the top of the Model view or by right-clicking a JSON file in the Explorer and saved in the pywr.primaryModel setting. The views, the status bar and the commands use it when the file in the editor is not a model or no file is open.
  • The live run of a pywr v2 model now reads the maximum flow of the Abstraction, Turbine and PiecewiseLink nodes. The maximum flow of a PiecewiseLink is the sum of the ones of its steps.
  • When a model does not save results (a pywr v2 model without outputs or with memory outputs only, or a pywr v1 model without a recorder that writes a file), the run asks the components to export and saves them to results.h5 without changing the model file. The attributes of each pywr v2 node can be picked and the last selection of a model is remembered. The command is now named “Run the model”.
  • An edit from a form, the schematic or a tree is now refused when the JSON file has a syntax error. The position of the components was read from an older text and the change could overwrite another component.
  • Deleting a component from a list now deletes one item for each configuration. A duplicated node or edge was deleted with its copy.
  • The components of the Cython modules are now cached for each list of modules. Two visible pywr v1 models with different modules started a new Python process again and again.
  • The command to add an output now tells the user to add a metric set first when the model has none, instead of showing an empty list. The commands that add an output, an edge or a metric set now wait for the change to report its errors.
  • The QA report now shows an error when its file cannot be saved before a run, instead of doing nothing.
  • In the results viewer, the metrics that are no longer in the file do not take one of the 12 places, and the rule curves are added only with the volume of their storage node and no longer remove other metrics. The series are not read above 50 million values, the constant rule curves are removed with their volume and the zoomed range shows the time of the first and last time step.
  • The view saved for a schematic on the map is restored only when the nodes still have the same canvas positions, otherwise the view is fit to the nodes. The results of a file stay usable when a live run cannot be started, and a message is shown when the map cannot be loaded. Fixed the loading screen of a model with only hidden virtual nodes, the edge colours without shades and the border of the target slot labels.
  • In the run menu of the editor, “Run the model with options…” comes straight after “Run the model”. The risk analysis was listed between the two for a pywr v1 model.
  • The size of an external file is shown with a space before the unit (“12 KiB” instead of “12KiB”).
  • Changed the icon in rename actions so it is now clearer what the action performs in the network tree
  • The buttons of the toolbar of the results viewer and of the QA report now show a text next to the icon, so that they are easier to tell apart. The buttons of each chart show a text too.
  • The QA report now shows the path of the file the results are read from, in the view and in the exported PDF.
  • The schematic was optimised and now loads 10x faster on large models
  • The schematic toolbar has a new View button to show or hide the virtual nodes, their connecting lines and the node names, and to resize the nodes. The options are saved in the workspace settings or, when no workspace is open, in the user settings.
  • The extension is now available for MacOS (ARM only) and Linux
  • Merged the Network, External data and Search views into one Model view. The tables, timeseries and Python files are now groups of the same tree, which is filtered by name or type with the search button or Ctrl/Cmd+F.
  • The time of a run is now shown correctly: a run of one minute was shown as 60 seconds and the seconds of a longer run had many decimals. The seconds are rounded when a run takes a minute or more.
  • A pywr v2 run that is stopped or fails now closes its output files before its new results folder is deleted. Windows does not delete a folder with open files.
  • Two models with the same path in different folders of a multi-root workspace no longer share the schematic view and the results of the last run. The saved views and results of the previous versions are not used anymore.
  • The tooltip of a node in the schematic now stays hidden when the node is selected or dragged.
  • The icon in a Link node disappeared on hover for pywr v1
  • A model with duplicated edges was showing additional handles and connected the edge on the node centre rather than on the connected slot
  • The pywr.schematic.showEdgeLabelOnHover setting was ignored and the edge label was always shown on hover.
  • Go to JSON now shows the document in the editor group where it is already open. It was opened a second time next to the form when the form had the focus.
  • The forms of the control curve parameters of pywr v1 and v2 models no longer show a chart of the values
  • Show and highlight the name of a component that is not in the model in the metric and bathymetry fields, instead of showing the first name of the list
  • Keep the changes made to the document when a form with edits is saved, and fixed the values saved by the form
  • Do not move the state of a removed list item to the next item
  • Keep the edits made to a form while a checksum is computed
  • Do not request the preview of a file when no file is set
  • Always reply to a form when saving a component fails
  • Do not lose the entries of a dictionary while a key is typed in a form, and fixed other values saved by the forms
  • Accept only whole numbers in the form fields set to an integer
  • Do not blank the schematic when a results file has no time steps, and stop playing the time steps when other results or a live run are shown
  • Leave the connecting mode, the menu and the panel to add a node of the schematic only with the Escape key, and keep the selected nodes and edges when the model changes
  • Check the map library loaded by the schematic against its hash
  • The toolbar of the schematic can now be used with the keyboard
  • Reply to all the messages of the schematic so that it does not keep them in memory
  • Do not draw all the nodes and edges of the schematic again when one node is moved or selected
  • The results viewer no longer goes blank when two scenarios of a results file have the same label, and the QA report now draws the scenario that is picked
  • A scenario or a metric hidden in the legend of the results viewer can now always be shown again
  • The duration curve of a series with missing values now covers the whole time, for example when the results are compared with a shorter run
  • The QA report no longer asks to run the model again for the components that are not in the model anymore
  • The charts of the results viewer are no longer drawn again each time the zoom changes
  • The zoom of the results viewer is now reset when the results file is written again with other dates
  • The results viewer now says when the group filters hide all the checked scenarios
  • The charts of monthly results now have a tick for each month
  • The results viewer now lists the first 100 components of a large results file and the others are found with the filters
  • The names with characters outside Latin-1 are now written in the PDF of the QA report
  • The run summary now shows the time of the solver, the recorders and the components. The runner no longer crashes with a number of threads below 1 or too large for the machine.
  • A wide CSV results file with a repeated column no longer returns series with two values for each time step
  • The schematic and the forms no longer undo an edit or write a wrong JSON when the tab of the model is closed. An edit made straight after another change is no longer saved to a different component.
  • A file that changes in the background (for example a results file written by a run) no longer empties the trees and hides the status bar and the run button of the open model. The problems that were fixed are now removed from the models that are not in the active editor.
  • A pywr v2 model run without options now saves its results on Windows, where the name of the new folder was not valid. The empty folder of a run without outputs is now deleted.
  • A pywr v2 run now uses the Python modules in the folder of the model as they are saved, instead of the ones imported by the first run.
  • The errors are now written to the Pywr output channel with their message instead of an empty object. The warnings of the reference lookup are written to the same channel.
  • The prompts for a number no longer accept values such as 2.7 or 3abc, and the lookup of a new table no longer accepts 0 rows or columns.
  • A duplicated component name is now reported also when a component before it has no name.
  • Closing a schematic no longer stops the commands of another open schematic from working.
  • The trees are built faster for large models. The Python files of the workspace are no longer opened as documents to list their classes and functions.
  • Deleting a pywr v1 parameter, recorder or table no longer deletes the other components with the same configuration
  • The run of a pywr v2 model no longer freezes the editor and can be stopped with the Cancel button. The progress bar now advances with the time steps
  • The problems of a model are no longer missing when two models are opened or changed at the same time
  • The “Edit” action above a component now opens the right component when another one has the same configuration
  • Deleting a component no longer changes the formatting of the other components in the same list
  • A pywr v1 model is now normalised only when it is opened and not while it is edited
  • The forms, the search view and the schematic now have a Content Security Policy, and the text of the search is escaped in the search view
  • The extension no longer keeps in memory the theme listener of a closed schematic and the schema of a closed model
  • Answering “No” or “Show me where it’s used” when deleting a component that is still used no longer asks to confirm the deletion again
  • The actions above the components and the deletion of several nodes from the schematic are faster in large models
  • The zoom and the position of a schematic are now saved for each workspace, so that models with the same path in different workspaces no longer share them
  • The risk analyser is now implemented for pywr v1 models and can be run by clicking the “Run” button in VSCode. The tool exports the run raw data as well as percentiles, and generate charts for all model reservoirs
  • The schematic can now run pywr v1 and v2 models live with the “Run live” button. Step through the run or play it to see the flow of each node and the volume of the storage nodes without a results file. A node at its maximum flow gets an orange outline and an output node with a deficit a red outline with the missing flow
  • Added commands to create Python scripts: run a pywr v1 or v2 model, open the HDF5 file of a DataFrameParameter, open a TablesRecorder file with h5py, and a documented custom parameter in Python and Cython for pywr v1
  • The QA report is available for pywr v1 models: the nodes and the named parameters on the charts are exported with a TablesRecorder added by the run script. Each model format now declares how it supports the report, and the components that are not in the model anymore are not exported
  • Added the website of the extension, built with Astro and Starlight: a landing page with the features drawn along a river, the theme of the documentation, and the scripts that write the changelog page, optimise the screenshots and check that every command, setting and shortcut is documented
  • Compiled Cython modules can be loaded in pywr v1 models. The modules are set in the pywr.v1.cythonModules setting of the workspace, with the “Manage Cython Modules” command or by right-clicking a .so or .pyd file in the Explorer, and are imported by the run script before the model is loaded. The classes they register in pywr are collected with the selected Python environment and are recognised as custom components when the model is validated
  • Virtual storages are now rendered on the schematic for a pywr1 model and show the dependence from other nodes
  • When the Python Environments extension only returns a global interpreter, the environment set in python.defaultInterpreterPath or a .venv folder next to the model or in the workspace is used to run the model
  • Change the “Results” and “Virtual nodes” icon colour as the icon was blue on blue background and icon was therefore not fully visible
  • When the status bar flags there are model validation errors, the click action now focus on the Problem panel
  • The schematic shows a relative storage (pywr v2 ProportionalVolume, or a pywr v1 volume not above 1) as a percentage and uses it for the storage bar. The attribute of the result is shown next to the value of a node
  • Added a dropdown on the schematic nodes to change the result attribute when a pywr v2 node exports more than one
  • Added warnings for pywr v2 models that the schema cannot check: nodes with no edges, edge slots a node does not have, unused parameters, tables and timeseries, metric sets not saved by an output, lists with lengths that do not match and scenario groups not matching their size. The warnings do not mark the model as having errors
  • Added the “Run the model with options” command to pick the solver, the scenarios to run and the output folder, remembered for each model. The pywr v2 runner is built with the HiGHS, CBC and microlp solvers in addition to CLP. The model is saved before it is run
  • Added typed editors for the pywr v1 fields edited as JSON (index columns, dates to parse, sheet name, row index, optimisation bounds of the profiles and slot factors set as a parameter). The solver and the scenario combinations can be set in the model settings form
  • When the schematic is empty (i.e. it contains no nodes), the user is now asked to select which schematic type they would like to open: default to set the node x and y coordinates or the map to set lat and long coordinates
  • The pywr v2 runner can change the model before it is run and run without showing the results message, and returns the output folder
  • Added the QA report for pywr v2 models: charts saved next to the model (model.qa.json) with the components to check. The report runs a copy of the model to export only those components, draws the charts with custom line colours and styles, and exports them as PDF
  • Fixed the test:run command, which did not compile the extension
  • The results of a pywr v2 run could not be opened because the output files were not closed at the end of the run
  • The map no longer reloads or shifts when a node is moved.
  • Added package icon and improved marketplace metadata
  • When user click on an item in the search panel, it now opens the edit form. An inline icon allows the user to go to the JSON configuration block
  • Added rename, go to definition, references, hover, completion, symbols, quick fixes and code lens actions for the model JSON
  • Sync the selection between the schematic and the Network tree. The search matches the component types and shows a result on the schematic
  • Added the new model command, keybindings, a walkthrough and right-click menus in the trees. The run command works when a schematic or a form has the focus
  • Do not report the files written by the pywr v1 CSV and tables recorders as missing
  • Added the scenario groups to the pywr v2 format
  • Added forms for virtual nodes and scenario groups (pywr v2)
  • Show the virtual nodes on the schematic (pywr v2)
  • Open the component forms from the trees and improve the schematic
  • Add the pywr v1 rules ported from the pywr-editor forms
  • Validate the Keating aquifer, control curve bounds and weighted profiles
  • Chart the HDF5 and CSV results of pywr-2 models
  • Chart the pywr-1 TablesRecorder results and improve the chart styles
  • Link results to the model, add analysis views and preview data in the forms
  • Show the results on the schematic and the dependencies of a component
  • Edit the row and column of table metrics in the forms
  • Added forms for edges and model settings, and checksum computation
  • Open forms and run tree actions from the schematic
  • Open the form after adding a component
  • Improve pywr v1 normalisation, inline forms and schema diagnostics
  • Align the pywr v1 schema and forms with the keys pywr loads
  • Suggest the columns of pywr-1 tables and edit their index columns as a list
  • Exclude build scripts from vscode package