cape.cfdx.manage: Manage file counts and quotas¶
This module provides a variety of CAPE-related file management tools, including
find_json()to find apparent main CAPE JSON files
find_large_cases()to find large case folders
and more.
- cape.cfdx.manage.find_json(pat: str | None = None) list¶
Find all tracked CAPE JSON files in a repository
The test is not perfect and consists of the following three fairly reliable criteria:
The JSON file is tracked by
gitThe file name ends with
.jsonThe file contains
"RunControl"
Obviously from criterion #1, this function only works in git repositories.
- cape.cfdx.manage.find_json_solver(pat: str | None = None) list¶
Find tracked CAPE JSON files in repo and report which solver
The results will be returned in order from most recently modified to least recently modified.
The test is not perfect and consists of the following three fairly reliable criteria:
The JSON file is tracked by
gitThe file name ends with
.jsonThe file contains
"RunControl"
Obviously from criterion #1, this function only works in git repositories.
- Call:
>>> json_files = find_json_solver()
- Inputs:
- pat: {
None} |str Pattern to search for, defaults to
"*.json"
- pat: {
- Outputs:
- Versions:
2026-07-18
@ddalle: v1.02026-07-20
@ddalle: v1.1; special rules for py{X}.json`2026-07-29
@ddalle: v1.2; work outside of git repo
- cape.cfdx.manage.identify_case_solver() str | None¶
Determine the intended solver of the current case folder
- Call:
>>> solver = identify_case_solver()
- Outputs:
- solver:
str|None Intended solver
"pycart","pyfun", etc., if one could be determined. If nocase.jsonfile is found, returnsNone. Ifcase.jsonis present but no other identifying features were found for a specific solver, returns"cfdx"
- solver:
- Versions:
2026-07-20
@ddalle: v1.0
- cape.cfdx.manage.identify_solver(fjson: str) str | None¶
Determine the intended solver for a CAPE JSON file
- Call:
>>> solver = identify_solver(fjson)
- Inputs:
- fjson:
str Name of JSON file to investigate
- fjson:
- Outputs:
- solver:
str|None Intended solver
"pycart","pyfun", etc., if one could be determined. If no “RunControl” section is found, returnsNone. If “RunControl” section is present but no other identifying features were found for a specific solver, returns"cfdx"
- solver:
- Versions:
2026-07-18
@ddalle: v1.0