Skip to content

Commit

Permalink
Merge pull request #210 from neutrons/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
backmari authored Feb 19, 2025
2 parents 24ccef2 + b470245 commit ca35949
Show file tree
Hide file tree
Showing 38 changed files with 76 additions and 76 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ repos:
- id: end-of-file-fixer
- id: sort-simple-yaml
- repo: https://github.com/psf/black
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
args: ['--line-length=119']
exclude: '\.template$'
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
rev: 7.1.2
hooks:
- id: flake8
exclude: '\.template$'
6 changes: 3 additions & 3 deletions src/dasmon_app/dasmon_listener/amq_consumer.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# pylint: disable=invalid-name, line-too-long, too-many-locals, bare-except, too-many-statements, too-many-branches
"""
DASMON ActiveMQ consumer class
DASMON ActiveMQ consumer class
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
"""
import sys
import time
Expand Down
2 changes: 1 addition & 1 deletion src/dasmon_app/dasmon_listener/listener_daemon.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
DASMON listener daemon
DASMON listener daemon
"""

import sys
Expand Down
6 changes: 3 additions & 3 deletions src/webmon_app/reporting/dasmon/legacy_status.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Get the status of legacy instruments
Get the status of legacy instruments
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2015 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2015 Oak Ridge National Laboratory
"""

import httplib2
Expand Down
6 changes: 3 additions & 3 deletions src/webmon_app/reporting/dasmon/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Dasmon app models
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2015 Oak Ridge National Laboratory
Dasmon app models
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2015 Oak Ridge National Laboratory
"""

from django.db import models
Expand Down
2 changes: 1 addition & 1 deletion src/webmon_app/reporting/dasmon/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=invalid-name, line-too-long
"""
Define url structure
Define url structure
"""
from django.urls import re_path
from . import views
Expand Down
6 changes: 3 additions & 3 deletions src/webmon_app/reporting/dasmon/view_util.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Status monitor utilities to support 'dasmon' views
Status monitor utilities to support 'dasmon' views
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
"""

from reporting.report.models import Instrument, DataRun, WorkflowSummary, Information
Expand Down
2 changes: 1 addition & 1 deletion src/webmon_app/reporting/dasmon/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=invalid-name, line-too-long, too-many-locals, bare-except
"""
Live monitoring
Live monitoring
"""
import json
import logging
Expand Down
6 changes: 3 additions & 3 deletions src/webmon_app/reporting/pvmon/models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Models for PV monitor app
Models for PV monitor app
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
"""

from django.db import models
Expand Down
2 changes: 1 addition & 1 deletion src/webmon_app/reporting/pvmon/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=invalid-name, line-too-long
"""
Define url structure
Define url structure
"""
from django.urls import re_path
from . import views
Expand Down
6 changes: 3 additions & 3 deletions src/webmon_app/reporting/pvmon/view_util.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# pylint: disable=too-many-branches, line-too-long, too-many-locals, too-many-statements, bare-except, invalid-name
"""
Utilities to compile the PVs stored in the web monitor DB.
Utilities to compile the PVs stored in the web monitor DB.
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
"""
from reporting.pvmon.models import PVName, PV, PVCache, PVStringCache
from django.utils import timezone, formats
Expand Down
2 changes: 1 addition & 1 deletion src/webmon_app/reporting/pvmon/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Live PV monitoring
Live PV monitoring
"""

from django.http import HttpResponse
Expand Down
6 changes: 3 additions & 3 deletions src/webmon_app/reporting/reduction/forms.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# pylint: disable=bare-except, line-too-long, invalid-name
"""
Forms for auto-reduction configuration
Forms for auto-reduction configuration
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
"""
import re
import logging
Expand Down
2 changes: 1 addition & 1 deletion src/webmon_app/reporting/reduction/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=invalid-name, line-too-long
"""
Define url structure
Define url structure
"""
from django.urls import re_path
from . import views
Expand Down
6 changes: 3 additions & 3 deletions src/webmon_app/reporting/reduction/view_util.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Utilities for reduction configuration views
Utilities for reduction configuration views
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
"""

from django.conf import settings
Expand Down
6 changes: 3 additions & 3 deletions src/webmon_app/reporting/reduction/views.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Automated reduction configuration view
Automated reduction configuration view
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
"""

import logging
Expand Down
8 changes: 4 additions & 4 deletions src/webmon_app/reporting/report/catalog.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# pylint: disable=bare-except, invalid-name, too-many-nested-blocks, too-many-locals, too-many-branches, line-too-long
"""
Optional utilities to communicate with ONcat.
ONcat is an online data catalog used internally at ORNL.
Optional utilities to communicate with ONcat.
ONcat is an online data catalog used internally at ORNL.
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2018 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2018 Oak Ridge National Laboratory
"""
import logging

Expand Down
6 changes: 3 additions & 3 deletions src/webmon_app/reporting/report/forms.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# pylint: disable=invalid-name, line-too-long, too-many-branches
"""
Forms for auto-reduction configuration
Forms for auto-reduction configuration
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2016 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2016 Oak Ridge National Laboratory
"""
from django import forms
from django.core.exceptions import ValidationError
Expand Down
6 changes: 3 additions & 3 deletions src/webmon_app/reporting/report/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
The definition of the models is shared by the workflow manager and the
reporting app. The models are defined in the workflow manager and should be
installed on the system before running the app.
The definition of the models is shared by the workflow manager and the
reporting app. The models are defined in the workflow manager and should be
installed on the system before running the app.
"""

from workflow.database.report.models import * # noqa: F401, F403
2 changes: 1 addition & 1 deletion src/webmon_app/reporting/report/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=invalid-name, line-too-long
"""
Define url structure
Define url structure
"""
from django.urls import re_path
from . import views
Expand Down
8 changes: 4 additions & 4 deletions src/webmon_app/reporting/report/view_util.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Status monitor utilities to support 'report' views
Status monitor utilities to support 'report' views
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
"""

import logging
Expand Down Expand Up @@ -584,7 +584,7 @@ def extract_d3_data_from_json(json_data):
:param json_data: json data block
"""
plot_data = None
x_label = "Q [1/\u00C5]"
x_label = "Q [1/\u00c5]"
y_label = "Absolute reflectivity"

# Return dummy data if not data is coming in.
Expand Down
6 changes: 3 additions & 3 deletions src/webmon_app/reporting/report/views.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# pylint: disable=invalid-name, line-too-long, too-many-locals, bare-except, unused-argument
"""
Report views
Report views
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014-2015 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014-2015 Oak Ridge National Laboratory
"""
import sys
import logging
Expand Down
2 changes: 1 addition & 1 deletion src/webmon_app/reporting/reporting_app/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=invalid-name, line-too-long
"""
Define url structure
Define url structure
"""
from django.urls import include, path
from django.contrib.auth.decorators import login_required
Expand Down
4 changes: 2 additions & 2 deletions src/webmon_app/reporting/reporting_app/view_util.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Utilities common to the whole web application.
Utilities common to the whole web application.
@copyright: 2014 Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
"""

from django.conf import settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def test_extract_d3_data_from_json(self):
# null case
plot_data, x_label, y_label = extract_d3_data_from_json(None)
self.assertEqual(plot_data, None)
self.assertEqual(x_label, "Q [1/\u00C5]")
self.assertEqual(x_label, "Q [1/\u00c5]")
self.assertEqual(y_label, "Absolute reflectivity")
# main_output in data_dict['main_output']
json_data = json.dumps(
Expand Down
2 changes: 1 addition & 1 deletion src/webmon_app/reporting/users/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=invalid-name
"""
Define url structure
Define url structure
"""
from django.urls import re_path
from . import views
Expand Down
2 changes: 1 addition & 1 deletion src/webmon_app/reporting/users/view_util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=bare-except, invalid-name
"""
View utility functions for user management
View utility functions for user management
"""
from django.urls import reverse
from django.shortcuts import redirect
Expand Down
2 changes: 1 addition & 1 deletion src/webmon_app/reporting/users/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
User management
User management
"""

from django.shortcuts import render, redirect
Expand Down
6 changes: 3 additions & 3 deletions src/workflow_app/workflow/amq_client.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# pylint: disable=bare-except, too-many-instance-attributes, too-many-arguments, invalid-name, line-too-long
"""
ActiveMQ workflow manager client
ActiveMQ workflow manager client
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
@author: M. Doucet, Oak Ridge National Laboratory
@copyright: 2014 Oak Ridge National Laboratory
"""
import time
import stomp
Expand Down
2 changes: 1 addition & 1 deletion src/workflow_app/workflow/amq_listener.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=bare-except, line-too-long
"""
ActiveMQ listener class for the workflow manager
ActiveMQ listener class for the workflow manager
"""
import stomp
import logging
Expand Down
4 changes: 2 additions & 2 deletions src/workflow_app/workflow/daemon.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
Code taken from:
http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
Code taken from:
http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
"""
import sys
import os
Expand Down
2 changes: 1 addition & 1 deletion src/workflow_app/workflow/database/transactions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=too-many-locals, too-many-statements, bare-except, invalid-name
"""
Perform DB transactions
Perform DB transactions
"""
import os
import json
Expand Down
2 changes: 1 addition & 1 deletion src/workflow_app/workflow/sns_post_processing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# pylint: disable=invalid-name, line-too-long, too-many-arguments
"""
Workflow manager process
Workflow manager process
"""
import os
import sys
Expand Down
6 changes: 3 additions & 3 deletions src/workflow_app/workflow/states.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Action classes to be called when receiving specific messages.
Action classes to be called when receiving specific messages.
To add an action for a specific queue, add a StateAction class
with the name of the queue in lower-case, replacing periods with underscores.
To add an action for a specific queue, add a StateAction class
with the name of the queue in lower-case, replacing periods with underscores.
"""

from .state_utilities import logged_action
Expand Down
2 changes: 1 addition & 1 deletion src/workflow_app/workflow/workflow_process.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Actual process that each data run must go through.
Actual process that each data run must go through.
"""

import json
Expand Down
2 changes: 1 addition & 1 deletion tests/amq_looper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=bare-except, too-many-arguments, invalid-name
"""
AMQ test client
AMQ test client
"""
import sys
import time
Expand Down
2 changes: 1 addition & 1 deletion tests/simple_producer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Example of a simple non-listening producer
Example of a simple non-listening producer
"""

import stomp
Expand Down
4 changes: 2 additions & 2 deletions tests/workflow_command.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
ActiveMQ client used to issue commands to the post-processing workflow.
NOTE: Only works for runs that are already in the DB
ActiveMQ client used to issue commands to the post-processing workflow.
NOTE: Only works for runs that are already in the DB
"""

from report.models import Instrument, DataRun
Expand Down

0 comments on commit ca35949

Please sign in to comment.