Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.

Commit 623de8c

Browse files
author
Dimitar Tasev
committed
Renames package to autoreduce_run_detection
1 parent 34d2d05 commit 623de8c

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed
File renamed without changes.
File renamed without changes.

isis_file_polling/ingest.py renamed to autoreduce_run_detection/run_detection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import requests
1616
from requests.models import Response
1717

18-
from isis_file_polling.settings import LOCAL_CACHE_LOCATION, AUTOREDUCE_API_URL, AUTOREDUCE_TOKEN
18+
from autoreduce_run_detection.settings import LOCAL_CACHE_LOCATION, AUTOREDUCE_API_URL, AUTOREDUCE_TOKEN
1919

2020
INGEST_LOG = logging.getLogger('ingest')
2121

File renamed without changes.

isis_file_polling/tests/test_ingest.py renamed to autoreduce_run_detection/tests/test_run_detection.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI
55
# ##################################################################################### #
66
"""
7-
Unit tests for ingest
7+
Unit tests for run_detection
88
"""
99
import unittest
1010
import os
@@ -13,8 +13,8 @@
1313
from filelock import FileLock
1414
from mock import Mock, patch, call
1515

16-
from isis_file_polling.ingest import InstrumentMonitor, InstrumentMonitorError, update_last_runs, main
17-
from isis_file_polling.settings import AUTOREDUCE_API_URL, LOCAL_CACHE_LOCATION
16+
from autoreduce_run_detection.run_detection import InstrumentMonitor, InstrumentMonitorError, update_last_runs, main
17+
from autoreduce_run_detection.settings import AUTOREDUCE_API_URL, LOCAL_CACHE_LOCATION
1818

1919
# Test data
2020
SUMMARY_FILE = ("WIS44731Smith,Smith,"
@@ -109,7 +109,7 @@ def test_submit_run_difference(self):
109109
self.assertEqual(run_number, '44733')
110110
inst_mon.submit_runs.assert_has_calls([call(44732, 44734)])
111111

112-
@patch('isis_file_polling.ingest.requests.post', return_value='44736')
112+
@patch('autoreduce_run_detection.run_detection.requests.post', return_value='44736')
113113
def test_update_last_runs(self, requests_post_mock: Mock):
114114
# write out the local lastruns.csv that is used to track each instrument
115115
with open('test_last_runs.csv', 'w') as last_runs:
@@ -149,13 +149,13 @@ def test_update_last_runs_with_error(self, requests_post_mock: Mock):
149149
if row: # Avoid the empty rows
150150
self.assertEqual('44733', row[1])
151151

152-
@patch('isis_file_polling.ingest.update_last_runs')
152+
@patch('autoreduce_run_detection.run_detection.update_last_runs')
153153
def test_main(self, update_last_runs_mock):
154154
main()
155155
update_last_runs_mock.assert_called_with(LOCAL_CACHE_LOCATION)
156156
update_last_runs_mock.assert_called_once()
157157

158-
@patch('isis_file_polling.ingest.update_last_runs')
158+
@patch('autoreduce_run_detection.run_detection.update_last_runs')
159159
def test_main_lock_timeout(self, _):
160160
with FileLock('{}.lock'.format(LOCAL_CACHE_LOCATION)):
161161
main()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
]
1717

1818
setup(
19-
name='ISISFilePolling',
19+
name='autoreduce-run-detection',
2020
version='22.0.0.dev0',
2121
description='A service to discover and ingest new files produced by the ISIS neutron and muon facility',
2222
author='ISIS Scientific Software Group',

0 commit comments

Comments
 (0)