-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from gisce/circleci-project-setup
CircleCI Integration
- Loading branch information
Showing
8 changed files
with
97 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
python: circleci/python@0.2.1 | ||
|
||
jobs: | ||
test-template: &test-template | ||
test-py37: | ||
docker: | ||
- image: circleci/python:3.7 | ||
executor: python/default | ||
working_directory: ~/src | ||
steps: | ||
- checkout: | ||
path: ~/src/mesures | ||
- run: | ||
command: | | ||
export ROOT_DIR_SRC=~/src | ||
name: Install requirements | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "~/src/mesures/requirements.txt"}} | ||
- run: | ||
command: | | ||
cd ~/src/ | ||
virtualenv venv | ||
. venv/bin/activate | ||
cd mesures | ||
pip install -r requirements.txt | ||
name: Install dependencies | ||
- save_cache: | ||
paths: | ||
- ~/src/venv | ||
key: v1-dependencies-{{ checksum "~/src/mesures/requirements.txt"}} | ||
- run: | ||
command: | | ||
cd ~/src/ | ||
. venv/bin/activate | ||
cd mesures | ||
mamba --enable-coverage | ||
coverage report | ||
coverage html | ||
name: Test | ||
- store_artifacts: | ||
path: ~/src/mesures/htmlcov | ||
destination: coverage | ||
name: store_artifacts | ||
|
||
workflows: | ||
main: | ||
jobs: | ||
- test-py37 |
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 +1,3 @@ | ||
pandas==0.23.4 | ||
mamba<0.11.0 | ||
expects |
Empty file.
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,43 @@ | ||
from mamba import description, context, it | ||
from expects import expect, equal | ||
from mesures.f1 import F1 | ||
from mesures.p1 import P1 | ||
from mesures.p1d import P1D | ||
from spec.sample_data import get_sample_data | ||
|
||
|
||
with description('An F1') as self: | ||
with it('is instance of F1 Class'): | ||
data = get_sample_data() | ||
f = F1(data) | ||
assert isinstance(f, F1) | ||
|
||
with it('a zip of raw Files'): | ||
data = get_sample_data() | ||
f = F1(data) | ||
res = f.writer() | ||
import zipfile | ||
assert zipfile.is_zipfile(res) | ||
|
||
with it('has its class methods'): | ||
data = get_sample_data() | ||
f = F1(data) | ||
res = f.writer() | ||
import numpy as np | ||
assert isinstance(f.total, (int, np.int64)) | ||
assert f.ai == f.total | ||
assert isinstance(f.cups, list) | ||
assert isinstance(f.number_of_cups, int) | ||
|
||
|
||
with description('An P1') as self: | ||
with it('instance of P1 Class'): | ||
data = get_sample_data() | ||
f = P1(data) | ||
assert isinstance(f, P1) | ||
|
||
with description('An P1D') as self: | ||
with it('instance of P1D Class'): | ||
data = get_sample_data() | ||
f = P1D(data) | ||
assert isinstance(f, P1D) |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.