Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove merge conflict markers #261

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
19 changes: 1 addition & 18 deletions aeon/schema/social.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,9 @@ def read(
"""Reads data from the Harp-binarized tracking file."""
# Get config file from `file`, then bodyparts from config file.
model_dir = Path(file.stem.replace("_", "/")).parent
<<<<<<< HEAD
config_file_dir = ceph_proc_dir / model_dir
if not config_file_dir.exists():
raise FileNotFoundError(f"Cannot find model dir {config_file_dir}")
=======
# `ceph_proc_dir` typically
config_file_dir = Path(ceph_proc_dir) / model_dir
assert config_file_dir.exists(), f"Cannot find model dir {config_file_dir}"
>>>>>>> b9a1e3f... Blackened and ruffed
config_file = get_config_file(config_file_dir)
parts = self.get_bodyparts(config_file)

Expand All @@ -52,7 +46,6 @@ def read(
self.columns = columns
data = super().read(file)

<<<<<<< HEAD
# Drop any repeat parts.
unique_parts, unique_idxs = np.unique(parts, return_index=True)
repeat_idxs = np.setdiff1d(np.arange(len(parts)), unique_idxs)
Expand All @@ -63,8 +56,6 @@ def read(
data = data.iloc[:, keep_part_col_idxs]
parts = unique_parts

=======
>>>>>>> b9a1e3f... Blackened and ruffed
# Set new columns, and reformat `data`.
n_parts = len(parts)
part_data_list = [pd.DataFrame()] * n_parts
Expand Down Expand Up @@ -102,21 +93,13 @@ def get_config_file(
"""Returns the config file from a model's config directory."""
if config_file_names is None:
config_file_names = ["confmap_config.json"] # SLEAP (add for other trackers to this list)
<<<<<<< HEAD
config_file = None
=======
config_file = Path()
>>>>>>> b9a1e3f... Blackened and ruffed
for f in config_file_names:
if (config_file_dir / f).exists():
config_file = config_file_dir / f
break
<<<<<<< HEAD
if config_file is None:
raise FileNotFoundError(f"Cannot find config file in {config_file_dir}")
=======
assert config_file.is_file(), f"Cannot find config file in {config_file_dir}"
>>>>>>> b9a1e3f... Blackened and ruffed
raise FileNotFoundError(f"Cannot find config file in {config_file_dir}")
return config_file


Expand Down
33 changes: 0 additions & 33 deletions tests/io/test_api.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
<<<<<<< HEAD
from pathlib import Path

=======
>>>>>>> b9a1e3f... Blackened and ruffed
import pandas as pd
import pytest
from pytest import mark

<<<<<<< HEAD
import aeon
from aeon.schema.dataset import exp02

Expand All @@ -18,63 +14,34 @@
@mark.api
def test_load_start_only():
data = aeon.load(nonmonotonic_path, exp02.Patch2.Encoder, start=pd.Timestamp("2022-06-06T13:00:49"))
=======
import aeon.io.api as aeon
from aeon.schema.dataset import exp02


@mark.api
def test_load_start_only():
data = aeon.load(
"./tests/data/nonmonotonic", exp02.Patch2.Encoder, start=pd.Timestamp("2022-06-06T13:00:49")
)
>>>>>>> b9a1e3f... Blackened and ruffed
assert len(data) > 0


@mark.api
def test_load_end_only():
data = aeon.load(
<<<<<<< HEAD
nonmonotonic_path, exp02.Patch2.Encoder, end=pd.Timestamp("2022-06-06T13:00:49")
=======
"./tests/data/nonmonotonic", exp02.Patch2.Encoder, end=pd.Timestamp("2022-06-06T13:00:49")
>>>>>>> b9a1e3f... Blackened and ruffed
)
assert len(data) > 0


@mark.api
def test_load_filter_nonchunked():
<<<<<<< HEAD
data = aeon.load(
nonmonotonic_path, exp02.Metadata, start=pd.Timestamp("2022-06-06T09:00:00")
)
=======
data = aeon.load("./tests/data/nonmonotonic", exp02.Metadata, start=pd.Timestamp("2022-06-06T09:00:00"))
>>>>>>> b9a1e3f... Blackened and ruffed
assert len(data) > 0


@mark.api
def test_load_monotonic():
<<<<<<< HEAD
data = aeon.load(monotonic_path, exp02.Patch2.Encoder)
assert len(data) > 0 and data.index.is_monotonic_increasing

=======
data = aeon.load("./tests/data/monotonic", exp02.Patch2.Encoder)
assert data.index.is_monotonic_increasing
>>>>>>> b9a1e3f... Blackened and ruffed


@mark.api
def test_load_nonmonotonic():
<<<<<<< HEAD
data = aeon.load(nonmonotonic_path, exp02.Patch2.Encoder)
=======
data = aeon.load("./tests/data/nonmonotonic", exp02.Patch2.Encoder)
>>>>>>> b9a1e3f... Blackened and ruffed
assert not data.index.is_monotonic_increasing


Expand Down
Loading