=======
Changes
=======

.. py:currentmodule:: mhi.xml


What's new in 1.4
=================

1.4.0
-----

- Workspace:

  - Added :meth:`.WorkspaceFile.create`
  - Added :attr:`.WorkspaceFile.version_number`

  - Simulation Sets

    - Added :meth:`.TaskMapping.create`
    - Added :attr:`.SimulationTaskNode.overrides`
    - Added :attr:`.SimulationTaskNode.layer_overrides`

- Project:

  - Allow setting version number during :meth:`.ProjectFile.create`.
  - Added :attr:`.ProjectFile.version_number`.
  - Added :meth:`.ProjectFile.find_by_id`.

  - Layers:

    - Added :meth:`.Layer.custom_states`
    - Added :meth:`.Layer.add_state`
    - Added :meth:`.Layer.remove_state`
    - Added :meth:`.Layer.set_custom_state`

  - Schematic:

    - Added ``raise_if_not_found`` parameter to :meth:`.Schematic.find_by_id`.

  - Components:

    - Added :attr:`.UserCmp.orient`.
    - Added :meth:`.Component.custom_state`
    - Added :meth:`.RowDefn.create_instance` methods.

  - Parameters:

    - Added :meth:`.ParamListNode.create_rows_param` and :meth:`~.ParamListNode.create_table_param`
    - Added :attr:`.ParamNode.rows` and :attr:`~.ParamNode.table`


What's new in 1.3
=================

1.3.1
-----

- Fix :meth:`WorkspaceFile.all_exist() <.pscad.workspace.WorkspaceFile.all_exist>` always returning ``True``.


1.3.0
-----

- Uses ``mhi.help`` framework for HTML Help documentation.
- The command ``py -m mhi.help`` will open all help documentation.
- Added Python 3.14 support


What's new in 1.2
=================

1.2.1
-----

- Clear definition CRC's during save.
- Documentation fixes.


1.2.0
-----

- Added :class:`.Vertex` for ``<vertex x='...' y='...'/>`` elements
- :meth:`.GfxLine.vertices` now returns ``list[Vertex]``
- :meth:`.Wire.vertices` now returns ``list[Vertex]``
- Added :meth:`.ProjectFile.remap` for remapping definitions.
- Added :meth:`.Layer.components`, :meth:`.Layer.delete_components`


What's new in 1.1
=================

1.1.4
-----

- Fixed: crash due to non-numeric ``id`` in ``<channel/>`` nodes.


1.1.3
-----

- Reduced time spend creating new id's when many components are being created.


1.1.2
-----

- documentation space/tab fixes
- :class:`~.ParameterBase` now uses property descriptors, to enable autocomplete


1.1.1
-----

- :meth:`~.ProjectFile.save_as()` accepts a `str` in addition to a `Path`
- changing a :attr:`~.ProjectFile.namespace` will update internal definition namespace references
- adding a :class:`~.Definition` to a :class:`~.ProjectFile` now ensures component IDs are unique


1.1.0
-----

- Global Substitution support
- Layer support
- Use new "mapping" types, instead of overriding ``lxml`` element operations.
- Help documentation included with module (``py -m mhi.xml help``)
- Renamed :class:`~mhi.xml.pscad.workspace.ProjectNode` properties for improved clarity:

  - ``.project`` to :attr:`~mhi.xml.pscad.workspace.ProjectNode.is_case`
  - ``.library`` to :attr:`~mhi.xml.pscad.workspace.ProjectNode.is_library`


What's new in 1.0
=================

1.0.1
-----

- Properly detect ``.pslx`` files as PSCAD Library files.


1.0.0
-----

- Initial public release (PSCAD xml support only)
