semvec/pypi-packages huggingface dataset:
dsjson 1.3
A Python package to convert tabular data and metadata into CDISC Dataset-JSON v1.1 format.
Requires Python: >=3.12

## README.md

### Project: dsjson

A lightweight Python package to convert clinical tabular datasets (e.g., SDTM/ADaM) and metadata into **CDISC Dataset-JSON v1.1** format. It supports multiple metadata input formats including CSV, Excel, JSON, and XML (planned). If you don't have a specific column metadata file the it can also extracts variable label from specification file and create column metadata.


[![PyPI](https://img.shields.io/pypi/v/dsjson.svg)](https://pypi.org/project/dsjson/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

The CDISC Dataset-JSON standard is essential for regulatory submissions and data sharing in the clinical trial industry. This package simplifies the process of creating compliant JSON files from common data formats like CSV or pandas DataFrames, saving developers time and reducing the risk of manual errors.


### Features

* Converts `DataFrame` + column metadata to Dataset-JSON v1.1
* Supports CSV, Excel, JSON for metadata
* Auto-generates `datasetJSONCreationDateTime`
* Enforces required top-level metadata
* Extract Variable Label from Specification file
* Converts extracted Variable Label into column metadata
* loads a Dataset-JSON file into a pandas DataFrame and attaches the top-level metadata to the DataFrame's attrs attribute.

### Installation
```
pip install dsjson
```

### Quick Start

```python
from dsjson import load_metadata, to_dataset_json, extract_labels, make_column_metedata
import pandas as pd

my_excel_path = r"specification path"

# Load data
rows = pd.read_csv("examples/vs.csv")

# Extract variables from specification and convereted that to column metadata
variable_labels = extract_labels(spec_path=my_excel_path, sheet_name="DM", variable_name_col="Variable Name", variable_label_col="Variable Label")
columns = make_column_metadata(df=data_df, variable_labels=variable_labels, domain="DM")

# this can be used where we already have column metadata already defined in a file - if you make column metadata as per above code, then this is not required
columns = load_metadata("examples/columns_vs.csv", file_type="csv")

# Create Dataset-JSON
ds = to_dataset_json(
    data_df=rows,
    columns_df=columns,
    name="VS",
    label="Vital Signs",
    itemGroupOID="IG.VS",
    originator="My CRO",
    sourceSystem_name="Python",
    sourceSystem_version="3.10",
    fileOID="F.VS.001",
    studyOID="S.1234"
)

# loads a Dataset-JSON file into a pandas DataFrame and attaches the top-level metadata to the DataFrame's attrs attribute.
vs_df = read_dataset_json("examples/vs.json")

# Access the attached metadata from the .attrs attribute
print(f"File OID: {vs_df.attrs.get('fileOID')}")
print(f"Originator: {vs_df.attrs.get('originator')}")
```
gwbench 0.8.8
A Python package for gravitational-wave benchmarking, particularly with Fisher information matrices.
Requires Python: >=3.9

# gwbench
## Acknowledgment
We request that any academic report, publication, or other academic
disclosure of results derived from the use of this software acknowledge
the use of the software by an appropriate acknowledgment or citation.

The gwbench software can be cited from [arXiv:2010.15202](https://arxiv.org/abs/2010.15202), with INSPIRE BibTeX entry:
```
@article{Borhanian:2020ypi,
    author = "Borhanian, Ssohrab",
    title = "{gwbench: a novel Fisher information package for gravitational-wave benchmarking}",
    eprint = "2010.15202",
    archivePrefix = "arXiv",
    primaryClass = "gr-qc",
    month = "10",
    year = "2020"
}
```

## Installation via pip
```
pip install gwbench
```

## Installation from source
### Clone the gwbench repository and enter it
Clone this repository and follow the next steps.
```
git clone https://gitlab.com/sborhanian/gwbench.git
cd gwbench
```

### Using conda
#### Source Oasis Conda - *do this first; only on LIGO clusters needed*
```
source /cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/etc/profile.d/conda.sh  
which conda
```

The last line should print `/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/condabin/conda` or similar.

#### Setup conda virtual environment
```
conda create -y --name gwbench python=3.9  
conda activate gwbench  
conda install -y -c conda-forge --file requirements_conda.txt  
```

### Using `python -m venv` and pip
Replace `~/gwbench` with the appropriate path of choice in the following instructions:
```
python3 -m venv ~/gwbench
source ~/gwbench/bin/activate
pip install -r requirements_pip.txt
```

### Using pip or conda
Install while the virtual environment is active:
```
pip install .
```

### Uninstall
```
pip uninstall gwbench
```

### Test
```
cd example_scripts  
python test_run.py
```