Skip to content

Commit

Permalink
🎨 Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zethson committed Feb 26, 2025
1 parent 7075467 commit 2f9ca82
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion docs/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"import lamindb as ln\n",
"import pandas as pd\n",
"import numpy as np\n",
"from tmp_testing_demo import save_dataframe\n",
"\n",
"ln.track()"
]
Expand All @@ -41,7 +42,7 @@
"source": [
"df = pd.DataFrame({\"a\": np.arange(0, 10)})\n",
"\n",
"af = ln.Artifact.from_df(df, description=\"test\").save()"
"save_dataframe(df, \"test\")"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [{name = "Lamin Labs", email = "[email protected]"}]
readme = "README.md"
dynamic = ["version", "description"]
dependencies = [
"lamindb[bionty]",
"lamindb[bionty,jupyter]",
]

[project.urls]
Expand Down
5 changes: 4 additions & 1 deletion tmp_testing_demo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@

__version__ = "0.0.1" # denote a pre-release for 0.1.0 with 0.1rc1

from ._core import ExampleClass, example_function
from lamindb_setup import _check_instance_setup

if _check_instance_setup():
from ._core import ExampleClass, save_dataframe
14 changes: 6 additions & 8 deletions tmp_testing_demo/_core.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
def example_function(column_name: str) -> str:
"""Lower case your input string.
import lamindb as ln
import pandas as pd

Args:
column_name: Column name to transform to lower case.

Returns:
The lower-cased column name.
"""
return column_name.lower()
def save_dataframe(df: pd.DataFrame, description: str) -> ln.Artifact:
import lamindb as ln

return ln.Artifact.from_df(df, description=description).save()


class ExampleClass:
Expand Down

0 comments on commit 2f9ca82

Please sign in to comment.