Skip to content

Commit

Permalink
Merge pull request #363 from incf-nidash/rm-big-comments
Browse files Browse the repository at this point in the history
Pare down giant comment blocks that largely do what Git already does
  • Loading branch information
yarikoptic authored May 5, 2023
2 parents 411fb22 + 5c099f6 commit 1472357
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 382 deletions.
32 changes: 2 additions & 30 deletions src/nidm/experiment/Query.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
# *****************************************************************************
# *****************************************************************************
# nidm_query.py
# License: GPL
# *****************************************************************************
# *****************************************************************************
# Date: 8-1-18 Coded by: David Keator (dbkeator@gmail.com)
# Filename: nidm_query.py
#
# Program description: This program provides query functionality for NIDM-Experiment files
#
#
# *****************************************************************************
# Development environment: Python - PyCharm IDE
#
# *****************************************************************************
# System requirements: Python 3.X
# Libraries: os, sys, rdflib, pandas, argparse, logging
# *****************************************************************************
# Start date: 8-1-18
# Update history:
# DATE MODIFICATION Who
#
#
# *****************************************************************************
# Programmer comments:
#
#
# *****************************************************************************
# *****************************************************************************
"""This program provides query functionality for NIDM-Experiment files"""

import functools
import hashlib
import json
Expand Down
32 changes: 5 additions & 27 deletions src/nidm/experiment/tools/bidsmri2nidm.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
# !/usr/bin/env python
# *****************************************************************************
# *****************************************************************************
# bidsmri2nidm.py
# License: Apache License, Version 2.0
# *****************************************************************************
# *****************************************************************************
# Date: 10-2-17 Coded by: David Keator (dbkeator@gmail.com)
# Filename: bidsmri2nidm.py
#
# Program description: This program will convert a BIDS MRI dataset to a NIDM-Experiment
# RDF document. It will parse phenotype information and simply store variables/values
# and link to the associated json data dictionary file.
#
# *****************************************************************************
# Development environment: Python - PyCharm IDE
#
# *****************************************************************************
# System requirements: Python 3.X
# Libraries: pybids, numpy, matplotlib, pandas, scipy, math, dateutil, datetime,argparse,
# os,sys,getopt,csv
# *****************************************************************************
# Programmer comments:
#
#
# *****************************************************************************
# *****************************************************************************
"""
This program will convert a BIDS MRI dataset to a NIDM-Experiment RDF document.
It will parse phenotype information and simply store variables/values and link
to the associated json data dictionary file.
"""

from argparse import ArgumentParser, RawTextHelpFormatter
import csv
Expand Down
37 changes: 7 additions & 30 deletions src/nidm/experiment/tools/csv2nidm.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@
#!/usr/bin/env python
# *****************************************************************************
# *****************************************************************************
# csv2nidm.py
# License:Apache License, Version 2.0
# *****************************************************************************
# *****************************************************************************
# Date: 01-19-18 Coded by: David Keator (dbkeator@gmail.com)
# Filename: csv2nidm.py
#
# Program description: This program will load in a CSV file and iterate over the header
# variable names performing an elastic search of https://scicrunch.org/ for NIDM-ReproNim
# tagged terms that fuzzy match the variable names. The user will then interactively pick
# a term to associate with the variable name. The resulting annotated CSV data will
# then be written to a NIDM data file.
#
# *****************************************************************************
# Development environment: Python - PyCharm IDE
#
# *****************************************************************************
# System requirements: Python 3.X
# Libraries: pybids, numpy, matplotlib, pandas, scipy, math, dateutil, datetime,argparse,
# os,sys,getopt,csv
# *****************************************************************************
# *****************************************************************************
# Programmer comments:
#
#
# *****************************************************************************
# *****************************************************************************
"""
This program will load in a CSV file and iterate over the header variable names
performing an elastic search of https://scicrunch.org/ for NIDM-ReproNim tagged
terms that fuzzy match the variable names. The user will then interactively
pick a term to associate with the variable name. The resulting annotated CSV
data will then be written to a NIDM data file.
"""

