diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 00000000..84545932 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,8 @@ +cff-version: 1.0.0 +message: "If you use this software, please cite it as below." +authors: +- family-names: "Sainsbury Wellcome Centre Foraging Behaviour Working Group" +title: "Aeon: An open-source platform to study the neural basis of ethological behaviours over naturalistic timescales" +doi: 10.5281/zenodo.8413142 +date-released: 2023-10-05 +url: https://github.com/SainsburyWellcomeCentre/aeon_docs diff --git a/README.md b/README.md index e24a5e9c..ab29ce14 100644 --- a/README.md +++ b/README.md @@ -73,4 +73,12 @@ Ensure you stay in the `~/ProjectAeon/aeon_mecha` directory for the rest of the - `docs/using_online_dashboard.md` : Instructions for connecting to Aeon's online dashboard - `env_config/` : Configuration files for the Aeon Python environment - `tests/` : Unit and integration tests - - `tests/data` : Data used by tests \ No newline at end of file + - `tests/data` : Data used by tests + +## Citation Policy + +If you use this software, please cite it as below: + +Sainsbury Wellcome Centre Foraging Behaviour Working Group. (2023). Aeon: An open-source platform to study the neural basis of ethological behaviours over naturalistic timescales, https://doi.org/10.5281/zenodo.8413142 + +[![DOI](https://zenodo.org/badge/485512362.svg)](https://zenodo.org/badge/latestdoi/485512362) \ No newline at end of file diff --git a/aeon/__init__.py b/aeon/__init__.py index ab2a506c..b59e77aa 100644 --- a/aeon/__init__.py +++ b/aeon/__init__.py @@ -1,4 +1,4 @@ -from importlib_metadata import PackageNotFoundError, version +from importlib.metadata import PackageNotFoundError, version try: # Change here if project is renamed and does not equal the package name diff --git a/aeon/schema/social.py b/aeon/schema/social.py index bdacfc8b..97453af3 100644 --- a/aeon/schema/social.py +++ b/aeon/schema/social.py @@ -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) @@ -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) @@ -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 @@ -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 diff --git a/docs/env_setup/remote/miniconda_conda_remote_setup.md b/docs/env_setup/remote/miniconda_conda_remote_setup.md index 07c48dd9..554c4f28 100644 --- a/docs/env_setup/remote/miniconda_conda_remote_setup.md +++ b/docs/env_setup/remote/miniconda_conda_remote_setup.md @@ -14,5 +14,5 @@ conda env update -f env_config/env_dev.yml - `conda activate aeon`: activates the virtual environment; any commands now run within this terminal will take place within the virtual environment. - `conda deactivate aeon`: deactivates the virtual environment. 4. (Optional) Add commands to the `.profile` file to add miniconda as an environment module and Bonsai and its dependencies to your system path on startup (this will be initialized each time you SSH into the HPC). - - Copy the commands in the `.profile_example` file in this folder to your HPC home directory `.profile` file. + - Copy the commands in the `.profile_example` file in this folder to your HPC home directory `.profile` file (you will have to create this file if it doesn't already exist). 5. For instructions on developing within the `aeon` environment, see [`developing_on_hpc.md`](./developing_on_hpc.md) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 45d3dd61..02978f67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,6 @@ dependencies = [ "dotmap", "fastparquet", "graphviz", - "importlib_metadata", "ipykernel", "jupyter", "jupyterlab", diff --git a/tests/io/test_api.py b/tests/io/test_api.py index c09ab322..48986830 100644 --- a/tests/io/test_api.py +++ b/tests/io/test_api.py @@ -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 @@ -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