Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
clean docs conf.
Browse files Browse the repository at this point in the history
* install py27
  • Loading branch information
Borda committed Oct 28, 2020
1 parent 5481070 commit 40f54dc
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
python setup.py check --metadata --strict
python setup.py install --dry-run --user
python setup.py build_ext --inplace
coverage run --source imsegm -m py.test imsegm tests --durations=25 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
coverage run --source imsegm -m pytest imsegm tests --durations=25 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
flake8 .
- name: Upload pytest test results
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ before_script:
script:
- python setup.py build_ext --inplace
# - pytest imsegm -v --doctest-modules
- coverage run --source imsegm -m py.test imsegm tests # --flake8
- coverage run --source imsegm -m pytest imsegm tests # --flake8
# - nosetests imsegm tests -v --exe --with-doctest --with-xunit --with-coverage --cover-package=imsegm
- python setup.py install --dry-run

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Image segmentation toolbox

[![Build Status](https://travis-ci.org/Borda/pyImSegm.svg?branch=master)](https://travis-ci.org/Borda/pyImSegm)
[![Build Status](https://travis-ci.com/Borda/pyImSegm.svg?branch=master)](https://travis-ci.com/Borda/pyImSegm)
[![codecov](https://codecov.io/gh/Borda/pyImSegm/branch/master/graph/badge.svg?token=BCvf6F5sFP)](https://codecov.io/gh/Borda/pyImSegm)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/48b7976bbe9d42bc8452f6f9e573ee70)](https://www.codacy.com/app/Borda/pyImSegm?utm_source=github.com&utm_medium=referral&utm_content=Borda/pyImSegm&utm_campaign=Badge_Grade)
[![CircleCI](https://circleci.com/gh/Borda/pyImSegm.svg?style=svg&circle-token=a30180a28ae7e490c0c0829d1549fcec9a5c59d0)](https://circleci.com/gh/Borda/pyImSegm)
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ references:
command: |
unset DISPLAY
mkdir output && mkdir results && mkdir test-reports
coverage run --source imsegm -m py.test imsegm tests -v --junitxml=test-reports/pytest_junit.xml
coverage run --source imsegm -m pytest imsegm tests -v --junitxml=test-reports/pytest_junit.xml
coverage report
python setup.py check --metadata --strict
Expand Down
9 changes: 5 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@

import m2r

PATH_ROOT = os.path.join('..', '..')
PATH_UP = os.path.join('..', '..')
PATH_HERE = os.path.abspath(os.path.dirname(__file__))
PATH_ROOT = os.path.realpath(os.path.join(PATH_HERE, PATH_UP))
sys.path.insert(0, os.path.abspath(PATH_ROOT))

import imsegm # noqa: E402
Expand Down Expand Up @@ -65,7 +66,7 @@
readme = re.sub(r'(!\[.*.gif\))', '', readme)
for dir_name in (os.path.basename(p) for p in glob.glob(os.path.join(PATH_ROOT, '*'))
if os.path.isdir(p)):
readme = readme.replace('](%s/' % dir_name, '](%s/%s/' % (PATH_ROOT, dir_name))
readme = readme.replace('](%s/' % dir_name, '](%s/%s/' % (PATH_UP, dir_name))
with open('readme.md', 'w') as fp:
fp.write(readme)

Expand All @@ -74,7 +75,7 @@

# If your documentation needs a minimal Sphinx version, state it here.

needs_sphinx = '2.2'
needs_sphinx = '2.4'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down Expand Up @@ -260,7 +261,7 @@ def run_apidoc(_):
for pkg in PACKAGES:
argv = ['-e',
'-o', os.path.join(PATH_HERE, 'api'),
os.path.join(PATH_HERE, PATH_ROOT, pkg),
os.path.join(PATH_ROOT, pkg),
'tests/*',
'--force']
try:
Expand Down
2 changes: 1 addition & 1 deletion requirements-py27.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Cython >= 0.23
numpy >= 1.9, < 1.16.0 # version 1.16 breaks skimage 0.14
scipy >= 0.15.1, < 1.3
pandas >= 0.14.1, < 0.24
pillow >= 2.1.0
pillow >= 2.1.0, != 7
matplotlib >= 2.0.2, < 3.0.0
scikit-learn >= 0.18.1, < 0.21
scikit-image >= 0.13.0, < 0.15
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ six >= 1.10
Cython >= 0.28 # 0.27 fails with python 3.7
numpy >= 1.13.3 # version 1.16 breaks skimage 0.14
scipy >= 1.0
pandas >= 0.19
pillow >= 4.0, < 7 # fail loading JPG images
pandas >= 0.21
pillow >= 4.0, != 7 # fail loading JPG images
matplotlib >= 2.0.2
scikit-learn >= 0.18.1
scikit-image >= 0.13.0
Expand Down
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ verbose = 2
# max-complexity = 10

[tool:pytest]
addopts = --doctest-modules
addopts =
--doctest-modules
--color=yes
log_cli = 1
log_cli_level = CRITICAL
#log_cli_format = %(message)s
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ def _parse_requirements(file_path):
if sys.version_info.major == 2:
# numpy v1.17 drops support for py2
setup_reqs = ['Cython', 'numpy<1.17']
install_reqs = _parse_requirements(os.path.join(HERE, 'requirements-py27.txt'))
else:
setup_reqs = ['Cython', 'numpy']
install_reqs = _parse_requirements(os.path.join(HERE, 'requirements.txt'))
install_reqs = _parse_requirements(os.path.join(HERE, 'requirements.txt'))


setup(
Expand Down

0 comments on commit 40f54dc

Please sign in to comment.