Skip to content

Commit

Permalink
more manual fixes, drop requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent committed Dec 29, 2023
1 parent 9b2aa72 commit 716e19d
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 81 deletions.
1 change: 0 additions & 1 deletion freeze/tests/fakeserver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
import json
import multiprocessing
from threading import Thread
Expand Down
13 changes: 0 additions & 13 deletions requirements.in

This file was deleted.

47 changes: 0 additions & 47 deletions requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion shub/image/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def show(self):
super().show()

def handle_event(self, event):
click.echo(f"{event}")
click.echo(event)


class _DeployProgress(utils.BaseProgress):
Expand Down
1 change: 0 additions & 1 deletion shub/image/run/wrapper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
A helper wrapper over start-crawl to run a custom image locally.
Expand Down
6 changes: 2 additions & 4 deletions shub/image/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from shub.config import load_shub_config, list_targets_callback
from shub.image import utils

long = int

SHORT_HELP = "Test a built image with Scrapy Cloud contract"
HELP = """
A command to test an image after build step to make sure it fits contract.
Expand Down Expand Up @@ -77,11 +75,11 @@ def _check_image_size(image_name, docker_client):
from docker.errors import NotFound
try:
size = docker_client.inspect_image(image_name).get('Size')
if size and isinstance(size, (int, long)) and size > IMAGE_SIZE_LIMIT:
if size and isinstance(size, int) and size > IMAGE_SIZE_LIMIT:
raise shub_exceptions.CustomImageTooLargeException(
IMAGE_TOO_LARGE_WARNING)
except NotFound as exc:
utils.debug_log(f"{exc}")
utils.debug_log(exc)
raise shub_exceptions.NotFoundException(
"The image doesn't exist yet, please use build command at first.")

Expand Down
5 changes: 1 addition & 4 deletions tests/test_deploy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env python


import os
import sys
import unittest
Expand Down Expand Up @@ -257,7 +254,7 @@ def test_egg_glob_pattern(self):
def test_add_sources(self):
convert_deps_to_pip = Mock(
side_effect=[
'./requirements.txt',
'./tests/requirements.txt',
['package==0.0.0', 'hash-package==0.0.1', 'hash-package2==0.0.1'],
],
)
Expand Down
3 changes: 0 additions & 3 deletions tests/test_deploy_egg.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env python


import os
import shutil
import tempfile
Expand Down
3 changes: 0 additions & 3 deletions tests/test_deploy_reqs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env python


import unittest
import os
import tempfile
Expand Down
2 changes: 0 additions & 2 deletions tests/test_end_to_end.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

import unittest
from click.testing import CliRunner
from shub import tool
Expand Down
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ commands =
[testenv:min]
deps =
{[testenv]deps}
-r requirements.txt

[testenv:freeze]
install_command =
python -m pip install {opts} {packages}
deps =
-rrequirements.txt
pyinstaller==4.10
pytest
packaging==20.4
Expand Down

0 comments on commit 716e19d

Please sign in to comment.