semvec/pypi-packages huggingface dataset:
defineutils 0.2.1
CDISC Define-XML v2.1 utilities
Requires Python: >=3.10
Keywords: define.xml, Define-XML, CDISC

# defineutils

## CDISC Define-XML v2.1 utilities

The defineutils package currently includes 2 modules:
1. `definehtml.py`: transforms a define.xml into a define.html using the stylesheet
2. `validate.py`: schema validates a define.xml file

The `definehtml.py` module includes the Define-XML v2.1 style sheet to simplify usage. It generates a define.html file,
or alternatively will generate an HTML string.

The `validate.py` module includes the Define-XML v2.1 schema to simplify usage. It schema validates a define.xml file
and returns a define.xml is valid message to indicate success, or a detailed message documenting the schema validation
issues.

## Using defineutils

Currently, defineutils contains 2 modules, one for generating an HTML rendition and one for schema validation.

Example code used to generate a define.html from a define.xml:
```python
from pathlib import Path
from defineutils.definehtml import DefineHtml, DefineHtmlGenerationError

out_file = Path(__file__).parent.joinpath("define.html")
dh = DefineHtml(Path(__file__).parent.joinpath("define.xml"))
dh.transform_to_html_file(out_file)
```

The above code applies the Define-XML v2.1 stylesheet to the define.xml to generation the define.html file. The 
stylesheet is embedded in the module. For error handling, use the custom DefineHtmlGenerationError exception.

Example code used to schema validate a define.xml:
```python
from pathlib import Path
from defineutils.validate import DefineSchemaValidator, DefineSchemaValidationError

validator = DefineSchemaValidator(Path(__file__).parent.joinpath("define.xml"))
try:
    result = validator.validate_define_file()
except DefineSchemaValidationError as e:
    print(e)
```

The above code schema validates the specified define.xml file. The Define-XML v2.1 schema is embedded into the module.
The schema validation errors are reported via the DefineSchemaValidationError exception.

## Running defineutils from the Command-line

When you run a module with the -m switch it will execute the defineutils modules from the command-line. For example,
to transform a define.xml file into HTML using the stylesheet, the following command-line example executes the module
to generate define.html. The -m parameter instructs Python to run the module as an application. The definehtml program
uses the -d parameter to specify the define.xml file path and the -o to specify the define.html file path.

```commandline
python3 -m defineutils.definehtml -d tests/define.xml -o tests/define.html
```

The validate command can be executed using the command-line the same way. For validate, only the -d parameter is 
required to indicate the file path of the define.xml to validate.

```commandline
python3 -m defineutils.validate -d tests/define.xml
```

If you are running defineutils from the source code using a virtual environment, you may need to activate that virtual
environment before running the code from the command-line.

```commandline
source .venv/bin/activate
python3 -m defineutils.validate -d tests/define.xml
```
scippnexus 26.1.1
An h5py-like utility for NeXus files with seamless Scipp integration
Requires Python: >=3.11

[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
[![PyPI badge](http://img.shields.io/pypi/v/scippnexus.svg)](https://pypi.python.org/pypi/scippnexus)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/scippnexus/badges/version.svg)](https://anaconda.org/conda-forge/scippnexus)
[![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE)
[![DOI](https://zenodo.org/badge/475453428.svg)](https://zenodo.org/badge/latestdoi/475453428)

# ScippNexus

## About

ScippNexus is a h5py-like utility for NeXus files with seamless scipp integration.
See the [documentation](https://scipp.github.io/scippnexus) for more details.

## Installation

```sh
python -m pip install scippnexus
```
societal-costs-pipeline-2026-02-03 0.1.0
Societal costs pipeline CLI.
Requires Python: >=3.9

# societal_costs

Workspace for the societal costs study.

## Crates

- `crates/costs_core` — core domain types, aggregation, pricing, and validation.
- `crates/costs_models` — two-part, Tweedie, and log-normal models + selection tools.
- `crates/costs_matching` — matching + balance diagnostics.
- `crates/costs_cohort` — cohort assignment + diagnostics.
- `crates/costs_components` — register-derived component builders (LMDB volume so far).
- `crates/costs_pipeline` — configuration, orchestration, and report outputs.

## LMDB example

See `crates/costs_pipeline/README.md` for the LMDB ingestion example.

## Pipeline config

Start from `pipeline.example.toml` and update the register file paths to match
your local dataset layout. Most SAS7BDAT paths accept either a single file
or a directory (all `.sas7bdat` files are loaded, sorted by name). You can
also set `base_path` in the config to prefix all relative register paths.

## Additional docs

- `crates/costs_core/README.md` — core domain and aggregation usage.
- `crates/costs_models/README.md` — model APIs and examples.
- `crates/costs_models/examples/README.md` — runnable model examples.
- `crates/costs_components/README.md` — LMDB note (missing price fields).
- `crates/costs_pipeline/README.md` — pipeline usage and LMDB example.