Skip to content

Commit

Permalink
Merge 2d38b47 into 1c661ba
Browse files Browse the repository at this point in the history
  • Loading branch information
elacuesta authored Mar 10, 2022
2 parents 1c661ba + 2d38b47 commit c7375ed
Show file tree
Hide file tree
Showing 33 changed files with 68 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/freeze-release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
shub-${{ runner.os }}.zip
release:
if: startsWith(github.ref, 'refs/tags/v') # FIXME: uncomment before merging
if: startsWith(github.ref, 'refs/tags/v')
needs: freeze
runs-on: ubuntu-latest

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand All @@ -65,7 +65,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Scrapinghub command line client
:target: https://pypi.python.org/pypi/shub
:alt: PyPI Version

.. image:: https://img.shields.io/pypi/pyversions/shub.svg
:target: https://pypi.python.org/pypi/shub
:alt: Python Versions

.. image:: https://github.com/scrapinghub/shub/actions/workflows/tests.yml/badge.svg
:target: https://github.com/scrapinghub/shub/actions/workflows/tests.yml
:alt: Tests
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toml

click==7.0
tqdm==4.55.1
scrapinghub>=2.3.1
scrapinghub>=2.4

# address known vulnerabilities
requests>=2.20.0 # CVE-2018-18074
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile
Expand All @@ -25,7 +25,7 @@ retrying==1.3.3
# via
# -r requirements.in
# scrapinghub
scrapinghub==2.3.1
scrapinghub==2.4.0
# via -r requirements.in
six==1.15.0
# via
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Operating System :: OS Independent',
'Environment :: Console',
'Topic :: Internet :: WWW/HTTP',
Expand Down
2 changes: 1 addition & 1 deletion tests/image/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from functools import wraps
from unittest import mock

import mock
import pytest

from shub.image.utils import ProgressBar
Expand Down
3 changes: 2 additions & 1 deletion tests/image/test_build.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# -*- coding: utf-8 -*-
import os
from unittest import mock

import mock
import pytest
from click.testing import CliRunner

from shub import exceptions as shub_exceptions
from shub.image.build import cli

from ..utils import clean_progress_output, format_expected_progress


Expand Down
7 changes: 4 additions & 3 deletions tests/image/test_check.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import mock
from unittest import mock, TestCase

from click.testing import CliRunner
from unittest import TestCase
from shub import exceptions as shub_exceptions

from shub import exceptions as shub_exceptions
from shub.image.check import cli
from shub.image import utils

from .utils import FakeProjectDirectory


Expand Down
3 changes: 2 additions & 1 deletion tests/image/test_deploy.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
import json
import time
from unittest import mock

import mock
import pytest
from click import command
from click.testing import CliRunner
Expand All @@ -12,6 +12,7 @@
from shub.image.deploy import _extract_scripts_from_project
from shub.image.deploy import _prepare_deploy_params
from shub.image.deploy import cli

from ..utils import clean_progress_output, format_expected_progress


Expand Down
2 changes: 1 addition & 1 deletion tests/image/test_list.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import json
from unittest import mock

import six
import docker
import mock
import pytest
from click.testing import CliRunner

Expand Down
3 changes: 2 additions & 1 deletion tests/image/test_push.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock

import pytest
from click.testing import CliRunner

Expand Down
2 changes: 1 addition & 1 deletion tests/image/test_run.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
import os.path
import tempfile
from unittest import mock

try:
from StringIO import StringIO
except ImportError:
from io import StringIO

import mock
import pytest
from click.testing import CliRunner

Expand Down
4 changes: 3 additions & 1 deletion tests/image/test_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import mock
from unittest import mock

import pytest
from click.testing import CliRunner

