Skip to content

Commit

Permalink
Merge pull request #127 from PalNilsson/next
Browse files Browse the repository at this point in the history
3.7.6.8
  • Loading branch information
PalNilsson authored May 29, 2024
2 parents dca3186 + 94041bc commit e889c2c
Show file tree
Hide file tree
Showing 61 changed files with 1,556 additions and 1,251 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flake8-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
env:
FLAKE8_VERSION: "==6.1.0"
FLAKE8_CONFIG: ".flake8"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
steps:
- name: Checkout Pilot3 repo
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion PILOTVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.5.4
3.7.6.8
19 changes: 0 additions & 19 deletions doc/components/api/benchmark.rst

This file was deleted.

3 changes: 1 addition & 2 deletions doc/components/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
http://www.apache.org/licenses/LICENSE-2.0

Authors:
- Paul Nilsson, [email protected], 2017-2018
- Paul Nilsson, [email protected], 2017-2024

api components
==============
Expand All @@ -16,7 +16,6 @@ api components
:maxdepth: 2

analytics
benchmark
data
memorymonitor
services
51 changes: 35 additions & 16 deletions pilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
# under the License.
#
# Authors:
# - Mario Lassnig, [email protected], 2016-17
# - Mario Lassnig, [email protected], 2016-2017
# - Daniel Drizhuk, [email protected], 2017
# - Paul Nilsson, [email protected], 2017-24
# - Paul Nilsson, [email protected], 2017-2024

"""This is the entry point for the PanDA Pilot, executed with 'python3 pilot.py <args>'."""

Expand Down Expand Up @@ -121,19 +121,9 @@ def main() -> int:
) # note: assuming IPv6, fallback in place

# check cvmfs if available
is_available = is_cvmfs_available()
if is_available is None:
pass # ignore this case
elif is_available is True:
timestamp = get_last_update()
if timestamp and timestamp > 0:
logger.info('CVMFS has been validated')
else:
logger.warning('CVMFS is not responding - aborting pilot')
return errors.CVMFSISNOTALIVE
else:
logger.warning('CVMFS is not alive - aborting pilot')
return errors.CVMFSISNOTALIVE
ec = check_cvmfs(logger)
if ec:
return ec

if not args.rucio_host:
args.rucio_host = config.Rucio.host
Expand Down Expand Up @@ -202,6 +192,35 @@ def main() -> int:
return exitcode


def check_cvmfs(logger: Any) -> int:
"""
Check if cvmfs is available.
:param logger: logging object.
:return: exit code (int).
"""
# skip all tests if required
if os.environ.get("NO_CVMFS_OK", False):
logger.info("skipping cvmfs checks")
return 0

is_available = is_cvmfs_available()
if is_available is None:
pass # ignore this case
elif is_available is True:
timestamp = get_last_update()
if timestamp and timestamp > 0:
logger.info('CVMFS has been validated')
else:
logger.warning('CVMFS is not responding - aborting pilot')
return errors.CVMFSISNOTALIVE
else:
logger.warning('CVMFS is not alive - aborting pilot')
return errors.CVMFSISNOTALIVE

return 0


def str2bool(var: str) -> bool:
"""
Convert string to bool.
Expand Down Expand Up @@ -638,7 +657,7 @@ def create_main_work_dir() -> (int, str):
f"failed to create workdir at {_mainworkdir} -- aborting: {error}",
file=sys.stderr,
)
exitcode = shell_exit_code(error._errorCode)
exitcode = shell_exit_code(error._error_code)
else:
_mainworkdir = getcwd()

Expand Down
6 changes: 1 addition & 5 deletions pilot/api/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#
# Authors:
# - Paul Nilsson, [email protected], 2018-2023
# - Paul Nilsson, [email protected], 2018-2024

"""Functions for performing analytics including fitting of data."""

Expand Down Expand Up @@ -379,8 +379,6 @@ def chi2(self):
def set_slope(self):
"""
Calculate and set the slope of the linear fit.
:return:
"""
if self._ss2 and self._ss and self._ss != 0:
self._slope = self._ss2 / float(self._ss)
Expand All @@ -398,8 +396,6 @@ def slope(self):
def set_intersect(self):
"""
Calculate and set the intersect of the linear fit.
:return:
"""
if self._ym and self._slope and self._xm:
self._intersect = self._ym - self._slope * self._xm
Expand Down
39 changes: 0 additions & 39 deletions pilot/api/benchmark.py

This file was deleted.

Loading

0 comments on commit e889c2c

Please sign in to comment.