Compare commits

..

No commits in common. "8f24ed48a37dca0a7ac8a379d95508d799fd50c9" and "a82df4da50121f7f1ae48f69979f33ce82689748" have entirely different histories.

5 changed files with 27 additions and 20 deletions

View File

@ -1,17 +1,29 @@
before_script:
- "pip install -r requirements.txt"
- "pip install pylint"
- "curl -sL https://deb.nodesource.com/setup_10.x | bash -"
- "curl -sL https://deb.nodesource.com/setup_6.x | bash -"
- "apt-get install -y nodejs jq"
- "npm install"
lint:
lint:2.7:
image: "python:2.7"
stage: "test"
script:
- "hooks/pre-commit"
lint:3:
image: "python:3"
stage: "test"
script:
- "hooks/pre-commit"
test:
test:2.7:
image: "python:2.7"
stage: "test"
script:
- python -m flatisfy init-config | jq '.constraints.default.house_types = ["APART"] | .constraints.default.type = "RENT" | .constraints.default.postal_codes = ["75014"]' > /tmp/config.json
- python -m flatisfy test --config /tmp/config.json
test:3:
image: "python:3"
stage: "test"
script:

View File

@ -1,4 +1,4 @@
FROM python:3
FROM python:2
MAINTAINER Phyks <phyks@phyks.me>
# Setup layout.
@ -12,10 +12,10 @@ RUN apt-get update && \
# Install latest pip and python dependencies.
RUN pip install -U setuptools && \
pip install html2text simplejson beautifulsoup4
pip install html2text simplejson BeautifulSoup
# Install node.js.
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get install -y nodejs
# Install weboob's code itself.
@ -30,11 +30,11 @@ COPY ./*.sh /home/user/
# Install Flatisfy, set up directories and permissions.
RUN cd /home/user \
&& git clone https://framagit.org/phyks/Flatisfy.git/ ./app \
&& git clone https://framagit.org/phyks/Flatisfy/ ./app \
&& cd ./app \
&& pip install -r requirements.txt \
&& npm install \
&& npm run build:dev \
&& npm run build:prod \
&& mkdir -p /home/user/.local/share/flatisfy \
&& chown user:user -R /home/user \
&& chmod +x /home/user/*.sh

View File

@ -1,11 +0,0 @@
version: "3"
services:
app:
build: .
# image: phyks/flatisfy
environment:
- LOCAL_USER_ID=1000
volumes:
- ./data:/flatisfy
ports:
- "8080:8080"

View File

@ -16,7 +16,10 @@ from flatisfy.models.postal_code import PostalCode
from flatisfy.models.public_transport import PublicTransport
from flatisfy.tools import normalize_string
import csv
if sys.version_info >= (3, 0):
import csv
else:
from backports import csv
LOGGER = logging.getLogger(__name__)

View File

@ -1,9 +1,12 @@
alembic
appdirs
arrow
backports.csv; python_version < '3.0'
bottle
bottle-sqlalchemy
canister
enum34; python_version < '3.4'
functools32; python_version < '3.2.3'
future
imagehash
mapbox