Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__/

# Distribution / packaging
dist/
build/
_version.py
*.egg-info/
*.egg
Expand Down
5 changes: 0 additions & 5 deletions harp/__init__.py

This file was deleted.

5 changes: 5 additions & 0 deletions harp/data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from harp.data.io import REFERENCE_EPOCH, MessageType, read, to_buffer, to_file
from harp.data.reader import create_reader
from harp.data.schema import read_schema

__all__ = ["REFERENCE_EPOCH", "MessageType", "read", "to_buffer", "to_file", "create_reader", "read_schema"]
File renamed without changes.
2 changes: 1 addition & 1 deletion harp/io.py → harp/data/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pandas as pd
from pandas._typing import Axes # pyright: ignore[reportPrivateImportUsage]

from harp.typing import _BufferLike, _FileLike
from harp.data.typing import _BufferLike, _FileLike

REFERENCE_EPOCH = datetime(1904, 1, 1)
"""The reference epoch for UTC harp time."""
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions harp/reader.py → harp/data/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
from pandas import DataFrame, Series
from pandas._typing import Axes # pyright: ignore[reportPrivateImportUsage]

from harp.io import MessageType, read
from harp.model import BitMask, GroupMask, Model, PayloadMember, Register
from harp.schema import read_schema
from harp.typing import _BufferLike, _FileLike
from harp.data.io import MessageType, read
from harp.data.model import BitMask, GroupMask, Model, PayloadMember, Register
from harp.data.schema import read_schema
from harp.data.typing import _BufferLike, _FileLike


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion harp/schema.py → harp/data/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from pydantic_yaml import parse_yaml_raw_as

from harp.model import Model, Registers
from harp.data.model import Model, Registers


def _read_common_registers() -> Registers:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np

from harp.model import Model
from harp.data.model import Model

datapath = Path(__file__).parent

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

from harp.io import REFERENCE_EPOCH, MessageType, read, to_buffer
from harp.data.io import REFERENCE_EPOCH, MessageType, read, to_buffer
from tests.params import DataFileParam

testdata = [
Expand Down
4 changes: 2 additions & 2 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pandas as pd
from pytest import mark

from harp.io import REFERENCE_EPOCH, MessageType
from harp.reader import create_reader
from harp.data.io import REFERENCE_EPOCH, MessageType
from harp.data.reader import create_reader
from tests.params import DeviceSchemaParam

testdata = [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_schema.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pytest import mark

from harp.schema import read_schema
from harp.data.schema import read_schema
from tests.params import DeviceSchemaParam

testdata = [
Expand Down
Loading