From 3a44c9da3eeaa40200ced2b320dec62c43909f44 Mon Sep 17 00:00:00 2001 From: paulkorir Date: Fri, 2 Sep 2022 10:40:18 +0100 Subject: [PATCH] Bugfix * removed .travis.yml since we don't use them anymore * added ilastik.IlastikHeader class, which was implied but absent >:( * fixed github workflow by removing py27 and py35 and quote py3.10 * version bump: v0.6.0.dev1 --- .github/workflows/python-package.yml | 2 +- .travis.yml | 33 ------------------- CHANGELOG.md | 8 +++++ sfftk/__init__.py | 2 +- sfftk/formats/ilastik.py | 5 +++ sfftk/test_data/sff/v0.8/output_emd_1181.json | 12 +++---- sfftk/test_data/sff/v0.8/output_emd_1181.sff | 8 ++--- sfftk/unittests/test_formats.py | 1 + 8 files changed, 26 insertions(+), 45 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index df914c3..395938e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, 3.10] + python-version: [3.6, 3.7, 3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 49cb693..0000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -language: python - -python: - - "2.7" - - "3.5" - - "3.6" - - "3.7" - - "3.8" - -sudo: true - -before_install: - - python --version - - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157 - - sudo apt-get update - - sudo apt-get install build-essential - - pip -V - - pip install --upgrade pip - - pip install setuptools - - pip install coverage - - pip install coveralls - - pip install numpy - - pip install pytest - - pip install pytest-cov - -install: - - pip install -e . - -script: - - pytest --cov=./sfftk sfftk/unittests - -after_success: - - coveralls diff --git a/CHANGELOG.md b/CHANGELOG.md index a9af2ad..4c19fa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ #Changes by release +## [0.6.0.dev1] - 2022-09-02 + +Bugfixes + +* removed .travis.yml since we don't use them anymore +* added ilastik.IlastikHeader class, which was implied but absent >:( +* fixed github workflow by removing py27 and py35 and quote py3.10 + ## [0.6.0.dev0] - 2022-09-01 * dropped support for Python2.7; requires Python3.6+ diff --git a/sfftk/__init__.py b/sfftk/__init__.py index 33e9749..6257611 100644 --- a/sfftk/__init__.py +++ b/sfftk/__init__.py @@ -3,5 +3,5 @@ BASE_DIR = os.path.dirname(__file__) -SFFTK_VERSION = 'v0.6.0.dev0' +SFFTK_VERSION = 'v0.6.0.dev1' diff --git a/sfftk/formats/ilastik.py b/sfftk/formats/ilastik.py index f1ab77d..66f53f9 100644 --- a/sfftk/formats/ilastik.py +++ b/sfftk/formats/ilastik.py @@ -13,6 +13,11 @@ from ..readers import ilastikreader +class IlastikHeader: + def __init__(self, segmentation): + self._segmentation = segmentation + + class IlastikSegment(object): """Segment""" diff --git a/sfftk/test_data/sff/v0.8/output_emd_1181.json b/sfftk/test_data/sff/v0.8/output_emd_1181.json index ca48443..986f421 100644 --- a/sfftk/test_data/sff/v0.8/output_emd_1181.json +++ b/sfftk/test_data/sff/v0.8/output_emd_1181.json @@ -45,15 +45,15 @@ "id": 15559, "parent_id": 0, "biological_annotation": { - "name": "chart hydrometers trackers", - "description": "Nascetur minim dolore voluptua odio, leo minulla dictumst cum ornare elitvivamus. Sociis felissed.", - "number_of_instances": 366, + "name": "slit factories fire", + "description": "Felis ea nec consetetur lobortis, nulla pulvinar sociosqu. Invidunt egestasmauris venenatis integer nullam elit, luptatum euismod elitnunc doming.", + "number_of_instances": 587, "external_references": [ { "id": 0, - "resource": "powders", - "url": "conn", - "accession": "icing", + "resource": "contents", + "url": "parameter", + "accession": "destinations", "label": null, "description": null } diff --git a/sfftk/test_data/sff/v0.8/output_emd_1181.sff b/sfftk/test_data/sff/v0.8/output_emd_1181.sff index f10cba2..837bf76 100644 --- a/sfftk/test_data/sff/v0.8/output_emd_1181.sff +++ b/sfftk/test_data/sff/v0.8/output_emd_1181.sff @@ -28,12 +28,12 @@ - hip pear transmission - Sedfusce enimnulla volutpatut purus, ridiculus nisi accumsan autem. Bibendumfusce phasellus. + combatants limitation alternation + Facilisisat neque. Sadipscing ametduis conubia. - + - 89 + 982 0.921817600727081 diff --git a/sfftk/unittests/test_formats.py b/sfftk/unittests/test_formats.py index 0283d73..70c5677 100644 --- a/sfftk/unittests/test_formats.py +++ b/sfftk/unittests/test_formats.py @@ -115,6 +115,7 @@ def test_am_read(self): def test_ilastik_read(self): """Read an ilastik (.h5) segmentation""" self.read_ilastik() + self.assertIsInstance(self.ilastik_segmentation.header, ilastik.IlastikHeader) self.assertIsInstance(list(self.ilastik_segmentation.segments), list) self.assertIsInstance(list(self.ilastik_segmentation.segments)[0], ilastik.IlastikSegment)