feat: use dynamic foraging library to build qc#2
Conversation
| from pydantic_settings import BaseSettings | ||
|
|
||
| if __name__ == "__main__": run() No newline at end of file | ||
| logger = logging.getLogger(__name__) |
There was a problem hiding this comment.
I think this is necessary after calling log_schema.setup_logging.
Also, Jessy is discussing the shape/scope of log schema with team on Thursday 7/8
There was a problem hiding this comment.
hmm, that doesn't sound correct. Can you check and see why? Can you elaborate on shape/scope? Are they changing the log data structure?
| Entrypoint for executing | ||
| """ | ||
| settings = InputSettings() | ||
| logging.basicConfig( |
seanmcculloch
left a comment
There was a problem hiding this comment.
LGTM, after addressing logging comments
| "Running QC" | ||
| ) | ||
| raw_data_loader = RawDataLoader(raw_data_path) | ||
| pipeline_runner = Pipeline(raw_data_loader) |
There was a problem hiding this comment.
This Pipeline object should be removed. It's redundant to load the raw data here unless I am missing something. This capsule should only call run_qc_from_nwb
There was a problem hiding this comment.
I think it's needed for running the harp qc suite which uses the raw data
| ) | ||
|
|
||
| nwb_file_path = nwb_path[0] / "behavior.nwb.zarr" | ||
| with NWBZarrIO(nwb_file_path, "r") as io: |
There was a problem hiding this comment.
What do you think about remove the NWB IO from the capsule and putting it in the library? It seems like a processing library concern
There was a problem hiding this comment.
I don't have a preference. I can move it there if that's desired. It's only a few lines of code so should be good either way.
Uses functions from this PR: AllenNeuralDynamics/dynamic-foraging-processing#25
Attempts to close #1. Uses the dynamic foraging processing library to build the qc and the rest is boilerplate. I pinned the library to a commit, this will need to be updated before releasing the capsule.
I'm working in code ocean dev environment right now, so for releasing, there will be a separate PR in code ocean production environment.
Added logging. Sample log output is below:
Did a run on real data uploaded to test env, sample output is shown below with the qc.json file, and then folder for plots: