Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add python 3 support to scrapy-cluster. We use decode_responses optio…
…n on Redis client and value_deserializer,value_serializer option on Kafka client to handle unicode problem. We also fix several syntax error and update several test cases.
- Loading branch information
Showing
30 changed files
with
195 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.vscode | ||
|
||
# Python binaries | ||
*.pyc | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM python:3.6 | ||
MAINTAINER Madison Bahmer <madison.bahmer@istresearch.com> | ||
|
||
# os setup | ||
RUN apt-get update && apt-get -y install \ | ||
python-lxml \ | ||
build-essential \ | ||
libssl-dev \ | ||
libffi-dev \ | ||
python-dev \ | ||
libxml2-dev \ | ||
libxslt1-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# install requirements | ||
COPY utils /usr/src/utils | ||
COPY crawler/requirements.txt /usr/src/app/ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
RUN rm -rf /usr/src/utils | ||
|
||
# move codebase over | ||
COPY crawler /usr/src/app | ||
|
||
# override settings via localsettings.py | ||
COPY docker/crawler/settings.py /usr/src/app/crawling/localsettings.py | ||
|
||
# copy testing script into container | ||
COPY docker/run_docker_tests.sh /usr/src/app/run_docker_tests.sh | ||
|
||
# set up environment variables | ||
|
||
# run the spider | ||
CMD ["scrapy", "runspider", "crawling/spiders/link_spider.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM python:3.6 | ||
MAINTAINER Madison Bahmer <madison.bahmer@istresearch.com> | ||
|
||
# os setup | ||
RUN apt-get update | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# install requirements | ||
COPY utils /usr/src/utils | ||
COPY kafka-monitor/requirements.txt /usr/src/app/ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
RUN rm -rf /usr/src/utils | ||
|
||
# move codebase over | ||
COPY kafka-monitor /usr/src/app | ||
|
||
# override settings via localsettings.py | ||
COPY docker/kafka-monitor/settings.py /usr/src/app/localsettings.py | ||
|
||
# copy testing script into container | ||
COPY docker/run_docker_tests.sh /usr/src/app/run_docker_tests.sh | ||
|
||
# set up environment variables | ||
|
||
# run command | ||
CMD ["python", "kafka_monitor.py", "run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM python:3.6 | ||
MAINTAINER Madison Bahmer <madison.bahmer@istresearch.com> | ||
|
||
# os setup | ||
RUN apt-get update | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# install requirements | ||
COPY utils /usr/src/utils | ||
COPY redis-monitor/requirements.txt /usr/src/app/ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
RUN rm -rf /usr/src/utils | ||
|
||
# move codebase over | ||
COPY redis-monitor /usr/src/app | ||
|
||
# override settings via localsettings.py | ||
COPY docker/redis-monitor/settings.py /usr/src/app/localsettings.py | ||
|
||
# copy testing script into container | ||
COPY docker/run_docker_tests.sh /usr/src/app/run_docker_tests.sh | ||
|
||
# set up environment variables | ||
|
||
# run command | ||
CMD ["python", "redis_monitor.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM python:3.6 | ||
MAINTAINER Madison Bahmer <madison.bahmer@istresearch.com> | ||
|
||
# os setup | ||
RUN apt-get update | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# install requirements | ||
COPY utils /usr/src/utils | ||
COPY rest/requirements.txt /usr/src/app/ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
RUN rm -rf /usr/src/utils | ||
|
||
# move codebase over | ||
COPY rest /usr/src/app | ||
|
||
# override settings via localsettings.py | ||
COPY docker/rest/settings.py /usr/src/app/localsettings.py | ||
|
||
# copy testing script into container | ||
COPY docker/run_docker_tests.sh /usr/src/app/run_docker_tests.sh | ||
|
||
# set up environment variables | ||
|
||
# run command | ||
CMD ["python", "rest_service.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.