Skip to content

Python packages - qceff table pretty printer #911

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

hkershaw-brown
Copy link
Member

@hkershaw-brown hkershaw-brown commented Jul 8, 2025

Description:

The qceff table has a lot of info, which is hard to read.
This python package provides display-qceff-table which pretty prints the qceff table for qceff.csv files.

It is in a python package so people can install with:
pip install -e DART/pytools/pyqceff

and use display-qceff-table without the full path.

Also allows packages to be put individually on pypi

There is also pyDART.txt which is list (one package in it currently) to install DART/pytools
pip install -r pyDART.txt

Example of pretty-print:
Screenshot 2025-07-07 at 8 59 57 PM

Usage:

(py-env) [hkershaw:pytools](python-packages) > display-qceff-table --help                                    
usage: display-qceff-table [-h] [--details [QTY]] csv_file

Display QCEFF table summary and details.

positional arguments:
  csv_file         Path to QCEFF table CSV file

options:
  -h, --help       show this help message and exit
  --details [QTY]  Print detailed information for all quantities, or for a specific quantity QTY

Fixes issue

No issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

No docs, draft pull request to see what people think.

Tests

Please describe any tests you ran to verify your changes.
There is a test directory, but this test is only checking the QTYs are in the printed output.

cd DART/pytools
pytest

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Update conf.py

Checklist for release

  • Merge into main
  • Create release from the main branch with appropriate tag
  • Delete feature-branch

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

@hkershaw-brown
Copy link
Member Author

Note I am not sure on the gamma & beta closed vs open [ vs ( have to check the .f90 code. Currently printing [ for closed.


import csv
import sys
from typing import Dict, List, Any
Copy link
Member Author

Choose a reason for hiding this comment

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

python 3.8, could switch to 3.9+ but is python 3.8 still knocking about on some clusters.

@hkershaw-brown hkershaw-brown marked this pull request as ready for review July 14, 2025 13:52
hkershaw-brown and others added 5 commits July 16, 2025 13:47
Install packages in pytools with
pip install -r pyDART.txt

test for pyqceff only testing if QTY name is in the output, not enough.
Co-authored-by: Marlena Smith <[email protected]>
parser as separate function
avoids accidentally installing a pyqceff from the python path
@hkershaw-brown
Copy link
Member Author

@hkershaw-brown chat to @mjs2369 about namespace package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants