Skip to content
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

Pare down giant comment blocks that largely do what Git already does #363

Merged
merged 1 commit into from
May 5, 2023
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
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
Copy link
Member

@yarikoptic yarikoptic May 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbkeator Please confirm that it is Ok to assume that this file is also under Apache 2 license (per https://github.com/incf-nidash/PyNIDM/blob/master/LICENSE) as the rest of the codebase, or it has to be GPL?

# *****************************************************************************
# *****************************************************************************
# Date: 8-1-18 Coded by: David Keator ([email protected])
# 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 ([email protected])
# 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 ([email protected])
# 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 ([email protected])
# 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 ([email protected])
# 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 ([email protected])
# 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 ([email protected])
# 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 ([email protected])
# 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 ([email protected])
# 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 ([email protected])
# 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