Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kernelci/api/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def _is_job_filtered(self, node):
return False

# pylint: disable=too-many-arguments
def create_job_node(self, job_config, input_node,
def create_job_node(self, job_config, input_node, *,
runtime=None, platform=None, retry_counter=0):
"""Create a new job node based on input and configuration"""
jobfilter = input_node.get('jobfilter')
Expand Down
4 changes: 2 additions & 2 deletions kernelci/cli/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def unsubscribe(config, api, sub_id, secrets):
@Args.api
@catch_error
# pylint: disable=too-many-arguments
def send(input_file, channel, is_json, config, api, secrets):
def send(input_file, channel, *, is_json, config, api, secrets):
"""Read some data and send it as an event on a channel"""
api = get_api(config, api, secrets)
data = json.load(input_file) if is_json else input_file.read()
Expand Down Expand Up @@ -90,7 +90,7 @@ def receive(sub_id, config, api, indent, secrets):
@Args.api
@catch_error
# pylint: disable=too-many-arguments
def push(input_file, list_name, is_json, config, api, secrets):
def push(input_file, list_name, *, is_json, config, api, secrets):
"""Read some data and push it as an event on a list"""
api = get_api(config, api, secrets)
data = json.load(input_file) if is_json else input_file.read()
Expand Down
6 changes: 3 additions & 3 deletions kernelci/cli/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def kci_job():
@Args.api
@Args.indent
@catch_error
def new(name, input_node_id, platform, # pylint: disable=too-many-arguments
def new(name, input_node_id, *, platform, # pylint: disable=too-many-arguments
runtime, config, api, indent, secrets):
"""Create a new job node"""
configs = kernelci.config.load(config)
Expand Down Expand Up @@ -78,7 +78,7 @@ def new(name, input_node_id, platform, # pylint: disable=too-many-arguments
@Args.config
@Args.api
@catch_error
def generate(node_id, # pylint: disable=too-many-arguments, too-many-locals
def generate(node_id, *, # pylint: disable=too-many-arguments, too-many-locals
runtime, storage, platform, output, config, api, secrets):
"""Generate a job definition in a file"""
configs = kernelci.config.load(config)
Expand Down Expand Up @@ -152,7 +152,7 @@ def _get_runtime(runtime, config, secrets):
@Args.runtime
@Args.config
@catch_error
def submit(runtime, job_path, wait, # pylint: disable=too-many-arguments
def submit(job_path, *, runtime, wait, # pylint: disable=too-many-arguments
config, secrets, api): # pylint: disable=unused-argument
"""Submit a job definition to its designated runtime"""
configs = kernelci.config.load(config)
Expand Down
2 changes: 1 addition & 1 deletion kernelci/cli/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get(node_id, config, api, indent):
@Args.page_number
@catch_error
# pylint: disable=too-many-arguments
def find(attributes, config, api, indent, page_length, page_number):
def find(attributes, *, config, api, indent, page_length, page_number):
"""Find nodes with arbitrary attributes"""
api = get_api(config, api)
offset, limit = get_pagination(page_length, page_number)
Expand Down
2 changes: 1 addition & 1 deletion kernelci/cli/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def whoami(config, api, indent, secrets):
@Args.page_number
@catch_error
# pylint: disable=too-many-arguments
def find(attributes, config, api, indent, secrets, page_length, page_number):
def find(attributes, *, config, api, indent, secrets, page_length, page_number):
"""Find user profiles with arbitrary attributes"""
api = get_api(config, api, secrets)
offset, limit = get_pagination(page_length, page_number)
Expand Down
2 changes: 1 addition & 1 deletion kernelci/config/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Job(YAMLConfigObject): # pylint: disable=too-many-instance-attributes
yaml_tag = '!Job'

# pylint: disable=too-many-arguments
def __init__(self, name, template, kind="node", image=None, params=None, rules=None,
def __init__(self, name, template, *, kind="node", image=None, params=None, rules=None,
kcidb_test_suite=None, priority=None):
self._name = name
self._template = template
Expand Down
2 changes: 1 addition & 1 deletion kernelci/config/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Platform(YAMLConfigObject):
yaml_tag = '!Platform'

# pylint: disable=too-many-arguments
def __init__(self, name, arch="x86_64", base_name=None,
def __init__(self, name, *, arch="x86_64", base_name=None,
boot_method="grub", context=None, compatible=None,
dtb=None, mach="x86", params=None, rules=None):
self._name = name
Expand Down
1 change: 1 addition & 0 deletions kernelci/config/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class RuntimeLAVA(Runtime):
# pylint: disable=too-many-arguments
def __init__(
self,
*,
url=None,
priority=None,
priority_min=None,
Expand Down
2 changes: 1 addition & 1 deletion kernelci/config/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SchedulerEntry(YAMLConfigObject):
yaml_tag = '!SchedulerEntry'

# pylint: disable=too-many-arguments
def __init__(self, job, runtime, event, platforms=None, rules=None):
def __init__(self, job, runtime, event, *, platforms=None, rules=None):
self._job = job
self._runtime = runtime
self._event = event
Expand Down
3 changes: 2 additions & 1 deletion kernelci/runtime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ class Runtime(abc.ABC):
TEMPLATES = ['config/runtime', '/etc/kernelci/runtime']

# pylint: disable=unused-argument,too-many-arguments
def __init__(self, config, user=None, token=None, custom_template_dir=None, kcictx=None):
def __init__(self, config, *, user=None, token=None,
custom_template_dir=None, kcictx=None):
"""A Runtime object can be used to run jobs in a runtime environment

*config* is a kernelci.config.runtime.Runtime object
Expand Down
4 changes: 1 addition & 3 deletions kernelci/runtime/lava.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,7 @@ def _get_priority(self, job):
node = job.node
submitter = node.get('submitter')
if submitter and submitter != 'service:pipeline':
priority = priority + 1
if priority > self.config.priority_max:
priority = self.config.priority_max
priority = min(priority + 1, self.config.priority_max)
return priority

def get_params(self, job, api_config=None):
Expand Down
1 change: 1 addition & 0 deletions kernelci/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def get_schedule(self, event, channel='node'):
for config in self.get_configs(event, channel):
runtime_name = config.runtime.get('name')
runtime_type = config.runtime.get('type')
runtime = None
if runtime_name:
runtime = self._runtimes.get(runtime_name)
elif runtime_type:
Expand Down
38 changes: 19 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ readme = "README.md"
requires-python = ">=3.9"
license = {text = "LGPL-2.1-or-later"}
dependencies = [
"azure-storage-blob==12.23.1",
"azure-storage-file-share==12.13.0",
"azure-storage-blob==12.27.1",
"azure-storage-file-share==12.23.1",
"bson==0.5.10",
"click==8.1.3",
"cloudevents==1.9.0",
"click==8.3.1",
"cloudevents==1.12.0",
"docker==7.1.0",
"jinja2==3.1.6",
"kubernetes==26.1.0",
"paramiko==3.4.0",
"pydantic==2.9.2",
"pyelftools==0.29",
"pytest==7.4.0",
"pyyaml==6.0.2",
"requests==2.32.4",
"scp==0.14.5",
"kubernetes==34.1.0",
"paramiko==4.0.0",
"pydantic==2.12.5",
"pyelftools==0.32",
"pytest==9.0.2",
"pyyaml==6.0.3",
"requests==2.32.5",
"scp==0.15.0",
"toml==0.10.2",
]
authors = [
Expand Down Expand Up @@ -58,13 +58,13 @@ classifiers = [

[project.optional-dependencies]
dev = [
"mypy==1.4.1",
"pycodestyle==2.10.0",
"pylint==2.17.2",
"pytest-mock==3.11.1",
"types-PyYAML==6.0.12.10",
"types-requests==2.31.0.1",
"types-urllib3==1.26.25.13",
"mypy==1.19.1",
"pycodestyle==2.14.0",
"pylint==4.0.4",
"pytest-mock==3.15.1",
"types-PyYAML==6.0.12.20250915",
"types-requests==2.32.4.20250913",
"types-urllib3==1.26.25.14",
]

[project.urls]
Expand Down
14 changes: 7 additions & 7 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-r requirements.txt
mypy==1.4.1
pycodestyle==2.10.0
pylint==2.17.2
pytest-mock==3.11.1
types-PyYAML==6.0.12.10
types-requests==2.31.0.1
types-urllib3==1.26.25.13
mypy==1.19.1
pycodestyle==2.14.0
pylint==4.0.4
pytest-mock==3.15.1
types-PyYAML==6.0.12.20250915
types-requests==2.32.4.20250913
types-urllib3==1.26.25.14
22 changes: 11 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
azure-storage-blob==12.23.1
azure-storage-file-share==12.13.0
azure-storage-blob==12.27.1
azure-storage-file-share==12.23.1
bson==0.5.10
click==8.1.3
cloudevents==1.9.0
click==8.3.1
cloudevents==1.12.0
docker==7.1.0
jinja2==3.1.6
kubernetes==34.1.0
paramiko==3.4.0
pydantic==2.9.2
pyelftools==0.29
pytest==7.4.0
pyyaml==6.0.2
requests==2.32.4
scp==0.14.5
paramiko==4.0.0
pydantic==2.12.5
pyelftools==0.32
pytest==9.0.2
pyyaml==6.0.3
requests==2.32.5
scp==0.15.0
toml==0.10.2