Coverage for pyTooling/Diagram/__init__.py: 100%
4 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-03 23:02 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-03 23:02 +0000
1# ==================================================================================================================== #
2# _____ _ _ ____ _ #
3# _ __ _ |_ _|__ ___ | (_)_ __ __ _ | _ \(_) __ _ __ _ _ __ __ _ _ __ ___ #
4# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | | | | | |/ _` |/ _` | '__/ _` | '_ ` _ \ #
5# | |_) | |_| || | (_) | (_) | | | | | | (_| |_| |_| | | (_| | (_| | | | (_| | | | | | | #
6# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)____/|_|\__,_|\__, |_| \__,_|_| |_| |_| #
7# |_| |___/ |___/ |___/ #
8# ==================================================================================================================== #
9# Authors: #
10# Patrick Lehmann #
11# #
12# License: #
13# ==================================================================================================================== #
14# Copyright 2026-2026 Patrick Lehmann - Bötzingen, Germany #
15# #
16# Licensed under the Apache License, Version 2.0 (the "License"); #
17# you may not use this file except in compliance with the License. #
18# You may obtain a copy of the License at #
19# #
20# http://www.apache.org/licenses/LICENSE-2.0 #
21# #
22# Unless required by applicable law or agreed to in writing, software #
23# distributed under the License is distributed on an "AS IS" BASIS, #
24# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
25# See the License for the specific language governing permissions and #
26# limitations under the License. #
27# #
28# SPDX-License-Identifier: Apache-2.0 #
29# ==================================================================================================================== #
30#
31"""
32Data models of diagrams, independent of the library drawing them.
34A diagram is described here and drawn elsewhere: :mod:`pyTooling.Diagram.Gantt` describes a Gantt chart - rows of
35bars on a time scale - and a renderer turns that description into a picture. A producer of data derives from these
36classes and adds what its own domain knows, as :mod:`pyTooling.Tracing.Render` does for a software execution trace.
38.. seealso::
40 :mod:`pyTooling.Diagram.Gantt`
41 |rarr| Rows of bars on a time scale.
42 :mod:`pyTooling.Tracing.Render`
43 |rarr| A software execution trace as a Gantt chart.
44"""
45from pyTooling.Decorators import export
46from pyTooling.Exceptions import ToolingException
49@export
50class DiagramError(ToolingException):
51 """An error raised when a diagram is asked for something its elements don't describe."""