This repository was archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Python3 Migration Notes
Amanda Goldani edited this page Aug 6, 2021
·
9 revisions
This page is intended to show the differences between the old version of the code and the new one.
Note that all Python3 top levels are located in src/python/, this was omitted in the details for convenience.
Includes all helper functions from utils.py talking to DBS.
Details
| Python 2 | Python 3 | tested | notes |
|---|---|---|---|
utils.py/componentCheck.check_dbs |
Services/DBS/DBSReader.py/DBSReader.check |
❌ | |
utils.py/getFileBlock |
Services/DBS/DBSReader.py/DBSReader.getBlockName |
✅ | |
utils.py/getDatasetBlocks |
Services/DBS/DBSReader.py/DBSReader.getDatasetBlockNamesServices/DBS/DBSReader.py/DBSReader.getDatasetBlockNamesByLumisServices/DBS/DBSReader.py/DBSReader.getDatasetBlockNamesByRuns
|
✅ | * split because the block names were filtered by runs or by lumis (never both!) |
utils.py/getDatasetEventsAndLumis |
Services/DBS/DBSReader.py/DBSReader.getDatasetEventsAndLumisServices/DBS/DBSReader.py/DBSReader.getBlocksEventsAndLumis
|
✅ | * split because events and lumis were got by dataset or blocks (never both!) |
utils.py/getDatasetFileArray |
Services/DBS/DBSReader.py/DBSReader.getDatasetFiles |
✅ | * input args use_array and cache_timeout were removed because were not used |
utils.py/getDatasetLumisAndFiles |
Services/DBS/DBSReader.py/DBSReader.getDatasetLumisAndFiles |
✅ | * only does the request, input args runs and lumilist were removed but the helper functions Utilities/DataTools.py/filterLumisAndFilesByRuns or filterLumisAndFilesByLumis can be used if needed |
utils.py/getDatasets |
Services/DBS/DBSReader.py/DBSReader.getDatasetNames |
✅ | |
utils.py/findParent |
Services/DBS/DBSReader.py/DBSReader.getDatasetParent |
✅ | |
utils.py/getDatasetRuns |
Services/DBS/DBSReader.py/DBSReader.getDatasetRuns |
✅ | |
utils.py/getDatasetSize |
Services/DBS/DBSReader.py/DBSReader.getDatasetSize |
✅ | |
utils.py/getDatasetStatus |
Services/DBS/DBSReader.py/DBSReader.getDBSStatus |
✅ | |
utils.py/getFilesWithLumiInRun |
Services/DBS/DBSReader.py/DBSReader.getFilesWithLumiInRun |
✅ | |
utils.py/getLFNbase |
Services/DBS/DBSReader.py/DBSReader.getLFNBase |
✅ | |
utils.py/setDatasetStatus |
Services/DBS/DBSWriter.py/DBSWriter.setDatasetStatus |
❌ | |
utils.py/setFileStatus |
Services/DBS/DBSWriter.py/DBSWriter.setFileStatus |
❌ |
Includes all helper functions from utils.py talking to the request manager.
Details
| Python 2 | Python 3 | tested | notes |
|---|---|---|---|
utils.py/getAgentConfig |
Services/ReqMgr/ReqMgrReader.py/ReqMgrReader.getAgentConfig |
❌ | |
utils.py/getReqmgrInfo |
Services/ReqMgr/ReqMgrReader.py/ReqMgrReader.getReqmgrInfo |
✅ | |
utils.py/getWorkflowByCampaign |
Services/ReqMgr/ReqMgrReader.py/ReqMgrReader.getWorkflowsByCampaign |
✅ | |
utils.py/getWorkflowByName |
Services/ReqMgr/ReqMgrReader.py/ReqMgrReader.getWorkflowsByNames |
✅ | |
utils.py/getWorkflowByOutput |
Services/ReqMgr/ReqMgrReader.py/ReqMgrReader.getWorkflowsByOutput |
✅ | * endpoint changed from CouchDB to the RESTful api |
utils.py/getWorkflowById |
Services/ReqMgr/ReqMgrReader.py/ReqMgrReader.getWorkflowsByPrepId |
✅ | * endpoint changed from CouchDB to the RESTful api |
utils.py/getWorkflows |
Services/ReqMgr/ReqMgrReader.py/ReqMgrReader.getWorkflowsByStatus |
✅ | |
utils.py/getWorkload |
Services/ReqMgr/ReqMgrReader.py/ReqMgrReader.getWorkflowSchema |
✅ | |
utils.py/workflowInfo.getSchema |
Services/ReqMgr/ReqMgrReader.py/ReqMgrReader.getWorkflowSchema |
✅ | * use makeCopy = True to keep the same behavior |
utils.py/workflowInfo.getSplittingsNew |
Services/ReqMgr/ReqMgrReader.py/ReqMgrReader.getSplittingsSchema |
✅ | * only does the request, input args strip and allTasks were removed but the helper functions Utilities/DataTools.py/filterSplittingsParam and filterSplittingsTaskTypes can be used if needed |
Includes all helper functions from utils.py that are used for authentication, configuration, etc.
Details
| Python 2 | Python 3 | tested | notes |
|---|---|---|---|
utils.py/make_x509_conn |
Utilities/Authenticate.py/getX509Conn |
❌ | |
utils.py/unifiedConfiguration |
Utilities/ConfigurationHandler.py/ConfigurationHandler |
❌ | |
utils.py/ThreadHandler |
Utilities/Decorators.py/runWithMultiThreading |
❌ | |
utils.py/runWithRetries |
Utilities/Decorators.py/runWithRetries |
❌ | |
utils.py/GET |
Utilities/WebTools.py/getResponse |
❌ |