Skip to content

Commit 71073dc

Browse files
fix: ModuleNotFoundError
Renamed module from ``df2img.py`` to ``main.py``.
1 parent 5a55949 commit 71073dc

File tree

8 files changed

+24
-35
lines changed

8 files changed

+24
-35
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55

66
## [Unreleased]
77

8+
## [0.2.17] - 2023-12-07
9+
### Fixed
10+
- ModuleNotFoundError ([GH issue #64](https://github.com/andreas-vester/df2img/issues/64)).
11+
812
## [0.2.16] - 2023-12-05
913
### Fixed
1014
- kaleido won't install on Windows machines using pdm package manager ([GH issue #62](https://github.com/andreas-vester/df2img/issues/62)).
@@ -156,7 +160,8 @@ For more information about ``plotly``'s renderers, visit the respective website
156160
- Possibility to change column width and row height.
157161
- Possibility to change font size.
158162

159-
[Unreleased]: https://github.com/andreas-vester/df2img/compare/v0.2.16...HEAD
163+
[Unreleased]: https://github.com/andreas-vester/df2img/compare/v0.2.17...HEAD
164+
[0.2.17]: https://github.com/andreas-vester/df2img/compare/v0.2.16...v0.2.17
160165
[0.2.16]: https://github.com/andreas-vester/df2img/compare/v0.2.15...v0.2.16
161166
[0.2.15]: https://github.com/andreas-vester/df2img/compare/v0.2.14...v0.2.15
162167
[0.2.14]: https://github.com/andreas-vester/df2img/compare/v0.2.13...v0.2.14

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,6 @@ It is a wrapper/convenience function in order to create a ``plotly`` Table. That
2828

2929
An extensive documentation is available at https://df2img.dev.
3030

31-
32-
## Important note
33-
The ``kaleido`` dependency is needed to save a ``pd.DataFrame``. Right now there is an
34-
issue when using the latest version of ``kaleido``.
35-
This project requires ``kaleido v0.0.3`` when you are installing ``df2img`` on a Linux
36-
machine. This version has been set as the minimum version in the ``pyproject.toml``
37-
file.
38-
However, when you're on a Windows machine, you can use ``kaleido v0.1.0.post1`` at a
39-
maximum. That is, it is recommended to manually upgrade to this version.
40-
4131
## Quickstart
4232

4333
You can install the package via ``pip``.

noxfile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
"pre-commit",
1010
"tests",
1111
]
12-
PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"]
12+
PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"]
1313

1414

15-
@nox.session(name="pre-commit", python="3.11")
15+
@nox.session(name="pre-commit", python=PYTHON_VERSIONS)
1616
def precommit(session: Session) -> None:
1717
"""Lint using pre-commit."""
1818
args = session.posargs or [
1919
"run",
2020
"--all-files",
2121
"--hook-stage=manual",
2222
]
23-
session.run("pdm", "install", "-G", "lint", external=True)
23+
session.run_always("pdm", "install", "-G", "lint", external=True)
2424
session.run("pre-commit", "install")
2525
session.run("pre-commit", *args)
2626

@@ -31,6 +31,6 @@ def tests(session: Session) -> None:
3131
args = session.posargs or ["--cov"]
3232

3333
# install the package itself into a new virtual environment with tests dependencies
34-
session.run("pdm", "install", "-G", "test", external=True)
34+
session.run_always("pdm", "install", "-G", "test", external=True)
3535
# run pytest against the installed package
3636
session.run("pytest", *args)

pdm.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "df2img"
3-
version = "0.2.16"
3+
version = "0.2.17"
44
description = "Save a Pandas DataFrame as image"
55
authors = [
66
{name = "Andreas Vester", email = "[email protected]"},

src/df2img/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Collection of functions to plot and save a `pd.DataFrame`."""
22

3-
from df2img.df2img import plot_dataframe, save_dataframe
3+
from df2img.main import plot_dataframe, save_dataframe
44

55
__all__ = ["plot_dataframe", "save_dataframe"]
6-
__version__ = "0.2.12"
File renamed without changes.

tests/test_df2img.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ def df_with_index_odd_row_count() -> pd.DataFrame:
4545
)
4646

4747

48-
def test_version() -> None:
49-
"""It checks the correct version number."""
50-
assert df2img.__version__ == "0.2.12"
51-
52-
5348
# noinspection PyUnresolvedReferences
5449
def test_plot_dataframe_without_args(df_without_index: pd.DataFrame) -> None:
5550
"""It plots a dataframe without providing any additional arguments."""

0 commit comments

Comments
 (0)