Skip to content

Commit

Permalink
style: organized imports
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Mar 6, 2024
1 parent a3a968d commit 98770d1
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/DIRAC/Core/Utilities/Grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
The Grid module contains several utilities for grid operations
"""

from DIRAC.Core.Utilities.ReturnValues import S_OK, S_ERROR
from DIRAC.Core.Utilities.ReturnValues import S_ERROR, S_OK
from DIRAC.Core.Utilities.Subprocess import shellCall


Expand Down
10 changes: 4 additions & 6 deletions src/DIRAC/Resources/Computing/ARCComputingElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@
import uuid

import arc # Has to work if this module is called #pylint: disable=import-error
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities.Subprocess import shellCall
from DIRAC.Core.Utilities.List import breakListIntoChunks

from DIRAC import S_ERROR, S_OK
from DIRAC.Core.Security.ProxyInfo import getVOfromProxyGroup
from DIRAC.Core.Utilities.Decorators import deprecated
from DIRAC.Core.Utilities.List import breakListIntoChunks
from DIRAC.Core.Utilities.Subprocess import shellCall
from DIRAC.Resources.Computing.ComputingElement import ComputingElement
from DIRAC.Resources.Computing.PilotBundle import writeScript
from DIRAC.WorkloadManagementSystem.Client import PilotStatus


MANDATORY_PARAMETERS = ["Queue"] # Mandatory for ARC CEs in GLUE2?
# See https://www.nordugrid.org/arc/arc6/tech/rest/rest.html#rest-interface-job-states
# We let "Deleted, Hold, Undefined" for the moment as we are not sure whether they are still used
Expand Down Expand Up @@ -127,7 +127,6 @@ def __init__(self, ceUniqueID):
self.pilotProxy = ""
self.queue = ""
self.arcQueue = ""
self.gridEnv = ""
self.ceHost = self.ceName
self.endpointType = "Gridftp"
self.usercfg = arc.common.UserConfig()
Expand Down Expand Up @@ -272,7 +271,6 @@ def _reset(self):
self.arcQueue = self.queue.split("-", 2)[2]

self.ceHost = self.ceParameters.get("Host", self.ceHost)
self.gridEnv = self.ceParameters.get("GridEnv", self.gridEnv)

# extra XRSL data (should respect the XRSL format)
self.xrslExtraString = self.ceParameters.get("XRSLExtraString", self.xrslExtraString)
Expand Down
12 changes: 6 additions & 6 deletions src/DIRAC/Resources/Computing/HTCondorCEComputingElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@
import os
import subprocess
import tempfile
import threading
import textwrap
import threading
import uuid

from DIRAC import S_ERROR, S_OK, gConfig
from DIRAC.Core.Utilities.File import makeGuid, mkDir
from DIRAC.Core.Utilities.Subprocess import systemCall
from DIRAC.Core.Security.Locations import getCAsLocation
from DIRAC.Core.Utilities.File import mkDir
from DIRAC.Core.Utilities.List import breakListIntoChunks
from DIRAC.Core.Utilities.Subprocess import systemCall
from DIRAC.FrameworkSystem.private.authorization.utils.Tokens import writeToTokenFile
from DIRAC.Resources.Computing.BatchSystems.Condor import HOLD_REASON_SUBCODE, parseCondorStatus, subTemplate
from DIRAC.Resources.Computing.ComputingElement import ComputingElement
from DIRAC.WorkloadManagementSystem.Client import PilotStatus
from DIRAC.WorkloadManagementSystem.Client.PilotManagerClient import PilotManagerClient
from DIRAC.FrameworkSystem.private.authorization.utils.Tokens import writeToTokenFile
from DIRAC.Core.Security.Locations import getCAsLocation
from DIRAC.Resources.Computing.BatchSystems.Condor import HOLD_REASON_SUBCODE, subTemplate, parseCondorStatus

MANDATORY_PARAMETERS = ["Queue"]
DEFAULT_WORKINGDIRECTORY = "/opt/dirac/pro/runit/WorkloadManagement/SiteDirectorHT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
tests for HTCondorCEComputingElement module
"""
import uuid

import pytest

from DIRAC import S_OK
from DIRAC.Resources.Computing import HTCondorCEComputingElement as HTCE
from DIRAC.Resources.Computing.BatchSystems import Condor
from DIRAC import S_OK

MODNAME = "DIRAC.Resources.Computing.HTCondorCEComputingElement"

Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/WorkloadManagementSystem/Service/WMSUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import shutil
from tempfile import mkdtemp

from DIRAC import S_ERROR, S_OK, gConfig, gLogger
from DIRAC import S_ERROR, S_OK, gLogger
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
from DIRAC.ConfigurationSystem.Client.Helpers.Registry import (
getDNForUsername,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
""" Test class for QueueUtilities
"""
import pytest
import copy
from unittest.mock import MagicMock


import pytest
from DIRAC import S_OK
from DIRAC.WorkloadManagementSystem.Utilities.QueueUtilities import *


siteDict1 = {
"Site1": {
"CE1": {"Queues": {"Queue1": {}, "Queue2": {}}, "CEType": "Type1"},
Expand Down

0 comments on commit 98770d1

Please sign in to comment.