Skip to content

Commit f1fce5a

Browse files
author
Valentin Daviot
committed
Initial commit
0 parents  commit f1fce5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+8136
-0
lines changed

.dockerignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
__pycache__
2+
.cache
3+
.eggs
4+
.git
5+
.gitignore
6+
.gitlab-ci.yml
7+
.tox
8+
*.egg-info
9+
*.pyc
10+
LICENSE.txt
11+
README.*
12+
13+
build
14+
dist
15+
venv

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
__pycache__
2+
*.egg-info
3+
.cache
4+
.eggs
5+
.tox
6+
.vscode/
7+
*.pyc
8+
*.swp
9+
*.un~
10+
11+
/venv
12+
/dist
13+
/build
14+

.gitlab-ci.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
variables:
3+
GIT_DEPTH: 1
4+
5+
image: docker:git
6+
7+
services:
8+
- docker:dind
9+
10+
.docker_login: &docker_login |
11+
echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"
12+
13+
stages:
14+
- test
15+
- build
16+
17+
run-tests-37:
18+
stage: test
19+
image: python:3.7-alpine
20+
script:
21+
- apk --update --no-cache add python3 python3-dev py-pip build-base postgresql-dev
22+
- pip install wheel tox
23+
- tox
24+
25+
run-tests-38:
26+
stage: test
27+
image: python:3.8-alpine
28+
script:
29+
- apk --update --no-cache add python3 python3-dev py-pip build-base postgresql-dev
30+
- pip install wheel tox
31+
- tox
32+
33+
build-master:
34+
stage: build
35+
script:
36+
- *docker_login
37+
- docker build -f docker/Dockerfile --pull -t "$CI_REGISTRY_IMAGE:latest" .
38+
- docker push "$CI_REGISTRY_IMAGE"
39+
only:
40+
refs:
41+
- master
42+
43+
build:
44+
stage: build
45+
script:
46+
- *docker_login
47+
- docker build -f docker/Dockerfile --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME" .
48+
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
49+
except:
50+
refs:
51+
- master

LICENSE.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2019 Alter Way R&D <[email protected]>
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

Makefile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
all: venv install
2+
3+
venv:
4+
python3.7 -m venv venv
5+
6+
.PHONY: install
7+
install: venv
8+
./venv/bin/pip install -U pip wheel
9+
./venv/bin/pip install -e .[dev]
10+
11+
.PHONY: done
12+
done:
13+
echo "Installation finished succesfully. Run 'make run' to start the API"
14+
15+
.PHONY: clean
16+
clean:
17+
rm -rf .pytest_cache .eggs *.egg-info
18+
find . -path ./venv -prune -o -name "*.pyc" -o -name "*.pyo" -o -name "__pycache__" -print0 | xargs -r -0 rm -rv
19+
@echo "You may not want to remove ./venv, please do it by hand." >&2

0 commit comments

Comments
 (0)