from argparse import ArgumentParser
from io import StringIO
Expand Down
43 changes: 8 additions & 35 deletions src/nidm/experiment/tools/nidm2bids.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,11 @@
#!/usr/bin/env python
# *****************************************************************************
# *****************************************************************************
# NIDM2BIDSMRI.py
# License: Apache License, Version 2.0
# *****************************************************************************
# *****************************************************************************
# Date: 10-2-17 Coded by: David Keator (dbkeator@gmail.com)
# Filename: NIDM2BIDSMRI.py
#
# Program description: This program will convert a NIDM-Experiment RDF document
# to a BIDS dataset. The program will query the NIDM-Experiment document for subjects,
# MRI scans, and associated assessments saving the MRI data to disk in an organization
# according to the BIDS specification, the demographics metadata to a participants.tsv
# file, the project-level metadata to a dataset_description.json file, and the
# assessments to *.tsv/*.json file pairs in a phenotypes directory.
# *****************************************************************************
# Development environment: Python - PyCharm IDE
#
# *****************************************************************************
# System requirements: Python 3.X
# Libraries: pybids, numpy, matplotlib, pandas, scipy, math, dateutil, datetime,argparse,
# os,sys,getopt,csv
# *****************************************************************************
# Start date: 10-2-17
# Update history:
# DATE MODIFICATION Who
#
#
# *****************************************************************************
# Programmer comments:
#
#
# *****************************************************************************
# *****************************************************************************
"""
This program will convert a NIDM-Experiment RDF document to a BIDS dataset.
The program will query the NIDM-Experiment document for subjects, MRI scans,
and associated assessments saving the MRI data to disk in an organization
according to the BIDS specification, the demographics metadata to a
participants.tsv file, the project-level metadata to a dataset_description.json
file, and the assessments to *.tsv/*.json file pairs in a phenotypes directory.
"""

from argparse import ArgumentParser
from io import StringIO
Expand Down
32 changes: 1 addition & 31 deletions src/nidm/experiment/tools/nidm_concat.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,4 @@
#!/usr/bin/env python
# *****************************************************************************
# *****************************************************************************
# nidm_utils.py
# License: Apache License, Version 2.0
# *****************************************************************************
# *****************************************************************************
# Date: 11-28-18 Coded by: David Keator (dbkeator@gmail.com)
# Filename: nidm_utils.py
#
# Program description: Tools for working with NIDM-Experiment files
#
# *****************************************************************************
# Development environment: Python - PyCharm IDE
#
# *****************************************************************************
# System requirements: Python 3.X
# Libraries: pybids, numpy, matplotlib, pandas, scipy, math, dateutil, datetime,argparse,
# os,sys,getopt,csv
# *****************************************************************************
# Start date: 11-28-18
# Update history:
# DATE MODIFICATION Who
#
#
# *****************************************************************************
# Programmer comments:
#
#
# *****************************************************************************
# *****************************************************************************
"""Tools for working with NIDM-Experiment files"""

import click
from nidm.experiment.Query import GetMergedGraph
Expand Down
32 changes: 1 addition & 31 deletions src/nidm/experiment/tools/nidm_convert.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,4 @@
#!/usr/bin/env python
# *****************************************************************************
# *****************************************************************************
# nidm_utils.py
# License: Apache License, Version 2.0
# *****************************************************************************
# *****************************************************************************
# Date: 11-28-18 Coded by: David Keator (dbkeator@gmail.com)
# Filename: nidm_utils.py
#
# Program description: Tools for working with NIDM-Experiment files
#
# *****************************************************************************
# Development environment: Python - PyCharm IDE
#
# *****************************************************************************
# System requirements: Python 3.X
# Libraries: pybids, numpy, matplotlib, pandas, scipy, math, dateutil, datetime,argparse,
# os,sys,getopt,csv
# *****************************************************************************
# Start date: 11-28-18
# Update history:
# DATE MODIFICATION Who
#
#
# *****************************************************************************
# Programmer comments:
#
#
# *****************************************************************************
# *****************************************************************************
""" Tools for working with NIDM-Experiment files """

