Skip to content

Organize learning materials #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0

- name: Set up Python 3.10
uses: actions/setup-python@v5
Expand Down Expand Up @@ -37,9 +41,9 @@ jobs:
poetry run black . --check --diff

- name: Run GitHub super-linter
uses: github/super-linter/slim@v6
uses: super-linter/super-linter/slim@v6
env:
DEFAULT_BRANCH: master
DEFAULT_BRANCH: main
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: true
Expand Down
16 changes: 6 additions & 10 deletions bids_fx.py → learning_materials/bids_fx.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# Project: BIDSInspec
## Objective: Create a function that can query the BIDS directory
# Objective: Create a function that can query the BIDS directory
# Modified: August 8, 2024 @ 9:08 PM by N.O.

# Implementation via pybids
## Complete pybids tutorial

# Complete pybids tutorial
# Install pybids via conda
## pip install pybids

# pip install pybids
# Loading BIDS datasets
import os

from bids import BIDSLayout
from bids.tests import get_test_data_path
import os

# Here we're using an example BIDS dataset that's bundled with the pybids tests
data_path = os.path.join(get_test_data_path(), '7t_trt')
data_path = os.path.join(get_test_data_path(), "7t_trt")

# Initialize the layout
layout = BIDSLayout(data_path)

# Print some basic information about the layout
layout


Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# Project: BIDSInspec
## Objective: Complete the pybids tutorial
# Objective: Complete the pybids tutorial
# Modified: August 8, 2024 @ 9:08 PM by N.O.

# Implementation via pybids
## Must first complete pybids tutorial to understand the package

# Must first complete pybids tutorial to understand the package
# Install bids
# pip install bids
# Install pybids
## pip install pybids

# pip install pybids
# Import
from os.path import join

from bids import BIDSLayout
from bids.tests import get_test_data_path
layout = BIDSLayout(join(get_test_data_path(), 'synthetic'))

layout = BIDSLayout(join(get_test_data_path(), "synthetic"))

# View data
print(layout)
Expand All @@ -26,9 +25,10 @@
print(layout.get_tasks())

# Extract metadata
# get task timing information for a given fMRI scan # cannot run since bids-dataset does not have NIfTI files
# get task timing information for a given fMRI scan
# cannot run since bids-dataset does not have NIfTI files
# f = layout.get(task='nback', run=1, extension='nii.gz')[0].filename
#print(layout.get_events(f))
# print(layout.get_events(f))

# get metadata from json files # cannot run since bids-dataset does not have NIfTI files
# f = layout.get(task='nback', run=1, extension='nii.gz')[0].filename
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash

# Project: BIDSInspec
## Objective: Select BIDS directory from bids-examples.git and validate with BIDS validator
# Modified: August 8, 2024 @ 9:08 PM by N.O.
Expand Down