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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add CI testing * add CI experiments * add badge * fix minumal req. * fix re-label * fix minor msgs
- Loading branch information
Showing
17 changed files
with
232 additions
and
36 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,88 @@ | ||
name: CI experiments | ||
|
||
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows | ||
on: # Trigger the workflow on push or pull request, but only for the master branch | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
pytest: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-18.04] | ||
python-version: [2.7, 3.6, 3.7, 3.8] | ||
|
||
# Timeout: https://stackoverflow.com/a/59076067/4521646 | ||
timeout-minutes: 35 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Note: This uses an internal pip API and may not always work | ||
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow | ||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-py${{ matrix.python-version }}- | ||
- name: Set py2.7 dependencies | ||
if: matrix.python-version == 2.7 | ||
run: | | ||
cp -r requirements-py27.txt requirements.txt | ||
- name: install ImSegm | ||
run: | | ||
python --version | ||
pip --version | ||
pip install wheel --quiet | ||
pip install https://github.com/Borda/pyGCO/archive/master.zip | ||
pip install . --user | ||
rm -rf imsegm | ||
pip list | ||
# create filders | ||
mkdir libs | ||
mkdir output | ||
mkdir results | ||
- name: ANNOTATION section | ||
env: | ||
DISPLAY: "" | ||
run: | | ||
bash handling_annotations/test_annotations.sh | ||
- name: SEGMENTATION section | ||
env: | ||
DISPLAY: "" | ||
run: | | ||
bash experiments_segmentation/test_segmentations.sh | ||
- name: CENTER DETECT. section | ||
env: | ||
DISPLAY: "" | ||
run: | | ||
bash experiments_ovary_centres/test_ovary_centers.sh | ||
- name: REGION GROWING section | ||
env: | ||
DISPLAY: "" | ||
run: | | ||
bash experiments_ovary_detect/test_ovary_detect.sh | ||
- name: remove ImSegm | ||
env: | ||
DISPLAY: "" | ||
run: | | ||
# just to not being cached | ||
pip uninstall -y imsegm |
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,107 @@ | ||
name: CI testing | ||
|
||
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows | ||
on: # Trigger the workflow on push or pull request, but only for the master branch | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
pytest: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-18.04, macOS-10.15] # , windows-2019 | ||
python-version: [2.7, 3.6, 3.8] | ||
requires: ['minimal', 'latest'] | ||
exclude: | ||
- python-version: 2.7 | ||
requires: 'minimal' | ||
- python-version: 3.8 | ||
requires: 'minimal' | ||
|
||
# Timeout: https://stackoverflow.com/a/59076067/4521646 | ||
timeout-minutes: 35 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Set py2.7 dependencies | ||
if: matrix.python-version == 2.7 | ||
run: | | ||
cp -r requirements-py27.txt requirements.txt | ||
# required for matplotlib @py2 | ||
pip install -U backports.functools_lru_cache | ||
- name: Set min. dependencies | ||
if: matrix.requires == 'minimal' | ||
run: | | ||
python -c "fname = 'requirements.txt' ; req = open(fname).read().replace('>=', '==') ; open(fname, 'w').write(req)" | ||
python -c "fname = 'tests/requirements.txt' ; req = open(fname).read().replace('>=', '==') ; open(fname, 'w').write(req)" | ||
# Note: This uses an internal pip API and may not always work | ||
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow | ||
- name: Get pip cache | ||
id: pip-cache | ||
run: | | ||
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" | ||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.requires }}- | ||
- name: Install dependencies | ||
run: | | ||
pip install wheel --quiet | ||
pip install --requirement requirements.txt --quiet --upgrade | ||
pip install --requirement tests/requirements.txt --quiet --upgrade | ||
python --version | ||
pip --version | ||
pip list | ||
mkdir output | ||
mkdir results | ||
shell: bash | ||
|
||
- name: Tests | ||
env: | ||
DISPLAY: "" | ||
run: | | ||
check-manifest | ||
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 | ||
flake8 . | ||
- name: Upload pytest test results | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }} | ||
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml | ||
# Use always() to always run this step to publish test results when there are test failures | ||
if: always() | ||
|
||
- name: Statistics | ||
if: success() | ||
run: | | ||
coverage report | ||
coverage xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
if: success() | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: coverage.xml | ||
fail_ci_if_error: false |
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.