Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
navipy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olivier Bertrand
navipy
Commits
4bbd0f13
Commit
4bbd0f13
authored
6 years ago
by
Olivier Bertrand
Browse files
Options
Downloads
Patches
Plain Diff
Add coverage function
parent
65d0f572
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.coveragerc
+12
-0
12 additions, 0 deletions
.coveragerc
.gitlab-ci.yml
+27
-11
27 additions, 11 deletions
.gitlab-ci.yml
setup.py
+2
-1
2 additions, 1 deletion
setup.py
with
41 additions
and
12 deletions
.coveragerc
0 → 100644
+
12
−
0
View file @
4bbd0f13
# .coveragerc to control coverage.py
[run]
branch = True
omit =
# Omit all test_ functions
**/test_*
# Omit blender functions / can be only tested with blender files
**/blend*
source = navipy
[html]
directory = coverage_html_report
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
27
−
11
View file @
4bbd0f13
...
...
@@ -5,6 +5,7 @@ image: python:latest
stages
:
-
build
-
test
-
coverage
-
doc_build
-
deploy
...
...
@@ -26,8 +27,11 @@ navipy_install:
flake8
:
stage
:
test
dependencies
:
-
navipy_install
script
:
-
pip3 install tox flake8
-
source $CI_PROJECT_DIR/venv/bin/activate
-
python3 -m flake8 navipy/*.py
navipy_unittest
:
...
...
@@ -37,22 +41,33 @@ navipy_unittest:
script
:
-
source $CI_PROJECT_DIR/venv/bin/activate
-
python3 -m coverage run -m unittest discover navipy
artifacts
:
paths
:
-
.coverage
coverage
:
stage
:
test
stage
:
coverage
dependencies
:
-
navipy_install
-
navipy_unittest
script
:
-
pip3 install --user nose
-
pip3 install --user coverage
-
python3 -m nose -c .noserc -q --cover-html-dir=build --cover-html
-
python3 -m coverage report -m
coverage
:
'
/TOTAL.+
([0-9]{1,3}%)/'
-
source $CI_PROJECT_DIR/venv/bin/activate
-
python3 -m coverage html
artifacts
:
paths
:
-
build
-
coverage_html_report
expire_in
:
1 day
doc_build
:
stage
:
doc_build
dependencies
:
-
navipy_install
-
coverage
script
:
-
source $CI_PROJECT_DIR/venv/bin/activate
-
pip3 install --user sphinx sphinx_rtd_theme
...
...
@@ -60,7 +75,7 @@ doc_build:
artifacts
:
paths
:
-
build
-
doc/
build
pages
:
...
...
@@ -76,11 +91,12 @@ pages:
script
:
-
ssh -p50022 bolirev@bioneuro77.biologie.uni-bielefeld.de "mkdir -p /fastdata/html/navipy/"
-
mkdir -p public/coverage
-
cp -fr doc
s
/build/html/* public/
-
cp -fr
build
/* public/coverage/
-
cp -fr doc/build/html/* public/
-
cp -fr
coverage_html_report
/* public/coverage/
dependencies
:
-
coverage
-
doc_build
artifacts
:
paths
:
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
1
View file @
4bbd0f13
...
...
@@ -43,7 +43,8 @@ setup_dict = {'name': 'navipy',
'
sphinx-argparse
'
,
'
ipython
'
,
'
flake8
'
,
'
tox
'
],
'
tox
'
,
'
coverage
'
],
'
package_data
'
:
{
'
navipy
'
:
[
'
resources/database.db
'
,
'
resources/*.blend
'
]},
'
include_package_data
'
:
True
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment