Skip to content

Commit

Permalink
global: upgrade black formatter version
Browse files Browse the repository at this point in the history
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

reana-team authored and tiborsimko committed Mar 31, 2022
1 parent 0bb68dd commit 24d3ce4
Showing 8 changed files with 39 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of REANA.
# Copyright (C) 2020 CERN.
# Copyright (C) 2020, 2022 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
@@ -34,7 +34,7 @@ jobs:
- name: Check Python code formatting
run: |
pip install --upgrade pip
pip install black==19.10b0
pip install black
./run-tests.sh --check-black
lint-flake8:
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -62,7 +62,10 @@
"page": "_static/api",
"spec": "openapi.json",
"embed": True,
"opts": {"hide-loading": True, "hide-hostname": True,},
"opts": {
"hide-loading": True,
"hide-hostname": True,
},
}
]

10 changes: 6 additions & 4 deletions reana_job_controller/job_monitor.py
Original file line number Diff line number Diff line change
@@ -212,10 +212,12 @@ def _get_containers_logs(self, job_pod) -> Optional[str]:
logging.info(f"Grabbing pod {job_pod.metadata.name} logs ...")
for container in container_statuses:
if container.state.terminated:
container_log = current_k8s_corev1_api_client.read_namespaced_pod_log(
namespace=REANA_RUNTIME_KUBERNETES_NAMESPACE,
name=job_pod.metadata.name,
container=container.name,
container_log = (
current_k8s_corev1_api_client.read_namespaced_pod_log(
namespace=REANA_RUNTIME_KUBERNETES_NAMESPACE,
name=job_pod.metadata.name,
container=container.name,
)
)
pod_logs += "{}: :\n {}\n".format(container.name, container_log)
if hasattr(container.state.terminated, "reason"):
4 changes: 3 additions & 1 deletion reana_job_controller/kubernetes_job_manager.py
Original file line number Diff line number Diff line change
@@ -313,7 +313,9 @@ def add_memory_limit(self, job_spec):

def _set_job_memory_limit(job_spec, memory_limit):
job_spec["containers"][0]["resources"] = {
"limits": {"memory": memory_limit,}
"limits": {
"memory": memory_limit,
}
}

if self.kubernetes_memory_limit:
5 changes: 4 additions & 1 deletion reana_job_controller/spec.py
Original file line number Diff line number Diff line change
@@ -22,7 +22,10 @@ def build_openapi_spec():
title="reana-job-controller",
version=__version__,
info=dict(description="REANA Job Controller API"),
plugins=["apispec.ext.flask", "apispec.ext.marshmallow",],
plugins=[
"apispec.ext.flask",
"apispec.ext.marshmallow",
],
)

# Add marshmallow models to specification
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -53,8 +53,8 @@ pyrsistent==0.18.0 # via jsonschema
python-dateutil==2.8.2 # via bravado, bravado-core, kubernetes
pytz==2021.3 # via bravado-core, fs
pyyaml==5.4.1 # via apispec, bravado, bravado-core, kubernetes, reana-commons, swagger-spec-validator
reana-commons[kubernetes]==0.9.0a5 # via reana-db, reana-job-controller (setup.py)
reana-db==0.9.0a4 # via reana-job-controller (setup.py)
reana-commons[kubernetes]==0.9.0a6 # via reana-db, reana-job-controller (setup.py)
reana-db==0.9.0a5 # via reana-job-controller (setup.py)
requests-oauthlib==1.3.0 # via kubernetes
requests==2.26.0 # via bravado, kubernetes, requests-oauthlib
retrying==1.3.3 # via reana-job-controller (setup.py)
4 changes: 2 additions & 2 deletions run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#
# This file is part of REANA.
# Copyright (C) 2017, 2018, 2020, 2021 CERN.
# Copyright (C) 2017, 2018, 2020, 2021, 2022 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
@@ -123,7 +123,7 @@ check_all_darwin () {
apt update && apt-get -y install libkrb5-dev git shellcheck &&
pip install -r requirements.txt &&
pip install -e .[all] && # Install test dependencies
pip install black==19.10b0 &&
pip install black &&
pip install flake8 &&
pip install pydocstyle &&
pip install check-manifest &&
22 changes: 16 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -19,11 +19,15 @@
history = open("CHANGES.rst").read()

tests_require = [
"pytest-reana>=0.9.0a1,<0.10.0",
"pytest-reana>=0.9.0a4,<0.10.0",
]

extras_require = {
"debug": ["wdb", "ipdb", "Flask-DebugToolbar",],
"debug": [
"wdb",
"ipdb",
"Flask-DebugToolbar",
],
"docs": [
"Sphinx>=1.5.1,<1.6",
"sphinx-rtd-theme>=0.1.9",
@@ -55,8 +59,8 @@
"Werkzeug>=1.0.1,<2.0",
"fs>=2.0",
"marshmallow>2.13.0,<=2.20.1",
"reana-commons[kubernetes]>=0.9.0a5,<0.10.0",
"reana-db>=0.9.0a4,<0.10.0",
"reana-commons[kubernetes]>=0.9.0a6,<0.10.0",
"reana-db>=0.9.0a5,<0.10.0",
"htcondor==8.9.11",
"retrying>=1.3.3",
]
@@ -78,9 +82,15 @@
author="REANA",
author_email="info@reana.io",
url="https://github.com/reanahub/reana-job-controller",
packages=["reana_job_controller",],
packages=[
"reana_job_controller",
],
zip_safe=False,
entry_points={"flask.commands": ["openapi = reana_job_controller.cli:openapi",],},
entry_points={
"flask.commands": [
"openapi = reana_job_controller.cli:openapi",
],
},
extras_require=extras_require,
install_requires=install_requires,
setup_requires=setup_requires,

0 comments on commit 24d3ce4

Please sign in to comment.