from os.path import basename, join, splitext
import click
Expand Down
33 changes: 1 addition & 32 deletions src/nidm/experiment/tools/nidm_linreg.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,4 @@
# coding=utf-8
# !/usr/bin/env python
# *****************************************************************************
# *****************************************************************************
# nidm_linreg.py
# License: Apache License, Version 2.0
# *****************************************************************************
# *****************************************************************************
# Date: 07-26-22 Coded by: Ashmita Kumar (ashmita.kumar@gmail.com)
# Filename: nidm_linreg.py
#
# Program description: This program provides a tool to complete a linear regression on nidm files
#
#
# *****************************************************************************
# Development environment: Python - PyCharm IDE
#
# *****************************************************************************
# System requirements: Python 3.X
# Libraries: os, sys, tempfile, pandas, click, nidm, csv, sklearn, numpy, statsmodel.api, patsy.contrasts
# *****************************************************************************
# Start date: 6-15-20
# Update history:
# DATE MODIFICATION Who
#
#
# *****************************************************************************
# Programmer comments:
#
#
# *****************************************************************************
# *****************************************************************************
"""This program provides a tool to complete a linear regression on nidm files"""

import csv
import os
Expand Down
32 changes: 1 addition & 31 deletions src/nidm/experiment/tools/nidm_merge.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,4 @@
#!/usr/bin/env python
# *****************************************************************************
# *****************************************************************************
# nidm_utils.py
# License: Apache License, Version 2.0
# *****************************************************************************
# *****************************************************************************
# Date: 11-28-18 Coded by: David Keator (dbkeator@gmail.com)
# Filename: nidm_utils.py
#
# Program description: Tools for working with NIDM-Experiment files
#
# *****************************************************************************
# Development environment: Python - PyCharm IDE
#
# *****************************************************************************
# System requirements: Python 3.X
# Libraries: pybids, numpy, matplotlib, pandas, scipy, math, dateutil, datetime,argparse,
# os,sys,getopt,csv
# *****************************************************************************
# Start date: 11-28-18
# Update history:
# DATE MODIFICATION Who
#
#
# *****************************************************************************
# Programmer comments:
#
#
# *****************************************************************************
# *****************************************************************************
"""Tools for working with NIDM-Experiment files"""

import click
from rdflib import Graph, util
Expand Down
32 changes: 1 addition & 31 deletions src/nidm/experiment/tools/nidm_query.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,4 @@
#!/usr/bin/env python
# *****************************************************************************
# *****************************************************************************
# nidm_query.py
# License: Apache License, Version 2.0
# *****************************************************************************
# *****************************************************************************
# Date: 8-1-18 Coded by: David Keator (dbkeator@gmail.com)
# Filename: nidm_query.py
#
# Program description: This program provides query functionality for NIDM-Experiment files
#
#
# *****************************************************************************
# Development environment: Python - PyCharm IDE
#
# *****************************************************************************
# System requirements: Python 3.X
# Libraries: os, sys, rdflib, pandas, argparse, logging
# *****************************************************************************
# Start date: 8-1-18
# Update history:
# DATE MODIFICATION Who
#
#
# *****************************************************************************
# Programmer comments:
#
#
# *****************************************************************************
# *****************************************************************************
"""This program provides query functionality for NIDM-Experiment files"""

from json import dumps
import os
Expand Down
32 changes: 1 addition & 31 deletions src/nidm/experiment/tools/nidm_utils.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,4 @@
#!/usr/bin/env python
# *****************************************************************************
# *****************************************************************************
# nidm_utils.py
# License: Apache License, Version 2.0
# *****************************************************************************
# *****************************************************************************
# Date: 11-28-18 Coded by: David Keator (dbkeator@gmail.com)
# Filename: nidm_utils.py
#
# Program description: Tools for working with NIDM-Experiment files
#
# *****************************************************************************
# Development environment: Python - PyCharm IDE
#
# *****************************************************************************
# System requirements: Python 3.X
# Libraries: pybids, numpy, matplotlib, pandas, scipy, math, dateutil, datetime,argparse,
# os,sys,getopt,csv
# *****************************************************************************
# Start date: 11-28-18
# Update history:
# DATE MODIFICATION Who
#
#
# *****************************************************************************
# Programmer comments:
#
#
# *****************************************************************************
# *****************************************************************************
""" Tools for working with NIDM-Experiment files """

from argparse import ArgumentParser
import os.path
Expand Down
Loading

0 comments on commit 1472357

Please sign in to comment.