<jupyter_start><jupyter_text>Querying Bids ValidityThis notebook quickly demonstrates how to query flywheel for a project's BIDS validity using a custom script, which you can view [here](../flywheel_bids_tools/query_bids.py).<jupyter_code>import flywheel
import pandas
# add the script to the path
import sys
import os
sys.path.append(os.path.abspath("/home/ttapera/bids-on-flywheel/flywheel_bids_tools"))
import query_bids<jupyter_output><empty_output><jupyter_text>First, initialise a flywheel client:<jupyter_code>fw = flywheel.Client()<jupyter_output><empty_output><jupyter_text>Then, query your project, which returns a dataframe:<jupyter_code>%%time
df = query_bids_validity.query_bids_validity("Reward2018", fw, verbose=False)
df[df['valid'] == True].head()
df[df['valid'] != True].head()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11757575757575757, 'fraction_numerical': 0.0048484848484848485, 'mean_word_length': 8.717647058823529, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '228451', 'license': 'MIT', 'n_tokens_mistral': 295, 'n_tokens_neox': 287, 'n_words': 60, 'path': 'notebooks/Querying_BIDS_Validity.ipynb', 'repo_name': 'TinasheMTapera/bids-on-flywheel', 'size': '825'}