from shub import exceptions as shub_exceptions
from shub.image.test import (
cli, _run_docker_command, _check_image_size, _check_start_crawl_entry,
Expand Down
5 changes: 3 additions & 2 deletions tests/image/test_upload.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import mock
from unittest import mock, TestCase

from click.testing import CliRunner
from unittest import TestCase

from shub.image.upload import cli


Expand Down
5 changes: 3 additions & 2 deletions tests/image/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
import sys
import tempfile
from unittest import TestCase
from unittest import mock, TestCase

import mock
import pytest

from shub.exceptions import BadConfigException, BadParameterException, NotFoundException
from shub.image.utils import (
get_credentials,
Expand All @@ -17,6 +17,7 @@
STATUS_FILE_LOCATION,
DEFAULT_DOCKER_API_VERSION,
)

from .utils import FakeProjectDirectory, add_sh_fake_config


Expand Down
9 changes: 0 additions & 9 deletions tests/requirements.in

This file was deleted.

37 changes: 5 additions & 32 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,5 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile
#
appdirs==1.4.4 # via virtualenv
attrs==19.3.0 # via pytest
coverage==5.1 # via pytest-cov
distlib==0.3.0 # via virtualenv
filelock==3.0.12 # via virtualenv
flake8==3.8.3 # via -r requirements.in
mccabe==0.6.1 # via flake8
mock==3.0.5 # via -r requirements.in
more-itertools==5.0.0 # via pytest
packaging==20.4 # via pytest
pipenv==2020.6.2 # via -r requirements.in
pluggy==0.13.1 # via pytest
py==1.10.0 # via pytest
pycodestyle==2.6.0 # via flake8
pyflakes==2.2.0 # via flake8
pyparsing==2.4.7 # via packaging
pytest-cov==2.9.0 # via -r requirements.in
pytest==5.4.3 # via -r requirements.in, pytest-cov
python-dateutil==2.8.1 # via -r requirements.in
virtualenv-clone==0.5.4 # via pipenv
virtualenv==20.0.21 # via pipenv
wcwidth==0.2.4 # via pytest

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
python-dateutil
pytest
pytest-cov
flake8
pipenv
2 changes: 1 addition & 1 deletion tests/test_bootstrap.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import zipfile
from unittest import mock

import mock
import pytest
import requests
import yaml
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cancel.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import absolute_import

import unittest
import mock
from collections import namedtuple
from unittest import mock

from click.testing import CliRunner

Expand Down
8 changes: 4 additions & 4 deletions tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from __future__ import absolute_import

import os
import shutil
import six
import tempfile
import textwrap
import unittest
import yaml

import mock
from unittest import mock

import six
import yaml
from click.testing import CliRunner

from shub.config import (get_target, get_target_conf, get_version,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

import os
import unittest
from unittest.mock import patch

import requests
from click.testing import CliRunner
from mock import patch
from six import string_types

from shub import deploy
Expand Down
5 changes: 2 additions & 3 deletions tests/test_deploy_egg.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/usr/bin/env python
# coding=utf-8

from __future__ import print_function
from __future__ import absolute_import
from __future__ import absolute_import, print_function

import mock
import os
import shutil
import tempfile
import unittest
from unittest import mock
from zipfile import ZipFile

from shub import deploy_egg
Expand Down
3 changes: 2 additions & 1 deletion tests/test_deploy_reqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
# coding=utf-8

from __future__ import absolute_import

import unittest
import mock
import os
import tempfile
from unittest import mock

from click.testing import CliRunner

Expand Down
5 changes: 2 additions & 3 deletions tests/test_fetch_eggs.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from __future__ import absolute_import
import unittest

import unittest
from collections import namedtuple

import mock
from unittest import mock

from click.testing import CliRunner

Expand Down
3 changes: 2 additions & 1 deletion tests/test_jobresource.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import mock

import unittest
import time
import json
from unittest import mock

from click.testing import CliRunner

Expand Down
5 changes: 3 additions & 2 deletions tests/test_login.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from __future__ import absolute_import

import unittest
from mock import patch, MagicMock
import textwrap
from unittest.mock import patch, MagicMock

from click.testing import CliRunner
import yaml
from click.testing import CliRunner

from shub import login
from shub.exceptions import AlreadyLoggedInException
Expand Down
3 changes: 2 additions & 1 deletion tests/test_logout.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from __future__ import absolute_import

import textwrap
import unittest
from unittest import mock

from click.testing import CliRunner
import mock

from shub import config, logout

Expand Down
2 changes: 1 addition & 1 deletion tests/test_migrate_eggs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import unittest
import mock
from unittest import mock

import yaml
from click.testing import CliRunner
Expand Down
Loading

0 comments on commit c7375ed

Please sign in to comment.