Skip to content

Commit

Permalink
Merge pull request #68 from scrapinghub/add-tox-2
Browse files Browse the repository at this point in the history
Complete work to support multiple versions of Python in CI
  • Loading branch information
Gallaecio authored Feb 24, 2021
2 parents df70f4d + d78c59e commit f90f8a5
Show file tree
Hide file tree
Showing 8 changed files with 658 additions and 61 deletions.
6 changes: 6 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[bumpversion]
current_version = 0.2.2
commit = True
tag = True

[bumpversion:file:setup.py]
54 changes: 21 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,35 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
toxify:
python3.6:
docker:
- image: themattrix/tox
- image: python:3.6
steps:
- checkout
- run:
name: Run tests in supported Python versions
command: |
pip install tox tox-pyenv
pyenv local 3.5.3 3.6.0 3.7.0 3.8.0
tox
build:
- run: |
pip install tox
tox
python3.7:
docker:
- image: circleci/python:3.6.1
- image: python:3.7
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}
- run: |
pip install tox
tox
python3.8:
docker:
- image: python:3.8
steps:
- checkout
- run: |
pip install tox
tox
workflows:
version: 2

shublang:
jobs:
- toxify
- build
- python3.6
- python3.7
- python3.8
26 changes: 26 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright 2020 Scrapinghub

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ py==1.8.0
pyparsing==2.4.2
pytest==5.2.1
six==1.12.0
unidecode==0.4.20
w3lib==1.21.0
wcwidth==0.1.7
zipp==0.6.0
Expand Down
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

setup(
name='shublang',
version='0.1.2',
version='0.2.2',
license='BSD',
author='Akshay Philar',
author_email='[email protected]',
description='Shublang - Data Extraction DSL',
author='Akshay',
author_email='[email protected]',
url="https://github.com/scrapinghub/shublang",
packages=find_packages(exclude=exclude),
#package_data={'shublang': ['*.py']},
include_package_data=True,
entry_points={
'console_scripts': [
Expand All @@ -24,17 +24,18 @@
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
python_requires='>=3.6',
install_requires=[
'pipe >= 1.5.0',
'jmespath >= 0.9.4',
'w3lib >= 1.21.0',
'parsel >= 1.5.2',
'dateparser >= 0.7.2',
'price-parser >= 0.3.2',
'unidecode >= 0.4.20'
]
)
Loading

0 comments on commit f90f8a5

Please sign in to comment.