Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
CMAKE_CXX_COMPILER_LAUNCHER: ccache
run: |
make python
cp tools/python_api/src_py/*.py tools/python_api/build/real_ladybug/
cp tools/python_api/src_py/*.py tools/python_api/build/ladybug/

- name: Run pytest
working-directory: ladybug/tools/python_api
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ pybind11_add_module(_lbug

set_target_properties(_lbug
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/real_ladybug"
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/real_ladybug"
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/real_ladybug")
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/ladybug"
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/ladybug"
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/ladybug")

target_link_libraries(_lbug
PRIVATE
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ check: requirements
format: requirements
$(VENV_BIN)/ruff format src_py test

build: ## Compile real_ladybug (and install in 'build') for Python
build: ## Compile ladybug (and install in 'build') for Python
$(MAKE) -C ../../ python
cp src_py/*.py build/real_ladybug/
cp src_py/*.py build/ladybug/

test: requirements ## Run the Python unit tests
cp src_py/*.py build/real_ladybug/ && cd build
cp src_py/*.py build/ladybug/ && cd build
$(VENV_BIN)/pytest test

help: ## Display this help information
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "real_ladybug"
name = "ladybug"
description = "Highly scalable, extremely fast, easy-to-use embeddable graph database"
readme = "README.md"
license = { text = "MIT" }
Expand Down
4 changes: 2 additions & 2 deletions src_py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

To install the package, run:
```
python3 -m pip install real_ladybug
python3 -m pip install ladybug
```

Example usage:
```python
import real_ladybug as lb
import ladybug as lb

db = lb.Database("./test")
conn = lb.Connection(db)
Expand Down
4 changes: 2 additions & 2 deletions test/benchmark_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

python_build_dir = Path(__file__).parent.parent / "build"
try:
import real_ladybug as lb
import ladybug as lb
except ModuleNotFoundError:
sys.path.append(str(python_build_dir))
import real_ladybug as lb
import ladybug as lb


def parse_args() -> argparse.Namespace:
Expand Down
4 changes: 2 additions & 2 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

python_build_dir = Path(__file__).parent.parent / "build"
try:
import real_ladybug as lb
import ladybug as lb
except ModuleNotFoundError:
sys.path.append(str(python_build_dir))
import real_ladybug as lb
import ladybug as lb

if TYPE_CHECKING:
from type_aliases import ConnDB
Expand Down
2 changes: 1 addition & 1 deletion test/ground_truth.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import date, datetime, timedelta
from uuid import UUID

from real_ladybug.constants import ID, LABEL
from ladybug.constants import ID, LABEL

TINY_SNB_PERSONS_GROUND_TRUTH = {
0: {
Expand Down
4 changes: 2 additions & 2 deletions test/test_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import pyarrow as pa
import pytest
import pytz
import real_ladybug as lb
import ladybug as lb
from pandas import Timestamp
from real_ladybug.constants import DST, ID, LABEL, NODES, SRC
from ladybug.constants import DST, ID, LABEL, NODES, SRC
from type_aliases import ConnDB

_expected_dtypes = {
Expand Down
2 changes: 1 addition & 1 deletion test/test_async_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pyarrow as pa
import pytest
import real_ladybug as lb
import ladybug as lb


@pytest.mark.asyncio
Expand Down
2 changes: 1 addition & 1 deletion test/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import TYPE_CHECKING

import pytest
import real_ladybug as lb
import ladybug as lb
from type_aliases import ConnDB

if TYPE_CHECKING:
Expand Down
4 changes: 2 additions & 2 deletions test/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from textwrap import dedent

import pytest
import real_ladybug as lb
import ladybug as lb
from conftest import get_db_file_path


Expand All @@ -15,7 +15,7 @@ def open_database_on_subprocess(tmp_path: Path, build_dir: Path) -> None:
import sys
sys.path.append(r"{build_dir!s}")

import real_ladybug as lb
import ladybug as lb
db = lb.Database(r"{tmp_path!s}")
print(r"{tmp_path!s}")
""")
Expand Down
2 changes: 1 addition & 1 deletion test/test_datatype.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import numpy as np
import pandas as pd
import pytz
from real_ladybug.constants import DST, ID, LABEL, NODES, RELS, SRC
from ladybug.constants import DST, ID, LABEL, NODES, RELS, SRC
from type_aliases import ConnDB


Expand Down
4 changes: 2 additions & 2 deletions test/test_df.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from uuid import UUID

import pytz
import real_ladybug as lb
import ladybug as lb
from pandas import Timedelta, Timestamp
from real_ladybug.constants import DST, ID, LABEL, NODES, RELS, SRC
from ladybug.constants import DST, ID, LABEL, NODES, RELS, SRC
from type_aliases import ConnDB


Expand Down
2 changes: 1 addition & 1 deletion test/test_exception.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import pytest
import real_ladybug as lb
import ladybug as lb
from type_aliases import ConnDB


Expand Down
2 changes: 1 addition & 1 deletion test/test_fsm.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pathlib import Path

import pytest
import real_ladybug as lb
import ladybug as lb
from conftest import get_db_file_path
from test_helper import LBUG_ROOT

Expand Down
2 changes: 1 addition & 1 deletion test/test_iteration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

import real_ladybug as lb
import ladybug as lb
from type_aliases import ConnDB


Expand Down
4 changes: 2 additions & 2 deletions test/test_mvcc_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Graph-based Jepsen Bank Test — MVCC anomaly detector.

A pytest port of adsharma/mvcc-bank (https://github.com/adsharma/mvcc-bank),
adapted to use real_ladybug directly and fit into the tools/python_api/test
adapted to use ladybug directly and fit into the tools/python_api/test
pytest suite.

Anomalies checked
Expand Down Expand Up @@ -33,7 +33,7 @@
from typing import TYPE_CHECKING

import pytest
import real_ladybug as lb
import ladybug as lb

if TYPE_CHECKING:
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion test/test_networkx.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Any

from pandas import Timedelta, Timestamp
from real_ladybug.constants import LABEL
from ladybug.constants import LABEL
from type_aliases import ConnDB


Expand Down
2 changes: 1 addition & 1 deletion test/test_query_result_close.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_query_result_close(tmp_path: Path, build_dir: Path) -> None:
import sys
sys.path.append(r"{build_dir!s}")

import real_ladybug as lb
import ladybug as lb
db = lb.Database(r"{db_path!s}")
conn = lb.Connection(db)
conn.execute('''
Expand Down
4 changes: 2 additions & 2 deletions test/test_scan_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
except ImportError:
from backports.zoneinfo import ZoneInfo # type: ignore[no-redef]

import real_ladybug as lb
from real_ladybug.constants import ID, LABEL
import ladybug as lb
from ladybug.constants import ID, LABEL


def validate_scan_pandas_results(results: lb.QueryResult) -> None:
Expand Down
2 changes: 1 addition & 1 deletion test/test_torch_geometric.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import ground_truth
import torch
from real_ladybug.constants import LABEL
from ladybug.constants import LABEL
from type_aliases import ConnDB


Expand Down
2 changes: 1 addition & 1 deletion test/test_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pandas as pd
import pyarrow as pa
import pytest
from real_ladybug import Type
from ladybug import Type
from type_aliases import ConnDB


Expand Down
2 changes: 1 addition & 1 deletion test/test_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def test_version() -> None:
import real_ladybug as lb
import ladybug as lb

assert lb.version != ""
assert lb.storage_version > 0
Expand Down
4 changes: 2 additions & 2 deletions test/test_wal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path
from textwrap import dedent

import real_ladybug as lb
import ladybug as lb
from conftest import get_db_file_path


Expand All @@ -14,7 +14,7 @@ def run_query_in_new_process(tmp_path: Path, build_dir: Path, queries: str):
import sys
sys.path.append(r"{build_dir!s}")

import real_ladybug as lb
import ladybug as lb
db = lb.Database(r"{db_path!s}")
""") + queries
return subprocess.Popen([sys.executable, "-c", code])
Expand Down
2 changes: 1 addition & 1 deletion test/type_aliases.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import TypeAlias

from real_ladybug import Connection, Database
from ladybug import Connection, Database

ConnDB: TypeAlias = tuple[Connection, Database]
Loading