DIRAC Common Utilities
diraccommon is a Python library providing stateless utilities extracted from the main DIRAC framework for use by DiracX and other projects. As of version 9.1.6, it requires Python 3.11 or later and is actively maintained with frequent integration releases, indicating a rapid development and release cadence.
Warnings
- breaking Python version requirement changed to 3.11 or higher. Older Python environments (e.g., 3.10 and below) are no longer supported.
- breaking Database schema changes were introduced in version 9.1.1, including the removal of the `AccountingCache` table from `ResourceManagementDB` and removal of `ResourceStatus/StatusTypes` entries from CS.
- breaking Significant database schema changes were introduced in version 9.1.0, including new indices on `JobDB.Jobs` and `PilotAgentsDB.PilotAgents`, and the dropping of `NodeHistory`, `NodeLog`, and `NodeStatus` tables from `ResourceStatusDB`.
- gotcha The CLI argument `--diracx-dist-dir` was replaced with `--diracx-src-dir` in related `DiracX` components. Users migrating or updating scripts that interact with `DiracX` via CLI should be aware of this change.
Install
-
pip install diraccommon
Imports
- S_OK, S_ERROR
from DIRAC.Core.Utilities.ReturnValues import S_OK, S_ERROR
- get_example_value
from DIRAC.Core.Utilities.SomeUtilityModule import get_example_value
Quickstart
from DIRAC.Core.Utilities.List import uniqueElements
my_list = [1, 2, 2, 3, 4, 4, 5]
unique_items = uniqueElements(my_list)
print(f"Original list: {my_list}")
print(f"Unique elements: {unique_items}")