Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the import statements throughout the package to use relative imports and defines a cleaner package interface to fix issue #39 and allow importing bnd as a package. Key changes include updating all import paths (e.g., from "bnd" to relative paths), adding a new function (download_animal) in data_transfer.py, and revising the init.py to export a public interface.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| bnd/update_bnd.py | Changed absolute imports to relative imports for logger and config. |
| bnd/pipeline/pyaldata.py | Refactored imports for logger, config, and nwb conversion. |
| bnd/pipeline/nwbtools/* | Updated all imports using relative paths for consistency. |
| bnd/pipeline/nwb.py, kilosort.py, init.py | Adjusted module-level imports; modified init.py to define package interface and export functions. |
| bnd/data_transfer.py | Added new download_animal function with updated import paths. |
| bnd/config.py, bnd/cli.py | Updated import statements to use relative imports. |
| bnd/logger.py | Introduced as the centralized logging module for all package modules. |
Comments suppressed due to low confidence (1)
bnd/init.py:5
- Elements in all should be strings representing the names of the exported objects. Consider updating this line to: all = ['dl', 'up', 'to_pyal', 'batch_ks', 'upload_session', 'download_session', 'download_animal'] to adhere to standard practice.
__all__ = [dl, up, to_pyal, batch_ks, upload_session, download_session, download_animal]
Member
Author
|
tested and it surprisingly works! |
martinesparza
approved these changes
May 12, 2025
Closed
martinesparza
added a commit
that referenced
this pull request
May 13, 2025
This reverts commit 3b1cd66. Reverting commit after imports broken.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
a bit of a nasty PR, to fix the #39 and allow importing bnd