ART Compatibility Update(s), 21.2 branch (2019.12.18.)
Added the environment setup for using the requests
python module. That module is needed by ART. And it now (with LCG_95+) lives under its own LCG package.
This is meant to fix ATLINFR-3249. For AthAnalysis
at least. (For making ART functional in AnalysisBase
, a few more updates would be needed. So that is on the backburner for now...)
Unfortunately I can't be entirely sure that this will do everything that's needed.
[bash][atspot01]:ART > grep " import" *
art_base.py:from __future__ import print_function
art_base.py: import scandir as scan
art_base.py: import os as scan
art_base.py:from datetime import datetime, timedelta
art_base.py:from art_configuration import ArtConfiguration
art_base.py:# from art_diff import ArtDiff
art_base.py:from art_header import ArtHeader
art_base.py:from art_misc import build_script_directory, dict_added, dict_changed, dict_removed, get_release, run_command, split_release, xrdcp
art_build.py:from art_misc import interrupt_command, memory, mkdir, run_command, xrdcp, GByte
art_build.py:from art_base import ArtBase
art_build.py:from art_header import ArtHeader
art_build.py:from datetime import datetime
art_configuration.py: (order in the file is not important):
art_grid.py:from __future__ import print_function
art_grid.py:# import errno
art_grid.py:# requests not available on lxplus, import only when needed
art_grid.py:# import requests
art_grid.py:from datetime import datetime
art_grid.py:from art_base import ArtBase
art_grid.py:from art_configuration import ArtConfiguration
art_grid.py:from art_header import ArtHeader
art_grid.py:from art_rucio import ArtRucio
art_grid.py:from art_misc import CVMFS_DIRECTORY, build_script_directory, count_files, gunzip, ls, mkdir, make_executable, rm, run_command, run_command_parallel, search, touch, uncomment_python, uncomment_sh, xrdcp
art_grid.py: import requests
art_grid.py: import urllib3
art_grid.py: import requests
art_header.py:from types import IntType
art_header.py:from types import ListType
art_header.py:from types import StringType
art_header.py:from art_misc import is_exe
art_header.py: # important
art_misc.py:from datetime import datetime
art_rucio.py:from art_misc import run_command
docopt_dispatch.py:from collections import OrderedDict
docopt_dispatch.py: from docopt import docopt
docopt.py: >>> from docopt import docopt
__init__.py:from ART import ArtBase
__init__.py:from art_base import ArtBase # noqa: F401
__init__.py:from art_build import ArtBuild # noqa: F401
__init__.py:from art_grid import ArtGrid # noqa: F401
[bash][atspot01]:ART >
From a quick glance it seems that "only" requests
, urllib3
and docopt
are imported in such a non-global way. (I tested that I can perform from ART import *
even in the current AthAnalysis
setup, so problems only arise when using the code, and letting it import additional modules inside of its functions.)
With this update requests
becomes functional. (urllib3
was functional already.) But I have no idea what to make of docopt
.
Still, with all this uncertainty, I thought it would still be useful to set up the MR as is, as this update certainly doesn't make anything worse. But it may be enough as is to fix the AthAnalysis ART tests...