Skip to content

Conversation

AtMostafa
Copy link
Member

a bit of a nasty PR, to fix the #39 and allow importing bnd

@AtMostafa AtMostafa requested review from Copilot and martinesparza and removed request for Copilot April 24, 2025 14:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

@AtMostafa
Copy link
Member Author

tested and it surprisingly works!

@martinesparza martinesparza merged commit 3b1cd66 into main May 12, 2025
4 checks passed
@martinesparza martinesparza mentioned this pull request May 12, 2025
martinesparza added a commit that referenced this pull request May 13, 2025
This reverts commit 3b1cd66.

Reverting commit after imports broken.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants