Skip to main content

PyCuDAL

PyCuDAL logo

Parametric acceptance limits for USP <905> Content Uniformity and USP <711> Dissolution — a Python re-implementation of the SAS programs CALCUSP1/2, CALDISP1/2, EVCUSP1/2, EVDISP1/2, SMPCUSP1/2, SMPDISP1/2, with a CLI and two GUIs.

CI PyPI License: MIT Release


Features

  • Computations (cudal package)
    • Content Uniformity – Sampling Plans 1 & 2 (cusp1, cusp2)
    • Dissolution – Sampling Plans 1 & 2 (disp1, disp2)
    • Three analysis modes each: acceptance-limit table, probability of passing, sample probability
  • CLIpython -m cudal.cli (or installed command cudal)
  • Tkinter GUI (cudal-gui, stdlib-only → tiny install): 4 tabs × 3 modes, background threads with progress, scrollable parameters, live validation, sortable/colored results table, CSV export, modal matplotlib plots (lines + cubic spline, heatmap with 80/90 % contours), SAS-style PDF listings (Courier, column wrapping, repeated page headers), XLSX export, settings persistence
  • Optional PySide6 GUI (extras/cudal_gui_pyside6.py) – modern Qt theme, kept outside the package so the pip install stays small

Repository layout

cudal/            library: computations + CLI + Tk GUI (+ logo package data)
extras/           optional PySide6 GUI (not installed)
tests/            pytest smoke tests
scripts/          local exe build helper
.github/          CI, PyPI publish, exe release workflows

Installation

Requires Python ≥ 3.9.

# from GitHub
pip install git+https://github.com/moazelessawey/cudal.git

# from a source checkout
pip install .            # core (numpy/pandas/scipy) + CLI + Tk GUI
pip install .[all]       # + matplotlib, openpyxl, reportlab (plots/exports)
pip install .[qt]        # + PySide6 for the optional Qt GUI
pip install .[dev]       # + pytest, pyinstaller
Extra Adds
plot matplotlib (plots)
xlsx openpyxl (Excel export)
pdf reportlab (PDF listings)
qt PySide6 (+matplotlib) Qt GUI
all plot + xlsx + pdf
dev pytest + pyinstaller

Quick start

Python API

from cudal import cusp1

table = cusp1.acceptance_limit_table(10, 100.0, 95.0, 95.0, 85.1, 114.9, 0.5)
print(table)

CLI

cudal --help                 # installed console script
python -m cudal.cli --help   # module form
python -m cudal --help       # package __main__

The CLI covers the same four scenarios × three modes as the GUIs (see --help for the exact option names).

Tkinter GUI (included, stdlib-only)

cudal-gui                 # after pip install
python cudal_gui.py       # from a source checkout

Optional PySide6 GUI (extra file, not installed)

pip install .[qt]
python extras/cudal_gui_pyside6.py

Result exports

  • CSV – one click per table
  • XLSX – File → Export all results (one sheet per tab)
  • PDF – SAS-listing style: Courier, centered title block, Plan‑1 row-wrapped blocks, Plan‑2 SE×SM LL/UL matrix, 2 dp right-aligned numbers, * for NaN, title + table headers repeated on every page
  • Plots – lines + cubic spline, or heatmap with 80/90 % threshold contours; Save PNG

Building standalone executables

Locally (Windows):

scripts\build_exe.bat

or manually:

pip install .[all,qt] pyinstaller
pyinstaller --onefile --noconsole --name CuDAL    --add-data "cudal\logo.png;cudal" cudal_gui.py
pyinstaller --onefile --noconsole --name CuDAL-Qt --add-data "cudal\logo.png;cudal" extras\cudal_gui_pyside6.py

On every GitHub Release, the build-exe.yml workflow builds CuDAL.exe and CuDAL-Qt.exe and attaches them to the release automatically.

Releasing & publishing

  1. Bump cudal/__version__ and commit.
  2. Create a tag & GitHub release: git tag v1.0.0 && git push origin v1.0.0 (or use Releases → Draft new release in the UI).
  3. Actions then:
    • build & attach the Windows executables to the release,
    • build the wheel/sdist and publish to PyPI (publish.yml).

Development

pip install -e .[all,dev]
pytest -q
python -m cudal.gui --selftest

License & disclaimer

MIT — see LICENSE.

This software is provided for research/informational use. It does not constitute regulatory advice; validate any output against your own reference implementation before use in a GMP environment.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycudal-1.0.1.tar.gz (97.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycudal-1.0.1-py3-none-any.whl (61.2 kB view details)

Uploaded Python 3

File details

Details for the file pycudal-1.0.1.tar.gz.

File metadata

  • Download URL: pycudal-1.0.1.tar.gz
  • Upload date:
  • Size: 97.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for pycudal-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b928ef0d297dcdb4496b5b9f0d26615a853fdccfe3b495c03e945cb888f80d61
MD5 747e2c3735fa7fdec1c7e37d819a182f
BLAKE2b-256 06c9c7bfdaf920dbb9959658bc31da175633c8894b325de749499f63157e282e

See more details on using hashes here.

File details

Details for the file pycudal-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pycudal-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 61.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for pycudal-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a57431f9fa9db05c93555dfa0fc6fc92a7357427640ac8134e6302c47511e7c4
MD5 3b78c9c21064bceb109d88ee3b28a406
BLAKE2b-256 83f25e4bede9dbb7a9c9a17f2ac2949ed51fe233e5c5c95143dbf39aa1a4f9d2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page