From 83f5e5d9cf309671f62e0b4fcbfb50b0ea18e6aa Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 20 Apr 2025 11:13:45 +0200 Subject: [PATCH 1/4] Moved optional dependencies --- .github/workflows/ci_pipeline.yml | 2 +- pyproject.toml | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 4cde8d6..4baa495 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -28,7 +28,7 @@ jobs: - name: Install python dependencies run: | python -m pip install --upgrade pip - pip install . + pip install ".[test]" - name: Inspect maxplotlib arguments run: | diff --git a/pyproject.toml b/pyproject.toml index 2f8f9af..1a929ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,17 +18,19 @@ dependencies = [ "matplotlib", "pint", "plotly", +] +[project.optional-dependencies] +test = [ "pytest", + "coverage", +] +dev = [ + "maxplotlib[test]", "ruff", "black", "isort", "jupyterlab", - "maxtikzlib @ git+https://github.com/max-models/maxtikzlib.git@main", ] - -[project.optional-dependencies] -dev = ["check-manifest"] -test = ["coverage"] [project.urls] "Source" = "https://github.com/max-models/maxplotlib" From aad78b1cd76ef5841bd490e0fb8b76c74c57d20e Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 20 Apr 2025 11:15:44 +0200 Subject: [PATCH 2/4] Removed logo.py --- src/maxplotlib/logo/logo.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/maxplotlib/logo/logo.py diff --git a/src/maxplotlib/logo/logo.py b/src/maxplotlib/logo/logo.py deleted file mode 100644 index c95bc58..0000000 --- a/src/maxplotlib/logo/logo.py +++ /dev/null @@ -1,35 +0,0 @@ -# import maxplotlib.canvas.canvas as canvas -# from maxplotlib.subfigure.tikz_figure import TikzFigure -from maxtikzlib.figure import TikzFigure - - -def tikz_logo(): - tikz = TikzFigure() - - path_actions = ["draw", "rounded corners", "line width=3"] - - # M - nodes = [[0, 0], [0, 3], [1, 2], [2, 3], [2, 0]] - for i, node_data in enumerate(nodes): - tikz.add_node(node_data[0], node_data[1], f"M{i}", layer=0) - tikz.add_path( - [f"M{i}" for i in range(len(nodes))], path_actions=path_actions, layer=1 - ) - - # P - nodes = [[3, 0], [3, 3], [4, 2.5], [4, 1.5], [3, 1]] - for i, node_data in enumerate(nodes): - tikz.add_node(node_data[0], node_data[1], f"P{i}", layer=0) - tikz.add_path( - [f"P{i}" for i in range(len(nodes))], path_actions=path_actions, layer=1 - ) - - # L - nodes = [[5, 3], [5, 0], [7, 0]] - for i, node_data in enumerate(nodes): - tikz.add_node(node_data[0], node_data[1], f"L{i}", layer=0) - tikz.add_path( - [f"L{i}" for i in range(len(nodes))], path_actions=path_actions, layer=1 - ) - - return tikz From 95488bd46d279097b853c3e64df2495f9473dfe7 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 20 Apr 2025 11:23:27 +0200 Subject: [PATCH 3/4] Run pytest with coverage --- .github/workflows/ci_pipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 4baa495..deac0c6 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -36,4 +36,5 @@ jobs: - name: Run tests run: | - pytest . + coverage run -m pytest . + coverage report --sort=cover From a7d2712c60a4cdd905cbecde760e107ac253ef40 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 20 Apr 2025 11:29:55 +0200 Subject: [PATCH 4/4] Extended readme --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index f6cc5c3..84b0139 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,12 @@ Install the code and requirements with pip pip install -e . ``` +Additional dependencies for developers can be installed with + +``` +pip install -e ".[dev]" +``` + Run the code with ```