This repository has been archived by the owner on Feb 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathcircle.yml
executable file
·154 lines (136 loc) · 3.84 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
version: 2.0
references:
install_pips: &install_pips
run:
name: Install PyPI dependences
command: |
sudo apt-get update -qq
#sudo apt-get install git-lfs
sudo apt-get install tk-dev pkg-config python-dev python-tk
sudo pip install --upgrade pip setuptools
sudo pip install -r ./tests/requirements.txt
sudo pip install -U backports.functools_lru_cache # required for matplotlib @py2
pip install -r requirements.txt --user
pip --version ; pip list
test_coverage: &test_coverage
run:
name: Testing and coverage
command: |
unset DISPLAY
mkdir output && mkdir results && mkdir test-reports
coverage run --source imsegm -m pytest imsegm tests -v --junitxml=test-reports/pytest_junit.xml
coverage report
python setup.py check --metadata --strict
formatting: &formatting
run:
name: Formatting
command: |
pip install flake8 -q
flake8 .
build_project: &build_project
run:
name: Building project
command: |
gcc --version ; python --version ; pwd ; ls -l
python setup.py build_ext --inplace
install_project: &install_project
run:
name: Insatlling project
command: |
python setup.py install --user
rm -rf imsegm
make_docs: &make_docs
run:
name: Make Documentation
command: |
sudo apt-get install pandoc
sudo pip install -r docs/requirements.txt
# sphinx-apidoc -o ./docs/source ./imsegm **/test_* --force --follow-links
python setup.py build_ext --inplace
cd docs
make html --debug --jobs 2 SPHINXOPTS="-W"
make latexpdf
jobs:
Formatting:
docker:
- image: circleci/python:3.6
steps:
- checkout
- *formatting
Py3-Tests:
docker:
- image: circleci/python:3.6
steps: &steps_test
- checkout
# INSTALLATION
- *install_pips
#- run: git lfs pull
# BUILDING
- *build_project
# TESTING
- *test_coverage
# PASSING
- run:
name: Finalise
command: |
python setup.py install --user
coverage report && coverage xml -o test-reports/coverage.xml
- store_test_results:
path: test-reports
- store_artifacts:
path: test-reports
Py3-Experiments:
docker:
- image: circleci/python:3.6
steps: &steps_expt
- checkout
# INSTALLATION
- *install_pips
#- run: git lfs pull
- *install_project
- run: mkdir libs && mkdir output && mkdir results
# ANNOTATION section
- run: bash handling_annotations/test_annotations.sh
# SEGMENTATION section
- run: bash experiments_segmentation/test_segmentations.sh
# CENTER DETECT. section
- run: bash experiments_ovary_centres/test_ovary_centers.sh
# REGION GROWING section
- run: bash experiments_ovary_detect/test_ovary_detect.sh
Py2-Tests:
docker:
- image: circleci/python:2.7
steps: *steps_test
Py2-Experiments:
docker:
- image: circleci/python:2.7
steps: *steps_expt
Build-Docs:
docker:
- image: circleci/python:3.6
steps:
- checkout
- run:
name: TexLive
command: |
sudo apt-get update -qq
sudo apt-get install -y imagemagick ghostscript latexmk texlive texlive-latex-recommended texlive-fonts-recommended texlive-formats-extra
# INSTALLATION
- *install_pips
# DOCUMENTATION
- *make_docs
# PREVIEW
- store_artifacts:
# allows us to preview the generated html pages
path: docs/build/html/
destination: html
workflows:
version: 2
build:
jobs:
- Formatting
- Py2-Tests
- Py3-Tests
#- Py2-Experiments
#- Py3-Experiments
- Build-Docs