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 interface.run_conversion without nwbfile_path #951

Merged
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* The usage of `compression` and `compression_opts` directly through the `FicTracDataInterface` is now deprecated - users should refer to the new `configure_backend` method for a general approach for setting compression. [PR #941](https://github.com/catalystneuro/neuroconv/pull/941)
* The usage of `compression` directly through the `neuroconv.tools.neo` submodule is now deprecated - users should refer to the new `configure_backend` method for a general approach for setting compression. [PR #943](https://github.com/catalystneuro/neuroconv/pull/943)
* The usage of `compression_options` directly through the `neuroconv.tools.ophys` submodule is now deprecated - users should refer to the new `configure_backend` method for a general approach for setting compression. [PR #940](https://github.com/catalystneuro/neuroconv/pull/940)
* Removed the option of running `interface.run_conversion` without `nwbfile_path argument`git . [PR #951](https://github.com/catalystneuro/neuroconv/pull/951)



### Features
* Added docker image and tests for an automated Rclone configuration (with file stream passed via an environment variable). [PR #902](https://github.com/catalystneuro/neuroconv/pull/902)
Expand Down
10 changes: 2 additions & 8 deletions src/neuroconv/basedatainterface.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import importlib
import json
import uuid
import warnings
from abc import ABC, abstractmethod
from pathlib import Path
from typing import Literal, Optional, Tuple, Union
Expand Down Expand Up @@ -116,7 +115,7 @@ def add_to_nwbfile(self, nwbfile: NWBFile, **conversion_options) -> None:

def run_conversion(
self,
nwbfile_path: Optional[str] = None,
nwbfile_path: Union[str, Path],
h-mayorquin marked this conversation as resolved.
Show resolved Hide resolved
nwbfile: Optional[NWBFile] = None,
metadata: Optional[dict] = None,
overwrite: bool = False,
Expand Down Expand Up @@ -152,12 +151,7 @@ def run_conversion(
BackendConfiguration object, and pass that instead.
Otherwise, all datasets will use default configuration settings.
"""
if nwbfile_path is None:
warnings.warn( # TODO: remove on or after 6/21/2024
"Using DataInterface.run_conversion without specifying nwbfile_path is deprecated. To create an "
"NWBFile object in memory, use DataInterface.create_nwbfile. To append to an existing NWBFile object,"
" use DataInterface.add_to_nwbfile."
)

backend = _resolve_backend(backend, backend_configuration)
no_nwbfile_provided = nwbfile is None # Otherwise, variable reference may mutate later on inside the context

Expand Down