Skip to content

Commit

Permalink
Better debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
burggraaff committed Sep 18, 2024
1 parent cd00d5d commit 60f9f10
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
"Try running the following cell to see if the installation worked.\n",
"Please note that this may take up to a minute; if you see `[*]` next to the cell, that means it is still running.\n",
"\n",
"If you get an output along the lines of \n",
"```<module 'fpcup' from 'file/location/fpcup/fpcup/__init__.py'``` \n",
"If you get an output like \n",
"```Succesfully imported fpcup version x.y.z.``` \n",
"then the installation was successful!"
]
},
Expand All @@ -109,7 +109,7 @@
"outputs": [],
"source": [
"import fpcup\n",
"fpcup"
"fpcup.test()"
]
},
{
Expand Down
9 changes: 9 additions & 0 deletions fpcup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
from .nn import dataset, network
from .settings import DEFAULT_DATA, DEFAULT_OUTPUT, DEFAULT_RESULTS
from .tools import RUNNING_IN_IPYTHON


def test() -> None:
"""
Simple function to assert the import was successful.
"""
from importlib.metadata import version
module_version = version(__package__)
print(f"Succesfully imported {__package__} version {module_version}.")

0 comments on commit 60f9f10

Please sign in to comment.