From 541586f028e50890b5c6316098f6830fcb9f5614 Mon Sep 17 00:00:00 2001 From: Chris Burr <christopher.burr@cern.ch> Date: Mon, 13 Dec 2021 11:05:00 +0100 Subject: [PATCH 1/2] feat: Support DIRAC v8.0.x --- .gitlab-ci.yml | 6 +++--- setup.cfg | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22a2e57d5b..63d4dcdf91 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,8 +74,8 @@ pre-commit: # Create the environment and install DIRAC+LHCbDIRAC # We take the environment from the branch and not the release # to not depend on a release to change the dependencies. - - git checkout ${diracBranch} -- environment-py3.yml - - mamba env create --file environment-py3.yml --name test-env + - git checkout ${diracBranch} -- environment.yml + - mamba env create --file environment.yml --name test-env - conda activate test-env - pip install .[server] - cd ../LHCbDIRAC @@ -145,7 +145,7 @@ integration_tests: parallel: matrix: - TEST_COMMAND: - - python3 ./integration_tests.py create "LHCBDIRAC_RELEASE=$${lhcbdiracTag}" USE_PYTHON3=Yes --extra-module LHCbDIRAC=../LHCbDIRAC + - python3 ./integration_tests.py create "LHCBDIRAC_RELEASE=$${lhcbdiracTag}" --extra-module LHCbDIRAC=../LHCbDIRAC before_script: # Install dependencies - apk add docker py3-pip python3 bash git docker-compose jq curl diff --git a/setup.cfg b/setup.cfg index ef8a996d21..ee64d887ce 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,7 @@ package_dir= =src packages = find: install_requires = - DIRAC ~= 7.3.0 + DIRAC ~= 8.0.0a0 LbPlatformUtils LbEnv LbProdRun -- GitLab From d72e0abd78009476d1f6e0cbd48d4cfcad6b0889 Mon Sep 17 00:00:00 2001 From: Chris Burr <christopher.burr@cern.ch> Date: Mon, 13 Dec 2021 16:37:01 +0100 Subject: [PATCH 2/2] fix (docs): Follow upstream docs changes in DIRAC --- .gitlab-ci.yml | 3 +- .../Core/scripts/install_oracle-client.sh | 16 --------- .../scripts/dirac_production_set_runs.py | 36 +++++++++---------- 3 files changed, 19 insertions(+), 36 deletions(-) delete mode 100755 src/LHCbDIRAC/Core/scripts/install_oracle-client.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63d4dcdf91..65f7ed5801 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -105,8 +105,6 @@ check_docs: - cd docs # We need to export the DIRAC env variable so that the makefile knows where to find the documentation tools - export DIRACDOCTOOLS=$(dirname $(python -c "import diracdoctools; print(diracdoctools.__file__)")) - # Remove numpy from DIRAC_DOC_MOCK_LIST as uproot fails to import without it - - sed -i "s@'numpy',@@" "${DIRACDOCTOOLS}/__init__.py" - SPHINXOPTS=-wsphinxWarnings make htmlall || { echo "Failed to build documentation, check for errors above" ; exit 1; } # Check that sphinxWarnings is not empty - > @@ -116,6 +114,7 @@ check_docs: echo "********************************************************************************" cat sphinxWarnings echo "********************************************************************************" + cat source/Commands/index.rst exit 1 fi only: diff --git a/src/LHCbDIRAC/Core/scripts/install_oracle-client.sh b/src/LHCbDIRAC/Core/scripts/install_oracle-client.sh deleted file mode 100755 index cd0b3ef3c1..0000000000 --- a/src/LHCbDIRAC/Core/scripts/install_oracle-client.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -############################################################################### -# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # -# # -# This software is distributed under the terms of the GNU General Public # -# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". # -# # -# In applying this licence, CERN does not waive the privileges and immunities # -# granted to it by virtue of its status as an Intergovernmental Organization # -# or submit itself to any jurisdiction. # -############################################################################### -# Install Oracle client module on a CERN vobox machine -# -pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org cx_Oracle==7.3 -# -exit 0 diff --git a/src/LHCbDIRAC/TransformationSystem/scripts/dirac_production_set_runs.py b/src/LHCbDIRAC/TransformationSystem/scripts/dirac_production_set_runs.py index c19e47baf5..aa1cb177d1 100755 --- a/src/LHCbDIRAC/TransformationSystem/scripts/dirac_production_set_runs.py +++ b/src/LHCbDIRAC/TransformationSystem/scripts/dirac_production_set_runs.py @@ -35,24 +35,24 @@ def main(): from DIRAC.Core.Base import Script Script.setUsageMessage( - __doc__ - + "\n".join( - [ - "Usage:", - " %s [option|cfgfile] ... Prod -Option [RunNumber|RunList]" % Script.scriptName, - "Arguments:", - " Prod: DIRAC Production Id", - " RunNumber: New Start or End run", - " RunList: List of Runs to be added", - "Examples:\n", - "dirac-production-set-run.py 92 --List (show the list of runs for transformation 92)\n", - "dirac-production-set-run.py 92 --AddRuns 98200,98201 (add some discrete run to transformation 92)\n", - "dirac-production-set-run.py 92 --AddRuns 98200,98201,99000:99100 (add some discrete run and\ - a range of runs to transformation 92)\n", - "dirac-production-set-run.py 92 --StartRun 98200 (change the start run for transformation 92)\n", - "dirac-production-set-run.py 92 --EndRun 98200 (change the end run for transformation 92)\n", - ] - ) + f"{__doc__}" + f"Usage:\n" + f" {Script.scriptName} [option|cfgfile] ... Prod -Option [RunNumber|RunList]\n" + "Arguments:\n" + " Prod: DIRAC Production Id\n" + " RunNumber: New Start or End run\n" + " RunList: List of Runs to be added\n" + "Examples:\n" + " # show the list of runs for transformation 92\n" + " dirac-production-set-run.py 92 --List\n" + " # add some discrete run to transformation 92\n" + " dirac-production-set-run.py 92 --AddRuns 98200,98201\n" + " # add some discrete run and a range of runs to transformation 92\n" + " dirac-production-set-run.py 92 --AddRuns 98200,98201,99000:99100\n" + " # change the start run for transformation 92\n" + " dirac-production-set-run.py 92 --StartRun 98200\n" + " # change the end run for transformation 92\n" + " dirac-production-set-run.py 92 --EndRun 98200\n" ) Script.registerSwitch("", "EndRun=", "Specify endrun for the transformation") -- GitLab