brain_observatory_qc is inteded to be both a standalone repo of quality control metrics and plots for Allen Brain Observatory projects that utilitze 2-photon imaging, and a central location for for tracking data quality issues related to ongoing Allen Brain Observatory projects.The repo is internally facing only.
Anyone with data quality concerns should log issues here to ensure that they are tracked and followed up on. This repository should be a central place to log and track issues, along with any associated documents (Jupyter Notebooks, PDF writeups, slide decks, etc.) that were prepared in the process of tracking or following up on issues.
Functions in this repository depend on the AllenSDK https://github.com/AllenInstitute/AllenSDK
Set up a dedicated conda environment:
conda create -n boqc python=3.8
Activate the new environment:
conda activate boqc
Make the new environment visible in the Jupyter
pip install ipykernel
python -m ipykernel install --user --name boqc
Install brain_observatory_qc
git clone https://github.com/AllenInstitute/brain_observatory_qc.git
cd brain_observatory_qc
pip install -e .
Unit testing is required for new functions.
Tests are run on CircleCI on every github commit.
Tests can be run locally by running the following at the command line:
flake8 mindscope_qc
pytest
If you note a new data issue, here are steps to follow to log it:
Click on the 'Issues' tab to the top/left of the page:
Try searching for related issues. If there is a currently an open issue that covers the same topic, consider adding to that issue rather than creating a new issue.
If a new issue is warranted, use the button to create a new issue and select the appropriate issue type:
Be as descriptive as possible with your issue reporting. Use the issue template as a guide but please include:
#
followed by the issue number will create a hyperlinkAdd relevant labels. The 'Labels' dropdown is just to the right of the main comment field. Consider if your issue or feature request is related to a specific:
Tag any relevant individuals in the issue text. Including their github username after the @
symbol will ensure that they are notified of the issue and any followup comments.
Assign someone, including yourself. The individual(s) listed under Assignees
are responsible for followup. Add people if you know they should be here, or leave it blank if you're not sure.
Follow up! If you have additional information or context to provide later, return to the issue and add new comments. Try to avoid editing previous comments as this makes tracking difficult.
Close the issue when it is solved.
Contributing to this repo is welcome an encouraged! We hope to build a collaborative code base that is both durable in it's ability to access data and provide qc metrics and plots, and flexible in it's ability to accomodate many different projects. To keep our repo robust we require that contributions include:
Documentation is required.
Please follow the PEP 8 style guide.
In addition to all inline comments, please provide numpy style docstrings for all functions and includes the following items at a minimum:
returns
"""[summary]
Parameters
----------
input_variable : [type]
[description]
Returns
-------
[type]
[description]
"""
pro-tip: if using Visual Studio Code the extension AutoDocstring from publisher:"Nils Werner" will automatically generate docstring template for you.
Type hints in the function definition are also highly encouraged. Example:
def cast_int_to_string(input_integer:int) -> str:
"""casts an integer into a string
Parameters
----------
input_integer : int
any integer
Returns
-------
str
a string of the input integer
"""
Pull requests are welcome!
@downtoncrabby
, @matchings
and @seanmcculloch
to review