Skip to content

Commit

Permalink
fix: remove sourcery because eww
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeAeich committed May 18, 2024
1 parent 92fce10 commit 2b477d1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 100 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/pr_evaulations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,3 @@ jobs:
# Find lines containing "<<<<<<<", then count the number of lines.
# 0 matching lines results in exit code 0, i.e. success.
run: exit $(git grep "<<<<<<<" ":(exclude).github/" | wc --lines)

review-with-sourcery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- uses: sourcery-ai/action@v1
with:
token: ${{ secrets.SOURCERY_TOKEN }}
diff_ref: ${{ github.event.pull_request.base.sha }}
73 changes: 0 additions & 73 deletions .sourcery.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions tests/test_unit/service/test_filer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
)
from tesk.service.filer_s3 import S3Transput
from tesk.service.path import containerPath

# sourcery skip: dont-import-test-modules
from tests.test_unit.service.assertThrows import AssertThrowsMixin


Expand Down
9 changes: 4 additions & 5 deletions tests/test_unit/service/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ def test_run_to_completion_success(
"""
Checking if the Job runs is completed successfully
"""
# sourcery skip: no-loop-in-tests
for executor in self.data['executors']:
jobname = executor['metadata']['name']
job = Job(executor, jobname, taskmaster.args.namespace)
Expand All @@ -249,7 +248,7 @@ def test_run_to_completion_cancelled(
"""
Checking if the Job is cancelled
"""
for executor in self.data['executors']: # sourcery skip: no-loop-in-tests
for executor in self.data['executors']:
jobname = executor['metadata']['name']
job = Job(executor, jobname, taskmaster.args.namespace)
status = job.run_to_completion(
Expand Down Expand Up @@ -279,7 +278,7 @@ def test_run_to_completion_check_conflict_exception(
"""
Checking if the Job status is complete when an ApiException of 409 is raised
"""
for executor in self.data['executors']: # sourcery skip: no-loop-in-tests
for executor in self.data['executors']:
jobname = executor['metadata']['name']
job = Job(executor, jobname, taskmaster.args.namespace)
status = job.run_to_completion(
Expand All @@ -300,7 +299,7 @@ def test_run_to_completion_check_other_K8_exception(
Checking if the an exception is raised when ApiException status is other
than 409
"""
for executor in self.data['executors']: # sourcery skip: no-loop-in-tests
for executor in self.data['executors']:
jobname = executor['metadata']['name']
job = Job(executor, jobname, taskmaster.args.namespace)
with self.assertRaises(ApiException):
Expand Down Expand Up @@ -333,7 +332,7 @@ def test_run_to_completion_error( # noqa: PLR0913
mock_list_namespaced_pod.return_value = (
list_namespaced_pod_error_ImagePullBackOff(10)
)
for executor in self.data['executors']: # sourcery skip: no-loop-in-tests
for executor in self.data['executors']:
jobname = executor['metadata']['name']
job = Job(executor, jobname, taskmaster.args.namespace)
status = job.run_to_completion(1, taskmaster.check_cancelled, 120)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_unit/service/test_s3_filer.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_s3_download_file(moto_boto, path, url, ftype, expected, fs, caplog): #
"""
with S3Transput(path, url, ftype) as trans:
assert trans.download_file() == expected
if expected: # sourcery skip: no-conditionals-in-tests
if expected:
assert 'Not Found' in caplog.text
else:
assert os.path.exists(path) is True
Expand All @@ -113,7 +113,7 @@ def test_s3_download_directory( # noqa: PLR0913
with S3Transput(path, url, ftype) as trans:
assert trans.download_dir() == expected
print(mock_rename.mock_calls)
if expected: # sourcery skip: no-conditionals-in-tests
if expected:
assert 'Invalid file path' in caplog.text
else:
"""
Expand All @@ -139,7 +139,7 @@ def test_s3_upload_file(moto_boto, path, url, ftype, expected, fs, caplog): # n
trans = S3Transput(path, url, ftype)
trans.bucket_obj = client.Bucket(trans.bucket)
assert trans.upload_file() == expected
if expected: # sourcery skip: no-conditionals-in-tests
if expected:
assert 'File upload failed for' in caplog.text
else:
"""
Expand Down
1 change: 0 additions & 1 deletion tests/test_unit/service/test_taskmaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ def test_append_mount(self, mock_logger):
""" """
volume_mounts = []
task_volume_name = 'task-volume'
# sourcery skip: no-loop-in-tests
for aninput in self.data['inputs']:
dirnm = dirname(aninput)
append_mount(volume_mounts, task_volume_name, dirnm, self.pvc)
Expand Down

0 comments on commit 2b477d1

Please sign in to comment.